Pilot your high-speed Astro-Ship deep into the treacherous caverns of a distant world. Dodge the jagged rock walls and avoid the deadly space mines scattered in your path. The deeper you go, the cavern dynamically breathes, shrinking the tunnel down to 1-character gaps while the gameplay progressively speeds up. When the Red Alert border flashes, you are in the Danger Zone! Surviving in these claustrophobic bottlenecks multiplies your score by 5x per frame. Can you beat your High Score? CONTROLS: O - Left P - Right E - Up D - Down VERSIONS INCLUDED: To ensure maximum compatibility across the Amstrad CPC family, this submission includes two different codebases on the disk: - "ASTRO11.BAS" (v1.1): The recommended version. Optimized for the CPC 6128 and 464 Plus. It takes advantage of Locomotive BASIC 1.1 commands, using FRAME for screen syncing and COPYCHR$ for efficient string-based collision detection.
- "ASTRO10.BAS" (v1.0): Fully Locomotive BASIC 1.0 compliant. Runs natively on an original CPC 464. It substitutes missing commands by using CALL &BD19 for hardware flyback syncing and pixel coordinate math (TEST) for collision detection.
CODE EXPLANATION: Astro-Cavern uses Locomotive BASIC to deliver smooth gameplay within the 120-character limit: - Hardware Scrolling: By establishing a text window (WINDOW 1), the hardware handles scrolling natively. Line 50 constructs the 20-character cavern row via string concatenation before printing it (LOCATE 1,25) using solid blocks (CHR$ 143) to sync the scroll buffer and eliminate visual tearing. Line 90 integrates a dynamic delay loop (FOR d=s TO 40) to accelerate the game as the score climbs.
- Window Management & UI Formatting: A separate, protected score window is used (WINDOW#1). Line 90 uses the PRINT USING command to strictly format the UI, preventing the text wrap-scrolling glitch common in high-speed BASIC games.
- QWERTY/AZERTY Compliant Movement: Controls are mapped dynamically using UPPER$(INKEY$). Movement and screen bounding is resolved using sequential Boolean math (True=-1, False=0), saving space that would normally require IF...THEN statements.
- Adaptive Cavern & Multiplier: Line 60 uses weighted probabilities to expand and shrink the gap. When the cavern is
- Version 1.1 Collision Detection: Line 70 uses the COPYCHR$ command to check the screen buffer. The logic (a$>" " AND a$<CHR$(253)) ensures the ship detects deadly tiles while ignoring empty space and its own exhaust trail. It also uses FRAME for screen syncing.
- Version 1.0 Collision Detection (Fallback): Because BASIC 1.0 lacks COPYCHR$, Line 70 converts grid coordinates to physical pixels (v=392-y*16) and uses TEST to evaluate the center pixel. To prevent the player from crashing into their own trailing exhaust, the game maps PENs into Safe and Deadly tiers. It also includes an anti-phasing check (q=TEST) to prevent tunneling when the player moves down while the screen scrolls up. It uses CALL &BD19 for screen syncing.
 
|