Build a GameCreating Sky Ace

Appendix D — Tuning Tables

The numbers that make Sky Ace 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 Gun Patterns

One row per round of a machine-gun volley. gunLevel: the gun level that fires it. offsetX and offsetY: where it starts, in meters from the Fighter’s middle (+X right, +Y up). direction: where it flies, in degrees (90 is straight up the screen).

Data TableGun PatternsData Structure: Gun Patterns Entry
Row 0Level 1 Left
gunLevel1
offsetX-0.28125
offsetY1.375
direction90
Row 1Level 1 Right
gunLevel1
offsetX0.28125
offsetY1.375
direction90
Row 2Level 2 Left
gunLevel2
offsetX-0.5
offsetY1.375
direction90
Row 3Level 2 Middle
gunLevel2
offsetX0
offsetY1.375
direction90
Row 4Level 2 Right
gunLevel2
offsetX0.5
offsetY1.375
direction90
Row 5Level 3 Outer Left
gunLevel3
offsetX-0.6875
offsetY1.375
direction90
Row 6Level 3 Inner Left
gunLevel3
offsetX-0.25
offsetY1.375
direction90
Row 7Level 3 Inner Right
gunLevel3
offsetX0.25
offsetY1.375
direction90
Row 8Level 3 Outer Right
gunLevel3
offsetX0.6875
offsetY1.375
direction90
Row 9Level 4 Wing Left
gunLevel4
offsetX-1.125
offsetY1.375
direction98
Row 10Level 4 Outer Left
gunLevel4
offsetX-0.6875
offsetY1.375
direction90
Row 11Level 4 Inner Left
gunLevel4
offsetX-0.25
offsetY1.375
direction90
Row 12Level 4 Inner Right
gunLevel4
offsetX0.25
offsetY1.375
direction90
Row 13Level 4 Outer Right
gunLevel4
offsetX0.6875
offsetY1.375
direction90
Row 14Level 4 Wing Right
gunLevel4
offsetX1.125
offsetY1.375
direction82

D.1.2 Enemy Types

One row per enemy kind, named like its Object. speed: how fast it flies down, in meters per second. health: how many hits shoot it down. points: the score for shooting it down. bigExplosion: Yes for a bigger explosion when shot down. dropChance: the chance in a hundred that it drops a pickup when shot down. damage, mark and hitsTaken are working values every enemy starts from here (1, 0 and 0): the hits the next hit counts (Takes Hits), the damage at which the Sky Fortress next changes (Sky Fortress Battle) and the hits it has taken.

Data TableEnemy TypesData Structure: Enemy Stats
Row 0Zero Fighter
speed5.9375
health2
points100
bigExplosionNo
dropChance7
damage1
mark0
hitsTaken0
Row 1Red Ace
speed4.6875
health5
points300
bigExplosionNo
dropChance22
damage1
mark0
hitsTaken0
Row 2Dive Bomber
speed4.375
health6
points350
bigExplosionNo
dropChance18
damage1
mark0
hitsTaken0
Row 3Heavy Bomber
speed1.71875
health36
points2000
bigExplosionYes
dropChance100
damage1
mark0
hitsTaken0
Row 4Sky Fortress
speed3.4375
health420
points25000
bigExplosionYes
dropChance0
damage1
mark0
hitsTaken0

D.1.3 Mission Timeline

One row per arrival, in time order. timeSeconds: mission time (seconds from the start). formation: V, Column, Row, Side Sweep, or Supply Drop (one pickup arrives at x, entryY). object: the Object that arrives (an enemy, or a supply drop’s pickup). x: the formation’s middle (meters); for a Side Sweep, the edge it comes from (0 left, 22.5 right). count: how many planes. spacing: a V’s sideways spacing or a Column’s gap (meters). entryY: how high a formation starts (meters; 35.9375 is just above the top; single planes start at their own height). A single plane is a Column of 1.

