// HACKER NEWS — CYBERSECURITY
Commodore 64: Mercenary
To keep rendering under control, the game keeps only one building in memory at a time. The square you're in dictates which building is live.
Click the view, then ← → turn, ↓ ↑ nose up and down, W S forward and back, R F climb and descend, Q E roll.
160 × 136 multicolour pixels, drawn by the page with the game's view code, ported routine by routine. Exhaustively verified as byte accurate.
The square's building is loaded only when the high byte of your X or Y changes ($94FE-$952F), and drawn only while you are low enough (height is under 65536). So buildings 'pop in' only when you enter their square.
From higher up, you see the roads: they are drawn from height 2048 up, as lines between the centres of the squares they join. At height $200000 a fixed picture of 13 roads replaces them ($902A).
You crash-land at 08-08, and the Colony Craft hangs straight above you at altitude 64,997. There is no lift on the ground here. But one invisible patch of grass – 1,024 units a side and about 14 seconds' walk from where you land – answers the E key as if it were the lift on the Colony Craft's deck. The ride 'down' goes into the Colony Craft's hangar; and pressing E again brings you up on its deck!
Square 08-08 from above: runway marks, the spinning pyramid, the Dominion Dart. One grid step is 256 units, 1/256 of the whole square.
The Colony Craft sits over 08-08, so its deck and the grass underneath share one X and one Y. Only the height tells them apart. Its lift is entry 8 in the table of lift squares at $B4B6/$B4BE, and the E key's test checks the square and the middle bytes of X and Y. It never reads the height. So the patch under the deck's lift works exactly like the lift.
The E key's test, one instruction group at a time, with the values it reads on the Colony Craft's deck and on the grass under it.
The ride 'down' ends in room 8, the Colony Craft's hangar. Taking the elevator up again from room 8 works as expected: it starts in the room, and once it reaches the surface side, $A312 adds $40FF00 to your height, so it ends on the deck. The underground has no height of its own: a room is a separate box, and no room lies below any point of the city.