From 2501dc4ecbfc45170a84503a90eb15f5770e6918 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 2 Sep 2016 00:00:39 -0400 Subject: bombs and level maps --- bombs.txt | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 bombs.txt (limited to 'bombs.txt') 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). -- cgit v1.2.3