Data TableMission TimelineData Structure: Mission Timeline Entry
IMPORT CSV55 rows, from a file
FIRST ROWS3 of 55, to compare
Row 0Wave 1: V at 3 s
timeSeconds3
formationV
objectZero Fighter
x11.25
count5
spacing2.25
entryY35.9375
Row 1Wave 1: Column (left) at 6.5 s
timeSeconds6.5
formationColumn
objectZero Fighter
x5.3125
count4
spacing2.8125
entryY35.9375
Row 2Wave 1: Column (right) at 6.5 s
timeSeconds6.5
formationColumn
objectZero Fighter
x17.1875
count4
spacing2.8125
entryY35.9375

D.1.4 Sea Scenery

One row per piece of sea scenery, named like its Object (meters). sideMargin: how far in from the left and right edges of the screen its center comes back. topEdge and bottomEdge: how far its picture reaches above and below its center; the open sea between two pieces is measured between their pictures.

Data TableSea SceneryData Structure: Sea Scenery Spacing
Row 0Jungle Island
sideMargin4.6875
topEdge4.875
bottomEdge4.78125
Row 1Destroyer
sideMargin2.8125
topEdge4.96875
bottomEdge5.90625
Row 2Peak Island
sideMargin4.375
topEdge4.40625
bottomEdge4.40625
Row 3Atoll
sideMargin2.5
topEdge1.78125
bottomEdge1.78125
Row 4Carrier
sideMargin3.125
topEdge5.71875
bottomEdge5.90625
Row 5Village Island
sideMargin4.0625
topEdge3.5625
bottomEdge3.46875

D.1.5 Waves

One row per wave, in time order. startSeconds: mission time it starts (seconds). label: what the HUD shows under STAGE. banner: the words on its banner. warning: Yes for the WARNING before the Sky Fortress instead of a banner.

Data TableWavesData Structure: Waves Entry
Row 0Wave 1
startSeconds1
labelWAVE 1
bannerWAVE 1 - CORAL SEA PATROL
warningNo
Row 1Wave 2
startSeconds26
labelWAVE 2
bannerWAVE 2 - ACES HIGH
warningNo
Row 2Wave 3
startSeconds52
labelWAVE 3
bannerWAVE 3 - DIVE BOMBERS
warningNo
Row 3Wave 4
startSeconds80
labelWAVE 4
bannerWAVE 4 - HEAVY SQUADRON
warningNo
Row 4Boss
startSeconds112
labelBOSS
banner
warningYes

D.1.6 Pickups

One row per kind of pickup. object: the pickup’s Object. dropWeight: how likely it is when a shot-down enemy drops a pickup (relative weights). most: the highest its count can go (gun level, bombs, medkits; 0 for the weapons, which have no count). bonusPoints: the points given instead when the count is already at its most. popupText: the words that rise from the pickup when it gives its own reward (at its most the popup shows the bonus points instead). popupColor: the color of both popups.

Data TablePickupsData Structure: Pickups Entry
Row 0Power Up
objectPower Up Pickup
dropWeight30
most4
bonusPoints2000
popupTextPOWER UP!
popupColor#ffb347
Row 1Spread Shot
objectSpread Shot Pickup
dropWeight18
most0
bonusPoints0
popupTextSPREAD SHOT!
popupColor#8cff66
Row 2Rapid Guns
objectRapid Guns Pickup
dropWeight16
most0
bonusPoints0
popupTextRAPID GUNS!
popupColor#5ac8ff
Row 3Bomb Crate
objectBomb Crate Pickup
dropWeight16
most5
bonusPoints1000
popupText+1 BOMB
popupColor#ff7b6b
Row 4Medkit
objectMedkit Pickup
dropWeight20
most5
bonusPoints1500
popupText+1 MEDKIT
popupColor#ffffff

D.1.7 Weapons

One row per weapon. label: the name the HUD shows.

Data TableWeaponsData Structure: Weapons Entry
Row 0Machine Guns
labelMACHINE GUNS
Row 1Spread Shot
labelSPREAD SHOT
Row 2Rapid Guns
labelRAPID GUNS

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.

