Astro-Cavern (Amstrad CPC) by VirtualJames
A downloadable game
Title: Astro-Cavern
Author: VIRTUALJAMES
Category: PUR-120
System: Amstrad CPC 6128 / Plus (Recommended) or CPC 464 (with DDI-1)
Language: Locomotive BASIC 1.0 / 1.1
YouTube link:
DESCRIPTION:
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:
1. "ASTRO.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.
2. "ASTRO1.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 <4 blocks wide, Line 80 evaluates BORDER 1-(w<4)*5 to snap the border to RED. Simultaneously, Line 70 uses boolean math to award 5 points per frame instead of 1 while in the "Danger Zone".
- 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.
LINE LENGTH PROOF (PUR-120):
Version 1.1 (ASTRO.BAS):
Line 10: 110 Characters
Line 20: 120 Characters
Line 30: 119 Characters
Line 40: 114 Characters
Line 50: 114 Characters
Line 60: 116 Characters
Line 70: 117 Characters
Line 80: 101 Characters
Line 90: 95 Characters
Line 100: 113 Characters
Version 1.0 (ASTRO.BAS):
Line 10: 120 Characters
Line 20: 120 Characters
Line 30: 119 Characters
Line 40: 119 Characters
Line 50: 114 Characters
Line 60: 114 Characters
Line 70: 114 Characters
Line 80: 99 Characters
Line 90: 108 Characters
Line 100: 114 Characters
| Status | Released |
| Rating | Rated 4.0 out of 5 stars (2 total ratings) |
| Author | BASIC 10Liner |
| Genre | Action |
| Tags | 10liner, 8-Bit, Amstrad CPC, basic, schneider |
| Content | No generative AI was used |
Download
Install instructions
HOW TO RUN:
For CPC 6128 / Plus (Recommended - Version 1.1):
1. Mount the provided astro.dsk file into your emulator.
2. Type: RUN "ASTRO" and press ENTER.
3. If using a real 6128 you would simply insert the disc and type RUN "ASTRO"
For native CPC 464 (Version 1.0):
To run a .dsk file on a standard CPC 464, you must use a disk interface (like a Gotek/DDI-1 to 6 on real hardware, or AMSDOS in an emulator).
In WinAPE:
1. Go to Settings -> Memory. Under "Upper ROMs", set Slot 7 to "AMSDOS.ROM" and click OK.
2. Press F9 (or File -> Reset) to reboot the virtual Amstrad and initialise the drive.
3. Insert the astro.dsk file into Drive A.
4. Type: |disc (The '|' symbol is usually typed with Shift + @) and press ENTER.
5. Type: RUN "ASTRO1" and press ENTER.
Development log
- Updated42 days ago

Comments
Log in with itch.io to leave a comment.
I already told you (on another chat) that I liked this game: so it's just to make it a bit more official. ^^
Ah thanks Alex, that's very kind of you, right back at you and your ZX81 game, really good
^^
It’s great, thanks for making this game. I tried it live here: https://www.twitch.tv/videos/2718987215?t=0h28m31s
Thank you very much for covering it, that's most kind. This is my first 10 liner, I appreciate it.
You're welcome
Locomotive BASIC 1.1 Only :(
It's a fair point well made. I've just spent a few hours removing FRAME and COPYCHR$ to make a 1.0 and 1.1 compliant version. I want to be judged on the 1.1 as it's enhanced over 1.0. I appreciate you spotting it, this is my first entry and hadn't considered the difference in ROMs, I won't make that mistake again. I've updated the instructions, put an astro.bas and astro1.bas on the disc and submitted an update. Thank you
Entry updated.
Thank you very much, I'll be more mindful of the variances in native ROMs in future.
Hello How to submit a new game in your 10 liner contest ? Cheers
you‘ll find the email adress at basic10liner.com
yep , Isaw it , I will send you ASAP
Thanks for the update, I did some poking around so feel free contact me at "out_bush at hotmail dot com", I made some changes to the control system and my version only needs one TEST, depending on how TEST is used, it can either be faster or slower than COPYCHR$(#0).
Hey love this! I put myself under pressure to resolve the 1.0 requirement as you were quite right, and once I realised, I couldn't take the easy way out and say 6128 only! I'll make sure I consider ROM upgrades in future. I'd be keen to see how to get around two TEST commands, I'll email you, thank you
Yes, it's not Compulsory to write it in BASIC 1.0 and in the past entries weren't rated based on which BASIC they could or couldn't work on unless someone said "Here's my Game it's for the Amstrad CPC 464/664/6128 and Plus Range", though I don't know that for sure.
It's simply a view I hold that Games should be able to run on any machine, though Get some of those things become difficult when 10 Lines is concerned - normally it's the extra parameters in the graphical commands which leaves BASIC 1.0 behind in the amount of space saved.
Though take a look at my game "Revisiting the Exit" from the 2025 contest, it's PUR-120 though had to work hard to get it like that and it was a reworked version between "Find The Exit" from the 2022 in the PUR-80 and "Find the Exit Red" from the same year in the PUR-120.
I agree, I hadn't considered it when I started writing, as you'll know, it was hard enough to cram it all in, it probably took me longer than it should have but once I'd started, I had to finish.
I took a look at "Revisited the Exit" and it's brilliant. Really impressive to see how you managed to iterate on your 2022 versions and squeeze the reworked game into the PUR-120 category. That takes some serious optimization skills. Awesome work!
very good
Thank you
Awesome !!!!
Thank you very much