Boost will trade reaction time for a faster finish and more valuable pickups. Holding Space doubles course progress; releasing it restores normal speed, with no fuel meter or cooldown.
The boost routine reads Space and stores 0 or 1 in boost_time. Despite that name, the byte is a held-key flag, not a duration. Main code adds one to select one or two simulation steps for this update.
Source · view and edit
Companion file: assets.inc
The include line reads this editable data when you assemble. Keep it beside your source for a local build.
Edit the source, then assemble.
Edits are saved in this browser. Keep a downloaded copy of work you want to keep.
Focus the Spectrum screen to use the keyboard, or hold these buttons. Assemble again for a fresh machine.
Run the program to inspect it. Editing source does not change the running machine.
boost_time- —
steps_left- —
frame_delta- —
score- —
elapsed- —
ticks- —
Read the active object records
These rows read the twenty-slot pool. Empty slots are omitted. The display samples RAM while the program runs, so values can change between observations.
| Slot | X | Y | Kind / active | Speed | Drift |
|---|
The clock still measures PAL frames. Each simulation step steers, moves objects, checks contact, considers a spawn and checks completion. During boost those operations happen twice before the next outer update. The ship also responds on each step so its steering keeps pace with the accelerated course.
Preserve the intermediate position
Doubling every meteor’s movement in one addition would jump over an intermediate state. Instead, the program repeats one simulation step. After measuring the frames and calling boost, the main loop stores boost_time+1 in steps_left and reaches a new label, race_step, at the start of the ship and object work. Each pass checks for a fatal meteor contact before allowing another step or a successful finish.
At race_continue, steps_left is decremented. A nonzero value returns to race_step; zero proceeds to the HUD and then the next frame wait. A win or loss takes its result path immediately.
race_continue:
ld a,(steps_left)
dec a
ld (steps_left),a
jp nz,race_step
call hud
jp main_loopThis is not perfect continuous collision for arbitrarily large speeds. It preserves our existing contact checks at both of the two accepted course steps, whose speeds and collision regions have been tested together.
Make rewards use the same decision
A star contact adds boost_time+1 score units: one unit normally, two while boosting. Because units represent tens of points, the pickup is worth 10 or 20. The contact still clears the object’s kind so the star cannot score again on the second step.
A meteor hits on the first boosted step, and that step would also exhaust the final event. Do we win, lose, or run the second step?
Show the explanation
We lose. The hull check follows object advancement and precedes spawn/completion handling. The lost path leaves the simulation loop. Neither the second step nor a completion bonus should rescue a fatal contact.
Hold and release Space while watching boost_time and ticks. Elapsed should keep following real frames. The controls line at the bottom now mentions SPACE BOOST, and the HUD shows 1X or 2X. Holding Space to launch does not start the run boosted, because unit 11’s title waits for Space to be released before calling new_game. Q returns to the title; R retries a result. Starting again through the editor creates a fresh machine.
The straightforward renderer currently erases and redraws every object on both boosted steps. Play into a dense patch and inspect frame_delta. Native execution sometimes records four frames between updates instead of two. That observation is our reason to optimise drawing next; it is not a reason to stop checking the intermediate collisions.
Sources
The maintained Meteor Storm source linked through this page supplies the game rules and data layout. Its experiments run original Z80 instructions on an emulated 48K PAL Spectrum; the game rules are design choices, not hardware properties.
Run it here
This unit's program, built for you.
- Program
- meteor-storm.tap
- Machine
- ZX Spectrum 48K (PAL)