FIGHTER GUNS
  roundSpeed ................. 32.8125
  fireRateSeconds ............ 0.11
  spreadSpeed ................ 25.625
  spreadRateSeconds .......... 0.17
  spreadArcPerLevel .......... 20
  spreadMuzzleY .............. 1.25
  rapidRateSeconds ........... 0.0605
SHOW GUN LEVEL
  level ...................... 1
BREAKS ON HIT
  hitSparksCount ............. 6
TAKES HITS
  flashSeconds ............... 0.06
  roundDamage ................ 1
  bombDamage ................. 25
SHOT DOWN
  bigExplosionCount .......... 70
  bigSmokeCount .............. 16
  shakeStrength .............. 0.012
  shakeSeconds ............... 0.35
  explosionCount ............. 36
  smokeCount ................. 8
BREAKS ON FIGHTER
  hitSparksCount ............. 6
ZERO FIGHTER GUNS
  aimedChance ................ 50
  firstShotMin ............... 0.4
  firstShotMax ............... 1.1
  shotGapMin ................. 1.7
  shotGapMax ................. 2.5
  straightSpeed .............. 7.03125
  aimedSpeed ................. 6.71875
  aimMin ..................... 200
  aimMax ..................... 340
  muzzleY .................... -1.21875
  bandBottom ................. 10
  bandTop .................... 32.8125
  enemyMuzzleFlashCount ...... 5
PROTECTION BLINK
  blinkSeconds ............... 0.0833
  dimAlpha ................... 0.3
HURT BY ENEMIES
  startProtectSeconds ........ 2
SHOW MEDKITS
  level ...................... 1
MISSION START
  startMedkits ............... 3
  startGunLevel .............. 1
  startBombs ................. 2
MISSION OVER
  resultSeconds .............. 2.4
  victorySeconds ............. 3
LOST WITH THE LAST MEDKIT
  bigExplosionCount .......... 110
  smokePuffCount ............. 20
  shakeStrength .............. 0.035
  shakeSeconds ............... 0.8
SHOW WITH RESULTS
  opacity .................... 1
DRIFT IN LINE
  speed ...................... 1.3125
  seaWidth ................... 22.5
  openSeaMin ................. 1.875
  openSeaMax ................. 13.125
DRIFT AND RETURN
  speed ...................... 3.28125
  minX ....................... -1.875
  maxX ....................... 24.375
  gapMin ..................... 1.25
  gapMax ..................... 21.875
  halfHeight ................. 9.4375
  viewTop .................... 33.75
SET OPACITY
  opacity .................... 1
CAST SHADOW
  offsetX .................... 0.8125
  offsetY .................... -1.25
SHADOW ON CLOUDS
  artPixels .................. 32
  sizeMeters ................. 3
  cloudSizeMeters ............ 12
SHOW BANNER
  bannerSeconds .............. 2.6
  enragedSeconds ............. 2.2
WEAVE
  weaveSpeed ................. 6.5625
  weaveRate .................. 2.4
  phaseMax ................... 6.28
RED ACE GUNS
  burstCount ................. 3
  burstArc ................... 28
  roundSpeed ................. 7.65625
  firstShotMin ............... 0.4
  firstShotMax ............... 1
  shotGap .................... 1.7
  aimMin ..................... 200
  aimMax ..................... 340
  muzzleY .................... -1.21875
  bandBottom ................. 10
  bandTop .................... 32.8125
  enemyMuzzleFlashCount ...... 5
DIVE ATTACK
  stopHeight ................. 27.1875
  stopRange .................. 5
  hoverSpeed ................. 0.46875
  hoverSeconds ............... 0.7
  diveSpeed .................. 10.3125
  aimMin ..................... 200
  aimMax ..................... 340
  spreadCount ................ 3
  spreadArc .................. 36
  roundSpeed ................. 7.1875
  muzzleY .................... -1.21875
  enemyMuzzleFlashCount ...... 5
