Obviously despite the simple premise, it would still be too complex to have scrolling, running people, homing attacks from attacking enemies and base interactions. But I thought, maybe I could at least have a chopper picking up people on a static screen, while avoiding random shots from two randomly moving tanks.
It worked. Some nice features presented themselves almost by chance.
The logic imposed by so few lines meant that I had to reuse the routine that prevents the helicopter from moving down below ground level by automatically reversing the chopper up one space if it goes too low. This is also a part of the random placement of soldiers routine. The occasional random motion upwards even if it is not near the ground gives the chopper a kind of buoyant feel, which I think adds something to the verisimilitude of its flight characteristics. This routine also gets used when you set down on top soldiers to pick them up. So setting down triggers new random placements of soldiers. I thought this was a bug, but I think it turned out to be a feature. It's kind of like in the original game when the soldiers come running when you touch down. It is mitigated somewhat by several factors. The tanks are continuously randomly "rolling over" many of the hapless soldiers who appear and the animation blanking routine of the chopper erases three spaces immediately below the chopper so you can only pick up one soldier at a time. The others get blown away by your powerful propeller. So be careful when and where to set down!
The shots moving in opposite directions can be challenging. Especially since they can screen wrap from the left and right side of the screen. You really have maintain global awareness of where the tanks are and plan your moves across the lines of fire very carefully. The speed of shots is pretty quick because the only check is whether a space is non blank (not black character 128). The line across the top stops all shots from going further and the single check jumps to a routine that determines if what was hit was the ceiling line, which simply triggers the next shot from the relevant tank, or the game over routine.
Random seed peek, initialization of main variables, poke lines top (blue block 175) and bottom (red block 191)
Beginning of Main Loop. Print and move both tanks randomly. Each tank has blank/black characters on it left and right sides of it, so it erases the left or right edges of itself as it moves in either direction. Move shots and check if hit anything. If so jump to hit routines at line 7 or 8.
Randomly place new soldiers/and or check if too low or if soldier is immediately beneath chopper and jump to appropriate subroutines
Subroutines for shot hits. Chopper? Or ceiling? If chopper (character<161) then jump to game over routine at line 9. Otherwise, must be ceiling so restart shot from tank's current location and go back to main loop.
Remarks with instructions
10 REM USE awsz OR ijkl
11 REM TO MOVE CHOPPER
12 REM COLLECT WAITING
13 REM ^^ SOLDIERS ^^
12 REM BY JIM GERRIE
13 REM FOR TRS-80 MC-10
14 REM BASIC 10-LINER
15 REM CONTEST
13 REM 2019 GUNNAR KANOLD
The game can be played in the MC-10 Javscript emulator hosted at my faculty website at Cape Breton University: http://faculty.cbu.ca/jgerrie/MC10/JG_MC10.html
Just click on the "- Select Cassette -" menu and choose "CHOPPER". Then type RUN and hit the <ENTER> key. Use IJKL keys to move. Avoid being hit land your chopper on top of the up arrows (men) that appear at the bottom of the screen. Landing when no men are around will make some appear.