Waterbomb with the red firefighter helicopter (ZX Spectrum) by Alberto Apostolo
A downloadable game
In a training session, a red firefighter helicopter must extinguish a bonfire. You have just to release the water by pressing any key. A game consists in 9 rounds. To score a point, water must fall on the vertical of the bonfire. To release the next waterbomb you have to wait the previous touches the ground.
Waterbomb runs on Sinclair ZX Spectrum and its emulators. This program was developed without GOTOs by emulators (JPP written by Arnt Gulbrandsen since the dawn of time 😊 and R80 and RSpec) running through DOSBox installed on my 64bit laptop.
I dedicate this work to Níck Shcherbyna from Lviv (Ukraine)
one of the winners in the 2021 edition.
Program description and List
Variables:
a = flag (0 for a missed bonfire, 1 for a hit bonfire)
a$ = string for musical tones
b = current round
g = flag for the game loop
r = bonfire random horizontal axis
s = score incremented by variable a
u = working variable for loops
v = working variable
w = horizontal axis of the water released by the helicopter
x = horizontal axis of the helicopter
y = vertical axis of the water bomb released by the helicopter
Lines:
10. prepare screen, data for user defined characters. Header loop on working variable u
20. loop on variable u to create UDGs, draw “moon”, plot random stars. Header loop on variable g (game), set score to zero
30. header loop on variable b (rounds). Display round and score on screen, display yellow ground at the bottom
40. calculate bonfire random axis in r, display flashing bonfire, set a = 0, set y = 0. Header loop on variable x, display helicopter
50. helicopter sound effect, if a key pressed and y = 0 then set w=x+1, set flag a. If y <> 0 then call subroutine to line 100
60. blank helicopter, end loop on x. Loop on variable u to complete the descent of the water bomb. Initializing a$ (depending on hit bonfire or not)
70. loop for sound effects stored in a$, update score, clear the bottom of the screen, end loop on b
80. special effects for the request to play again (a well-known little Speccy trick with a system variable)
90. waiting for a pressed key. If yes, the loop on g continues otherwise the program stops
100.subroutine to display the water bomb at (y,w) on screen
Status | Released |
Author | BASIC 10Liner |
Genre | Action |
Tags | 8-Bit, basic, basic10liner, sinclair, ZX Spectrum |
Leave a comment
Log in with itch.io to leave a comment.