HEAVY BOMBER GUNS
  fanCount ................... 5
  fanArc ..................... 60
  fanSpeed ................... 6.5625
  fanFirst ................... 1.2
  fanGap ..................... 1.8
  fanY ....................... -1.40625
  wingRoundSpeed ............. 8.75
  wingFirst .................. 0.6
  wingGap .................... 1.1
  wingOffset ................. 0.84375
  wingY ...................... -0.46875
  aimMin ..................... 200
  aimMax ..................... 340
  bandBottom ................. 10
  bandTop .................... 32.8125
  enemyMuzzleFlashCount ...... 5
DRIFT DOWN
  fallSpeed .................. 2.34375
  lowestY .................... 2.5
COLLECTED BY FIGHTER
  pickupSparkleCount ......... 18
WEAPON PICKUPS
  rapidSeconds ............... 10
SHOW RAPID TIME
  rapidSeconds ............... 10
DROPS BOMBS
  protectSeconds ............. 1.2
  bombShockwaveCount ......... 140
  bombExplosionCount ......... 40
  flashSeconds ............... 0.35
  bombShakeStrength .......... 0.03
  bombShakeSeconds ........... 0.6
BREAKS ON BOMB
  blastSparksCount ........... 4
SHOW BOMBS
  level ...................... 1
PATROL
  sideSpeed .................. 3.75
  sideRate ................... 0.55
  bobSpeed ................... 0.5625
  bobRate .................... 1.1
FORTRESS GUNS
  fanCount ................... 7
  fanArc ..................... 70
  fanSpeed ................... 7.1875
  fanFirst ................... 1
  fanGap ..................... 1.6
  noseY ...................... -5.0625
  wingSpeed .................. 9.375
  wingFirst .................. 1.8
  wingGap .................... 0.95
  wingX ...................... 2.0625
  wingY ...................... -0.46875
  aimMin ..................... 200
  aimMax ..................... 340
  enemyMuzzleFlashCount ...... 5
SKY FORTRESS BATTLE
  fightY ..................... 25.625
  enrageShakeStrength ........ 0.015
  enrageShakeSeconds ......... 0.6
  enrageBigExplosionCount .... 40
BLINK
  blinkGap ................... 1.1
  firstShow .................. 0
  showSeconds ................ 0.682
BLINK WARNING
  warningSeconds ............. 3.4
ENRAGED FORTRESS GUNS
  ringCount .................. 16
  ringStep ................... 22.5
  ringTurn ................... 17
  ringSpeed .................. 5.9375
  ringGap .................... 1.5
  ringY ...................... -0.3125
  burstCount ................. 3
  burstArc ................... 16
  burstSpeed ................. 10.3125
  burstGap ................... 0.7
  noseY ...................... -5.0625
  aimMin ..................... 200
  aimMax ..................... 340
  enemyMuzzleFlashCount ...... 5
CALLS ESCORTS
  escortFirst ................ 2
  escortGap .................. 6
  leftX ...................... 3.75
  rightX ..................... 18.75
  entryY ..................... 35.9375
SINKS WHEN SHOT DOWN
  sinkSpeed .................. 0.9375
  sinkSeconds ................ 2.6
  blastGap ................... 0.16
  blastWidth ................. 5.3125
  blastHeight ................ 3.4375
  goDownShakeStrength ........ 0.02
  goDownShakeSeconds ......... 2.8
  planeExplosionCount ........ 30
  sunkBigExplosionCount ...... 160
  smokePuffCount ............. 30
  sinkFlashSeconds ........... 0.5
  sunkShakeStrength .......... 0.04
  sunkShakeSeconds ........... 0.9
MAIN MENU KEYS
  buttonCount ................ 3
  fadeSeconds ................ 0.35
MENU CHOICE
  choice ..................... 0
LIT WHEN CHOSEN
  choice ..................... 0