Page 1 of 1

BATTLE SHIPS for a trip down memory lane

Posted: Thu Feb 23, 2012 6:05 am
by Cloete
Here's my BATTLE SHIPS program for a trip down memory lane.
Use CLOAD
Due to my Dragon 32's limited memory, I could only fit the following into the code:
Full graphics & sound;
1 Player vs. the Dragon;
Move cursor with arrows;
Shoot with the space bar;
Enemy ships appear after being obliterated;
Your ships disappear after being slaughtered;
The computer randomly places his 4 ships (lengths vary from 5 units to 2 units);
Your ships are also placed randomly (lack of memory);
You get 1 shot - if you score a hit - you'll get another shot (you'll need it);
The computer gets 3 shots at a time; it will never repeat the same shot;
The 12 x 12 grid means the computer should destroy you in max 40 turns;
At the end of the game, press the space bar to start the game again.
Enjoy! Feedback welcome...
Regards, Cloete

Re: BATTLE SHIPS for a trip down memory lane

Posted: Mon Feb 27, 2012 12:15 pm
by Rink
I'm getting an ?FM error when trying to load this with XRoar. Haven't had a chance to try it on an actual Dragon 32 yet though.

CLOADM ""
->
F BATTLE S
?FM ERROR
OK

Re: BATTLE SHIPS for a trip down memory lane

Posted: Mon Feb 27, 2012 1:21 pm
by zephyr
Rink wrote:I'm getting an ?FM error when trying to load this with XRoar. Haven't had a chance to try it on an actual Dragon 32 yet though.

CLOADM ""
->
F BATTLE S
?FM ERROR
OK
The game is written in BASIC. Load the game with CLOAD instead of CLOADM.

Re: BATTLE SHIPS for a trip down memory lane

Posted: Tue Feb 28, 2012 2:10 pm
by Rink
I did try that originally.

CLOAD
->
S
?IO ERROR
OK

CLOAD "" (sometimes returns as above, othertimes)
->
F BATTLE S
?IO ERROR
OK

My system doesn't seem to like that .wav at all. Running XRoar 0.26 btw - I'll try updating and let you know what happens.

Re: BATTLE SHIPS for a trip down memory lane

Posted: Tue Feb 28, 2012 2:13 pm
by Rink
Ok. Works fine on Windows XRoar v0.27 but apparently not v0.26.

All the best.

Edit: Yeah, pretty cool game Cloete. That's a nice version of Battleships there.

Re: BATTLE SHIPS for a trip down memory lane

Posted: Tue Feb 28, 2012 9:45 pm
by zephyr
Rink wrote:I did try that originally.

CLOAD
->
S
?IO ERROR
OK

CLOAD "" (sometimes returns as above, othertimes)
->
F BATTLE S
?IO ERROR
OK

My system doesn't seem to like that .wav at all. Running XRoar 0.26 btw - I'll try updating and let you know what happens.
I have attached a copy of the .CAS file which will work with any emulator. Also included in the archive is a Tandy CoCo version of the game.

EDIT: Attachment removed.

Re: BATTLE SHIPS for a trip down memory lane

Posted: Thu Jun 07, 2012 11:08 pm
by zephyr
Here's a slightly modified version of the game which has been converted to .cas file. I fixed a bug which had crept in during the code size optimization stage, and made a few minor modifications to the code. Both CoCo and Dragon compatible versions are included.