Hello all 8)
Bit of a weird one, really. While working on a large solo project I found myself with some downtime while testing. I put the kettle on, grabbed a cuppa and sat back down. I closed my eyes and suddenly out of nowhere, I remembered this game I played as a kid. Due to having to wait on my current project, I opened an IDE and re-created the entire game in 75 minutes from memory. I've spent an hour or so on it since (background and text etc).
Anyway, I couldn't remember who it was that made the original or what it was called but I've done some research and it was Star Dodger V2 in July 1992 of Amstrad Action (I was 12 and my grandmother subbed and I had pretty much all of them) and the author was Graham French who I do actually remember being quite a contributor as I write this now.
If any of you would like to try my Graham French dedicated repo and play my version you can go here > https://github.com/p9iaai/StarDodgerV2-2024Remake (https://github.com/p9iaai/StarDodgerV2-2024Remake)
And if anybody knows if he's around or active or can even just let him know I'd appreciate it. I remember this game so fondly. It's so simple and so elegant and so addictive. I take no credit for that. Graham French is a childhood hero of mine.
Cheers Graham!
Added a release:
https://github.com/p9iaai/StarDodgerV2-2024Remake/archive/refs/tags/0.01a.zip (https://github.com/p9iaai/StarDodgerV2-2024Remake/archive/refs/tags/0.01a.zip)
Unzip to folder, open index.html in your browser (F11 if you want fullscreen). Pure JavaScript and HTML5 Canvas.
Already in 1988 Stewart Russell made 3 different versions of StarDodger printed in
Amstrad Computer User September, October and December 1988
A basic, a BCPL and an Assembler version.
Hi Johnny.
Yes of course. That would explain the V2! I shall update with this info. I assumed incorrectly Graham French also wrote V1.
Thanks for the clarification.
As I say, this was randomly thought of after 30 odd years and instant rapid development!
Should have done some more research. Thanks :)
I have now updated the readme in the repo to acknowledge the original creator Stewart Russell. I had no idea as a 12 year old.
Thanks again.
https://github.com/p9iaai/StarDodgerV2-2024Remake (https://github.com/p9iaai/StarDodgerV2-2024Remake)
That's interesting indeed, going to compare all versions. Thansk for sharing!
You're very welcome Gryzor (great name!)
Just a completely random thought out of nowhere to what it is now in about 3 hours total.
Weird, I guess, but this game is just addictive as all hell!
Hope you like it.
Is there a way to play it online?
Quote from: eto on 22:40, 09 December 24Is there a way to play it online?
Hi there. Sorry, no. Once I've got a few on there I'll host them. This just sort of happened. I'll add that in at some point.
Sorry for double post but I should also say, if you download the zip and put the folder in your C: drive or whatever you can bookmark index.html in your browser and play it any time.
More information about Stardodger
https://www.cpcwiki.eu/forum/cpcwiki-discussion/amstrad-action-type-in-project/msg164436/#msg164436
Quote from: Johnny Olsen on 17:01, 10 December 24More information about Stardodger
https://www.cpcwiki.eu/forum/cpcwiki-discussion/amstrad-action-type-in-project/msg164436/#msg164436
Yes! It does seem to be one of those, doesn't it? :D
This sort of thing was rife back in the day! The big software houses were at it, also!
It would be very interesting to find the Beeb one-liner version. I will research this thoroughly and update my repo accordingly.
Thank you Johnny.
Quote from: p9iaai on 12:25, 08 December 24I had no idea as a 12 year old.
Trust me, as the 19 year old author, I had no idea either!
The original BBC BASIC game — a one-liner called Asterisk Tracker (https://bbcmicro.co.uk/game.php?id=4370) (playable link) — is much more elegant. We played it on the school's beebs. My friend Alan produced a knockoff for the Dragon 32, and I produced a CPC knockoff based on Alan's one.The game was originally called 2D Star Dodge (after
3D Star Strike), and a copy got out under that name via my cracker friends in Normandy.
It would be nice to see if the game could be done as a one-liner.
Just this week I found a game that could have been an ancestor to all of these: "Asteroids" from 10Games for the ZX81 (https://www.zx81stuff.org.uk/zx81/emulate.php?track=10Games.tzx.zip@6&title=Asteroids%20from%2010Games&scale=2&speed=4)
Who's this then? Is that you Stewart?
:o
QuoteIt would be nice to see if the game could be done as a one-liner.
Well, I believe the term is 'Challenge Accepted!'
https://github.com/p9iaai/AsteriskTracker2024OneLiner (https://github.com/p9iaai/AsteriskTracker2024OneLiner) (Read)
https://github.com/p9iaai/AsteriskTracker2024OneLiner/archive/refs/tags/0.01a.zip (https://github.com/p9iaai/AsteriskTracker2024OneLiner/archive/refs/tags/0.01a.zip) (Download)
That was fun!
Quote from: scruss on 22:36, 11 December 24It would be nice to see if the game could be done as a one-liner.
I guess it would fit into the 255 bytes of a line but the line editor wastes some space and on the BBC it seems they can save even more space by shortening things or removing spaces.
Nevertheless, I gave it a quick try and if I limit everything to the absolute bare minimum I can fit it into a single line. It's a close fit and even the line number must be only one digit long ;-)
However it ends when you fail your mission and you have to type RUN again. Or add another line. Maybe someone else can optimize it even further?
Sorry, screenshot only as I typed it into an online emulator and can't save it. But hey, it's a type-in, right?
Absolutely fantastic!
This entire journey has been wild!
Slightly different approach which will also restart (but won't wait for RETURN).
The game runs much faster than the BBC. Not sure how I can make it equally fast without the need to add a second line. It's possible to spare a few more bytes if you enter PRINT as ?. Then you could e.g. add a "FRAME" command in the while loop which makes the game slower than on the BBC. maybe there is another command that "wastes" a lot of time and still fits into a line.
Quote from: eto on 12:58, 12 December 24Slightly different approach which will also restart (but won't wait for RETURN).
The game runs much faster than the BBC. Not sure how I can make it equally fast without the need to add a second line. It's possible to spare a few more bytes if you enter PRINT as ?. Then you could e.g. add a "FRAME" command in the while loop which makes the game slower than on the BBC. maybe there is another command that "wastes" a lot of time and still fits into a line.
Do you need the line number? It's been decades since I looked at BASIC! This is great!
Quote from: p9iaai on 13:04, 12 December 24Do you need the line number?
Yeah, Locomotive BASIC needs line numbers.
Quote from: eto on 13:17, 12 December 24Quote from: p9iaai on 13:04, 12 December 24Do you need the line number?
Yeah, Locomotive BASIC needs line numbers.
As I say it's been a while! I knew what Stewart meant, of course but I decided to do a JavaScript version as that's quicker for me and I don't make games these days.
I am recalling a machine code call (&bb18 or 19?) but I suppose that's not BASIC is it.
I will study. We'll get this down to one line!
Quote from: p9iaai on 10:13, 12 December 24Who's this then? Is that you Stewart?
:o
The very same. I've been lurking around here for years, and you commented on my blog, so ... here I am.
You might also like this 2009 remake: Mines Incas (https://www.cpc-power.com/index.php?page=detail&num=4007). There's a sort-of playable version here on Internet Archive, but ISTR their emulator doesn't quite handle it right: Mines Incas : Jean DECIA, Kukulcan alias Quetzalcoatl & Kukulcan : Free Download, Borrow, and Streaming : Internet Archive (https://archive.org/details/mines-incas-f-2009-pd-original).
Great work on the one-liner!
Hi Stewart, pleasure to meet you.
I miss the silliest things sometimes. Scruss?
Well that'll be your name then!
Thanks for the compliments. Been fascinating finding out about the history of this.
I've not used a CPC for a long time and this as I say has been great so I may well get myself one after Christmas and get back into it.
Thanks for the history :)
So here's the one-liner to type-in. Make sure to use "?" instead of "PRINT" as otherwise the code will be slightly to big for the line editor. Once entered a part of the line will no longer be accessible. It still works but if you edit the line you need to replace the PRINT again by ? and add the missing parts at the end.
1 MODE 1:L=L+1:MOVE 0,0:DRAW 636,0,1:DRAWR 0,160:DRAWR 0,78,3:DRAWR 0,160,1:DRAW 0,398
:PLOT 0,200,2:? L:FOR i=0 TO 2+l*3:LOCATE 3+RND*36,2+RND*22:?"*":NEXT:z=0:WHILE z=0
:y=SQR(1):z=TESTR(2,4*INKEY(47)+2):PLOTR 0,0:WEND:SOUND 1,400:IF z=3 THEN 1 ELSE RUN
I added a useless SQR function as this slows down the game just enough to make it playable. If you prefer a fast game, just remove it. If you need it slower, replace it with a FRAME command (664/6128 only).
it was a really nice challenge :-) thanks for the bringing it up
ooh, nice. Your code seemed to be split into three lines, so Arnold's Auto-Type tool didn't like it. This worked:
1 MODE 1:L=L+1:MOVE 0,0:DRAW 636,0,1:DRAWR 0,160:DRAWR 0,78,3:DRAWR 0,160,1:DRAW 0,398:PLOT 0,200,2:? L:FOR i=0 TO 2+l*3:LOCATE 3+RND*36,2+RND*22:?"*":NEXT:z=0:WHILE z=0:y=SQR(1):z=TESTR(2,4*INKEY(47)+2):PLOTR 0,0:WEND:SOUND 1,400:IF z=3 THEN 1 ELSE RUN
There should be a stop between games, though the "paternoster elevator" restarting isn't too bad an effect
Quote from: scruss on 00:03, 13 December 24ooh, nice. Your code seemed to be split into three lines, so Arnold's Auto-Type tool didn't like it. This worked:
Indeed. It was on purpose as the code-block does not have any line breaks and then is hard to read. If you don't want to type it manually, you can also use the DSK that was attached.
Quote from: scruss on 00:03, 13 December 24There should be a stop between games
Totally agreed! Unfortunately there is simply not enough space in the lin editor. At least not with my approach. I would need another 25 characters or so to add a pause between games.
If you want to add a pause between games, just remove the "else run" in line 1 and add this:
2 while inkey(18)<0:wend:run
This code waits for RETURN to be pressed.
Not sure if it counts but this here will make a one-liner including pause:
1 l1=PEEK(&170):l2=PEEK(&170+l1):l3=PEEK(&170+l1+l2):POKE &170+l1,l2+l3:POKE &170+l1+l2-1,1:FOR i=&170+l1+l2 TO &170+l1+l2+l3-4:POKE i,PEEK(i+4):NEXT:DELETE 1:END
2 MODE 1:L=L+1:MOVE 0,0:DRAW 636,0,1:DRAWR 0,160:DRAWR 0,78,3:DRAWR 0,160,1:DRAW 0,398:PLOT 0,200,2:PRINT L:FOR i=0 TO 2+l*3:LOCATE 3+RND*36,2+RND*22:PRINT"*":NEXT:z=0:WHILE z=0:y=SQR(1):z=TESTR(2,4*INKEY(47)+2):PLOTR 0,0:WEND:SOUND 1,400
3 IF z=3 THEN 2 ELSE WHILE INKEY(18)<0:WEND:RUN
It's longer than the line editor can handle but the final line will still be less than 256 bytes.
You can get rid of the MODE 1 instruction using the Control code number 4, which is produced when pressing CTRL and D. It's a thunderbolt character, and cannot be copy/pasted from PC to CPC.
Absolutely amazing work all :)
Quote from: Jean-Marie on 02:20, 13 December 24You can get rid of the MODE 1 instruction using the Control code number 4, which is produced when pressing CTRL and D. It's a thunderbolt character, and cannot be copy/pasted from PC to CPC.
Oh I did not know that I can concatenate a String with a variable without a semicolon. :-)
Control codes are super convenient to save space and well worth mentioning them as an option. I did not use them here as I wanted to do it in the spirit of a real type-in and control characters have often been a challenge for a type-in.
Quote from: Jean-Marie on 02:20, 13 December 24You can get rid of the MODE 1 instruction using the Control code number 4, which is produced when pressing CTRL and D. It's a thunderbolt character, and cannot be copy/pasted from PC to CPC.
OOh, that was clever.
I remembered the frame flyback call, so this bops along at a decent speed and is editable:
1MODE 1:L=L+1:?L:MOVE 0,0:DRAW 636,0,1:DRAWR 0,160:DRAWR 0,78,3:DRAWR 0,160,1:DRAW 0,398:PLOT 0,200,2:FOR i=0 TO 2+L*3:LOCATE 3+RND*36,2+RND*22:?"*":NEXT:z=0:WHILE z=0:CALL &BD19:z=TESTR(2,4*INKEY(47)+2):PLOTR 0,0:WEND:IF z=3 THEN 1 ELSE RUN
To be really true to the Beeb version, the screen aspect ratio should be 5:4, but that's only for purists
Remember we can write CALL&BD19, all stuck, to save 1 character.
Similarly, IF z=3THEN 1ELSE RUN is valid!
So final short form of Jean-Marie's code, with all extra spaces removed, might be:
1MODE 1:L=L+1:?L:MOVE 0,0:DRAW 636,0,1:DRAWR 0,160:DRAWR 0,78,3:DRAWR 0,160,1:DRAW 0,398:PLOT 0,200,2:FOR i=0 TO 2+L*3:LOCATE 3+RND*36,2+RND*22:?"*":NEXT:z=0:WHILE z=0:CALL&BD19:z=TESTR(2,4*INKEY(47)+2):PLOTR 0,0:WEND:IF z=3THEN 1ELSE RUN
If you use the Arnold emulator under Linux (and possible even then, a very specific version), you can get it to start, auto-type the code and run with:
arnold --autotype='1MODE 1:L=L+1:?L:MOVE 0,0:DRAW 636,0,1:DRAWR 0,160:DRAWR 0,78,3:DRAWR 0,160,1:DRAW 0,398:PLOT 0,200,2:FOR i=0 TO 2+L*3:LOCATE 3+RND*36,2+RND*22:?"*":NEXT:z=0:WHILE z=0:CALL&BD19:z=TESTR(2,4*INKEY(47)+2):PLOTR 0,0:WEND:IF z=3THEN 1ELSE RUN\nRUN\n'
I'm sure that will make the other user of Arnold under Linux quite happy ...