-
Notifications
You must be signed in to change notification settings - Fork 8
Snake Block
The Snake Block is comprised of two parts, a sprite and the block movement data.
Is 0 ba x y 0
, where the fifth byte is needed but doesn't seem to do anything.
It is available in all graphic sets.
Is its own section in the e-reader level file. It is right after sprites and before auto scroll data.
This doc's info is completely correct.
- the snake must travel at least as far as its width. So if it is 5 wide, it needs to at minimum travel 5 tiles. If it travels less, it gets corrupted.
- speed range is from 0-7, with 0 being extremely slow and 7 extremely fast. Nintendo seems to mostly use 2 as their speed.
Then the snake is properly rendered at whatever x/y you set it at. Once Mario lands on it, it performs the sequence as defined by the block movement bytes.
Then the snake starts dormant as expected, but as soon as Mario touches it, it slides off the screen and out of the level.
If there is one snake with no block data, then this snake will be very long, about 12 tiles in length.
Sometimes this seems to lock the gba up, at least it seems to lock gbajs up. But not always.
If there is block data, then the first snake in the room (lowest x value) will perform the routine as expected. All the other snakes will slide off the screen. But unlike when there is one snake and no movement data, they will not be extra long.
just a guess, but maybe the fifth byte is an index, and block movement data can define multiple sequences? That would enable multiple snakes in one room.
Update: it doesn't seem to be. It might be a flag for like looping or something? So far I have not discovered it doing anything and setting it to any number seems to have no impact.
the snack block seems to create a corrupt blank tile that you can't interact with on certain object sets
- 04
- 06
- 0c
- 0d