Build a GameCreating Shatterfield

Appendix D — Tuning Tables

The numbers that make Shatterfield play the way it does. Change them to remix the game: the game’s Logic reads them from here. Try one change at a time, and run the game after each. If something stops working, put the old number back.

D.1 Data Tables

D.1.1 Asteroid Materials

The Asteroid materials, one per wave in this order, then repeating. Each row names the sprite its Asteroids use.

Data TableAsteroid MaterialsData Structure: Asteroid Materials Entry
Row 0Standard
spriteAsteroid Standard
Row 1Brittle
spriteAsteroid Brittle
Row 2Crystal
spriteAsteroid Crystal
Row 3Dense
spriteAsteroid Dense
Row 4Metal
spriteAsteroid Metal
Row 5Volatile
spriteAsteroid Volatile

D.1.2 Sky Layers

The sky, back to front, one row per layer. background: the layer’s Background; driftX and driftY: its own slide (image pixels per second, Y up); depth: how much it slides against the Ship; surge: how fast it rushes during a sector jump (image pixels per second).

Data TableSky LayersData Structure: Sky Layers Entry
Row 0Nebula Panorama
backgroundNebula Panorama
driftX-4
driftY0
depth0.015
surge700
Row 1Stars Far
backgroundStars Far
driftX-7
driftY1
depth0.04
surge700
Row 2Gas Filaments
backgroundGas Filaments
driftX-10
driftY1.5
depth0.07
surge950
Row 3Stars Mid
backgroundStars Mid
driftX-14
driftY2
depth0.1
surge1300
Row 4Stars Near
backgroundStars Near
driftX-24
driftY3
depth0.2
surge2000
Row 5Space Dust
backgroundSpace Dust
driftX-42
driftY5
depth0.45
surge3200

D.2 Logic Numbers

The numbers and colors each Logic Component keeps in its Shared Variables and Per Instance Variables, with the Starting Value its card gives. A value set on its Object, under Variables in the Properties, or on a placement in the Scene, wins over the value here.

SHOT LIFETIME
  lifeSeconds ................ 0.85
SHIP GUN
  shotSpeed .................. 20
  muzzleDistance ............. 1.1875
  fireCooldownSeconds ........ 0.11
  maxShots ................... 4
SHIP HYPERSPACE
  cooldownSeconds ............ 1.2
  sparkCount ................. 36
ASTEROID DRIFT
  minSpeed ................... 1.40625
  maxSpeed ................... 2.65625
  maxSpin .................... 55
  wave ....................... 1
  speedUpPerWave ............. 0.07
  speedUpLastWave ............ 9
BREAK APART
  points ..................... 20
  sparkCount ................. 34
  shake ...................... 0.012
  shakeSeconds ............... 0.18
  popupColor ................. #dff6ff
  popupSize .................. 0.46875
  popupRise .................. 0.8125
  popupSeconds ............... 0.55
  fragments .................. 2
SHIP CRASH
  explosionCount ............. 90
  crashSparkCount ............ 40
  shake ...................... 0.022
  shakeSeconds ............... 0.45
SHIP SHIELD
  shieldSeconds .............. 3
  blinkSeconds ............... 0.1
  fadedAlpha ................. 0.25
LIVES AND RESPAWN
  startLives ................. 3
  respawnSeconds ............. 2.4
LIFE ICON
  slot ....................... 1
ASTEROID MATERIAL
  wave ....................... 1
WAVES
  bannerSeconds .............. 1.6
  jumpSeconds ................ 1.4
  maxAsteroidsPerBand ........ 6
  edgeBand ................... 3.4375
  sideBand ................... 4.6875
EXTRA SHIPS
  extraShipEvery ............. 10000
  popupAboveCenter ........... 3.75
  popupColor ................. #7dffb2
  popupSize .................. 0.75
  popupRise .................. 1.25
  popupSeconds ............... 1.2
SAUCER FLIGHT
  speed ...................... 3.75
  margin ..................... 1.25
  minDepth ................... 2.8125
  maxDepth ................... 21.25
  firstWeaveSeconds .......... 1
  weaveSpeed ................. 2.65625
  weaveMinSeconds ............ 0.8
  weaveMaxSeconds ............ 1.6
SAUCER GUN
  fireEvery .................. 1.35
SAUCER EXPLODES
  points ..................... 200
  explosionCount ............. 60
  shake ...................... 0.012
  shakeSeconds ............... 0.25
  popupColor ................. #ffd166
  popupSize .................. 0.5625
  popupRise .................. 1
  popupSeconds ............... 0.8
SAUCER SHOT FLIGHT
  aimSpread .................. 7
  speed ...................... 10.3125
  lifeSeconds ................ 1.15
SAUCER SPAWNER
  firstSeconds ............... 16
  smallChance ................ 0.12
  smallChancePerWave ......... 0.06
  smallAlwaysScore ........... 40000
  gapMinFloor ................ 7
  gapMinStart ................ 17
  gapMaxFloor ................ 11
  gapMaxStart ................ 24
BLINK
  blinkSeconds ............... 0.55
  firstDelaySeconds .......... 0.6
TITLE SCREEN
  asteroidsPerBand ........... 3
  edgeBand ................... 3.4375
  sideBand ................... 4.6875
GAME OVER SCREEN
  playAgainSeconds ........... 2
  returnSeconds .............. 12
HEARTBEAT
  startSeconds ............... 1
  speedUp .................... 0.97
  fastestSeconds ............. 0.24
SKY PARALLAX
  followRate ................. 3
  surgeRate .................. 2.4
  pixelsPerMeter ............. 32