You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having only seven tiles in the whole game is too limiting. But adding more would require changing the bit structure of the game state, and would probably force each playfield tile state to be stored in 2 bytes instead of 1 in the compiled version.
The following assumptions give us our options and limitations:
The player only moves forward in the game
No object has any meaning until it is given a rule.
The initial seven tiles are not required for every level.
The playfield data structure should not be changed, only the graphics.
We can provide additional level-specific objects by creating a table of replacement objects, with a column each for starting level, object index, replacement graphic, and replacement noun.
For example, given this entry:
9500 data 3,5,"{yel}%%%%","{wht}lava"
Upon loading level 3, the game should replace the water tile with a lava tile. Specifically, it should replace GR$(5) with the first string, and GR$(13) with the second string.
Alternately, we can keep a table of alternate objects, and a separate table of which objects go into which levels.
Note that CBM BASIC's READ statement does not add to the string heap, so if you want to keep a backup copy of the original GR$ array, it will only take up an additional 50 bytes (2 for the name, 48 for the string pointers and lengths), assuming you only store the first 16 entries.
The text was updated successfully, but these errors were encountered:
Having only seven tiles in the whole game is too limiting. But adding more would require changing the bit structure of the game state, and would probably force each playfield tile state to be stored in 2 bytes instead of 1 in the compiled version.
The following assumptions give us our options and limitations:
We can provide additional level-specific objects by creating a table of replacement objects, with a column each for starting level, object index, replacement graphic, and replacement noun.
For example, given this entry:
Upon loading level 3, the game should replace the water tile with a lava tile. Specifically, it should replace
GR$(5)
with the first string, andGR$(13)
with the second string.Alternately, we can keep a table of alternate objects, and a separate table of which objects go into which levels.
Note that CBM BASIC's
READ
statement does not add to the string heap, so if you want to keep a backup copy of the originalGR$
array, it will only take up an additional 50 bytes (2 for the name, 48 for the string pointers and lengths), assuming you only store the first 16 entries.The text was updated successfully, but these errors were encountered: