diff options
author | B. Watson <yalhcru@gmail.com> | 2016-09-02 00:00:39 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2016-09-02 00:00:39 -0400 |
commit | 2501dc4ecbfc45170a84503a90eb15f5770e6918 (patch) | |
tree | 3b9ebc8179ab484f8293a989609f0561b9b92384 /bombs.txt | |
parent | e9ec302bb089104385c020356dd47b64d6bd09a7 (diff) | |
download | jumpmanjr-2501dc4ecbfc45170a84503a90eb15f5770e6918.tar.gz |
bombs and level maps
Diffstat (limited to 'bombs.txt')
-rw-r--r-- | bombs.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/bombs.txt b/bombs.txt new file mode 100644 index 0000000..b6d4e78 --- /dev/null +++ b/bombs.txt @@ -0,0 +1,42 @@ + +Picking up bombs in the game seems simple enough... but the way they're +implemented in the code isn't. + +Each level has: + +- bomb graphics in the map data +- a list of bombs (indexed by 'coarse grid' coordinates) +- a list of map changes that happen when a bomb is picked up (optional) +- a subroutine that gets called on bomb pickup (optional) +- a subroutine that only gets called when certain bombs are + picked up... but this isn't used in Jumpman Junior (probably + it's a leftover from original Jumpman) +- another bomb-related list that I haven't figured out yet +- a byte that tells the game how many points a bomb pickup is + worth... but it's set to $64 (100) on every level in the game. +- a shape to draw to replace the bomb, when it's picked up. Likely + this is just a 4x4 blank square on most levels, but Figurits + Revenge probably has a girder here instead (I can't remember if + *every* bomb on that level causes a girder section to appear though) + +Coarse Grid Coordinates +----------------------- + +Effectively, the level is split into an invisible 8x8 grid, and only one +bomb can appear in each grid square. When a bomb is touched (detected +by GTIA collision register), the bomb_pickup routine gets called. It +turns the current player X and Y coordinates (in pixels/scanlines) +into coarse grid coordinates basically by lopping off the lower-order +bits. Since the Atari's display is larger than the visible portion, +the outermost grid squares are actually off the screen. This means the +grid is effectively more like 6x7 than 8x8. Each grid square can only +contain one bomb, so there's a limit of 64 (or really 42) bombs per level. + +The coarse coordinates are combined into one byte, and this byte is +searched for in the bomb list. When it's found, its position in the +list is used as an index into the other two lists (the map changes list +and the one I don't know what it's for yet). If the byte isn't found +before the $FF that terminates the list, bomb_pickup returns (so no +points are awarded and no bomb-picked-up sound is heard, and the bomb +doesn't disappear... doesn't happen on any of the levels as far as I +can remember though). |