Skip to content

Latest commit

 

History

History
85 lines (68 loc) · 3.54 KB

TUNING.md

File metadata and controls

85 lines (68 loc) · 3.54 KB

Fun with the Wave Data

Let's play with the wave data in the first level to see what each parameter does. THere's a whole bunch of stuff in there, some of it not used in the game at all. We'll fiddle with the parameters, show a vide of what it looks like, and link to a playable version of the retuned game so you can try it yourself.

Here are all the parameters defined for the first attack wave:

iridisalpha/src/level_data.asm

Lines 5302 to 5373 in bc427c5

planet1Level1Data
; Byte 1 (Index $00): An index into colorsForAttackShips that applies a
; color value for the ship sprite.
.BYTE $06
; Byte 2 (Index $01): Sprite value for the attack ship for the upper planet.
; Byte 3 (Index $02): The 'end' sprite value for the attack ship's animation
; for the upper planet.
.BYTE FLYING_SAUCER,FLYING_SAUCER+$03
; Byte 4 (Index $03): The animation frame rate for the attack ship.
.BYTE $03
; Byte 5 (Index $04): Sprite value for the attack ship for the lower planet.
; Byte 6 (Index $05): The 'end' sprite value for the ship's lower planet animation.
.BYTE FLYING_SAUCER,FLYING_SAUCER+$03
; Byte 7 (Index $06): Whether a specific attack behaviour is used.
.BYTE $00
; Byte 8 (Index $07): Lo Ptr for an unused attack behaviour
; Byte 9 (Index $08): Hi Ptr for an unused attack behaviour
.BYTE $00,$00
; Byte 10 (Index $09): Lo Ptr for an animation effect? (Doesn't seem to be used?)
; Byte 11 (Index $0A): Hi Ptr for an animation effect (Doesn't seem to be used?)?
.BYTE $00,$00
; Byte 12 (Index $0B): some kind of rate limiting for attack wave
.BYTE $00
; Byte 13 (Index $0C): Lo Ptr for a stage in wave data (never used).
; Byte 14 (Index $0D): Hi Ptr for a stage in wave data (never used).
.BYTE $00,$00
; Byte 15 (Index $0E): Controls the rate at which new enemies are added?
.BYTE $00
; Byte 16 (Index $0F): Update rate for attack wave
.BYTE $40
; Byte 17 (Index $10): Lo Ptr to the wave data we switch to when first hit.
; Byte 18 (Index $11): Hi Ptr to the wave data we switch to when first hit.
.BYTE <planet1Level1Data2ndStage,>planet1Level1Data2ndStage
; Byte 19 (Index $12): X Pos movement for attack ship.
.BYTE $06
; Byte 20 (Index $13): Y Pos movement pattern for attack ship.
; An index into yPosMovementPatternForShips1
.BYTE $01
; Byte 21 (Index $14): X Pos Frame Rate for Attack ship.
.BYTE $01
; Byte 22 (Index $15): Y Pos Frame Rate for Attack ship.
.BYTE $01
; Byte 23 (Index $16): Stickiness factor, does the enemy stick to the player
; sapping their energy if they're near them?
.BYTE $00
; Byte 24 (Index $17): Does the enemy gravitate quickly toward the player when its
; been shot? (Typical lickership behaviour)
.BYTE $00
; Byte 25 (Index $18): Lo Ptr for another set of wave data.
; Byte 26 (Index $19): Hi Ptr for another set of wave data.
.BYTE <nullPtr,>nullPtr
; Byte 27 (Index $1A): Lo Ptr for another set of wave data.
; Byte 28 (Index $1B): Hi Ptr for another set of wave data.
.BYTE <nullPtr,>nullPtr
; Byte 29 (Index $1C): Lo Ptr for Explosion animation.
; Byte 30 (Index $1D): Hi Ptr for Explosion animation.
.BYTE <spinningRings,>spinningRings
; Byte 31 (Index $1E): Lo Ptr for another set of wave data for this level.
; Byte 32 (Index $1F): Hi Ptr for another set of wave data for this level.
.BYTE <default2ndStage,>default2ndStage
; Byte 33 (Index $20): Unused.
.BYTE $00
; Byte 34 (Index $21): Whether to load the extra stage data for this enemy.
.BYTE $00
; Byte 35 (Index $22)): Points multiplier for hitting enemies in this level.
.BYTE $02
; Byte 36: (Index $23): Does hitting this enemy increase the gilby's energy?
.BYTE $02
; Byte 37: (Index $24) Is the ship a spinning ring, i.e. does it allow the gilby to warp?
.BYTE $00
; Byte 38-40: (Index $25-$27) Unused bytes.
.BYTE $04,$18,$00

Change the sprites

First something simple, we'll change the sprite used in the first level to a little eyeball:

diff --git a/src/level_data.asm b/src/level_data.asm
index b847bf1..60fd8cf 100644
--- a/src/level_data.asm
+++ b/src/level_data.asm
@@ -5306,7 +5306,7 @@ planet1Level1Data
         ; Byte 2 (Index $01): Sprite value for the attack ship for the upper planet.
         ; Byte 3 (Index $02): The 'end' sprite value for the attack ship's animation
         ; for the upper planet.
-        .BYTE FLYING_SAUCER,FLYING_SAUCER+$03
+        .BYTE LITTLE_EYEBALL,LITTLE_EYEBALL+$01
         ; Byte 4 (Index $03): The animation frame rate for the attack ship.
         .BYTE $03
         ; Byte 5 (Index $04): Sprite value for the attack ship for the lower planet.
@@ -5378,7 +5378,7 @@ planet1Level1Data2ndStage
         ; Byte 2 (Index $01): Sprite value for the attack ship for the upper planet.
         ; Byte 3 (Index $02): The 'end' sprite value for the attack ship's animation
         ; for the upper planet.
-        .BYTE FLYING_SAUCER,FLYING_SAUCER+$03
+        .BYTE LITTLE_EYEBALL,LITTLE_EYEBALL+$01
         ; Byte 4 (Index $03): The animation frame rate for the attack ship.
         .BYTE $01
         ; Byte 5 (Index $04): Sprite value for the attack ship for the lower planet.

Now recompile and run:

make runcustom

This is the result (click to try playing it yourself):

Change the stickiness behaviour

Next, let's try enabling the stickness and graviation behaviour on the first level:

diff --git a/src/level_data.asm b/src/level_data.asm
index b847bf1..a11527a 100644
--- a/src/level_data.asm
+++ b/src/level_data.asm
@@ -5343,10 +5343,10 @@ planet1Level1Data
         .BYTE $01
         ; Byte 23 (Index $16): Stickiness factor, does the enemy stick to the player
         ; sapping their energy if they're near them?
-        .BYTE $00
+        .BYTE $01
         ; Byte 24 (Index $17): Does the enemy gravitate quickly toward the player when its
         ; been shot? (Typical lickership behaviour) 
-        .BYTE $00
+        .BYTE $01
         ; Byte 25 (Index $18): Lo Ptr for another set of wave data. 
         ; Byte 26 (Index $19): Hi Ptr for another set of wave data.
         .BYTE <nullPtr,>nullPtr

This is the result (click to play it yourself):

That's a lot of random flying about. The movement pattern isn't really designed to get near you so maybe that explains why we don't see the same behaviour as we do in the licker ships later on.