Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to change tile graphics and nouns for each level #11

Open
unbibium opened this issue May 1, 2019 · 0 comments
Open

Add ability to change tile graphics and nouns for each level #11

unbibium opened this issue May 1, 2019 · 0 comments

Comments

@unbibium
Copy link
Owner

unbibium commented May 1, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant