This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
Name: Main game loop (Part 6 of 6) Type: Subroutine Category: Main loop
Deep dive: Program flow of the main game loop
This is the second half of the minimal game loop, which we iterate when we are docked. This section covers the following:
It also supports joining the main loop with a key already "pressed", so we can jump into the main game loop to perform a specific action. In practice, this
Other entry points: FRCE The entry point for the main game loop if we want to jump straight to a specific screen, by pretending to "press" a key, in which case A contains the internal key number of the key we want to "press"
This variation is blank in the Disc (flight), Disc (docked), 6502 Second Processor, Master and Electron versions.
tha Consider spawning a Thargoid (22% chance)
.FRCE JSR TT102 \ Call TT102 to process the key pressed in A
This variation is blank in the Disc (flight) version.
Tap on a block to expand it, and tap it again to revert.
JMP TT100 \ Otherwise jump to TT100 to restart the main loop from \ the start
This variation is blank in the Disc (flight), Disc (docked), 6502 Second Processor, Master and Electron versions.