News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_blackdalek

My old Daleks vs. Thals game from 1996

Started by blackdalek, 22:35, 13 March 18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

blackdalek

22 years ago I tried to start making a platform game where you control a Dalek and exterminate human soldiers (the Thals).
I was using BASIC and a sprite RSX utility called Super Sprites by Pride Utilities. I think Super Sprites might have come on an Amstrad Action covertape.

I thought my program was long since lost or deleted, but last night I found it while searching for another demo.
My program is very poorly written and pretty slow. The "game" doesn't actually work because it was never completed.
I only ever got as far as drawing up one screen. A soldier continually runs in from the left of screen. You are the Dalek who enters at right of screen.
There is one elevator. You can move your Dalek left and right and he can ride the elevator up and down and shoot your gun which only has a short range.
The soldier throws a grenade which explodes on contact with the Dalek or any object which isn't background, but it has no effect yet.
Your Dalek can exterminate the soldier, but he just disappears and comes back.

That's pretty much all the program does. It could probably be re-written properly and made to actually do something. Looking back on it now, the sprites I drew up actually look quite nice and the running animation of the soldier is a lot better than I had remembered.

I'll try to copy the relevant files to a dsk later and upload it so that others can look at it and be horrified by the terrible programming :P
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

mr_lou

Sounds like there's an interesting story behind the creation of this, that could be a great "micro 8-bit Memoirs", e.g. for issue #3 of the CPC fanzine by @Skunkfish   :)

blackdalek

#2
post deleted. Never mind. I just discovered how to use |FCP command :P
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

blackdalek

#3
I am kicking myself right now because I left my floppy disk in the 5.25" drive unplugged and sitting next to the CPC monitor for the past 5 days while the monitor was on and I think the magnetic field has destroyed some of the files on my disk. Now the CPC refuses to read the main basic file "Drive A:read fail"  :-[ :( :'(

If I keep hitting "I" to ignore, I can get maybe 50% of the program recovered....

The good news is, my sprites file is still intact and so is the sprites RSX commands file. I will back these up now :)

The bad news is everything in my program after line 640 is lost forever. CPC refuses to read the whole file. I have no back up. I don't remember what was beyond that point in the program apart from some DATA statements which (I think) provided the information to draw up the screen layout with wall sprites etc.
I'm examining the lines of BASIC I managed to recover, to see if I can figure out what the hell I was doing 22 years ago ;). It's  right dog's breakfast of code haha :)

if anyone can suggest some way of recovering unreadable basic files, please tell me.
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

Gryzor

So, Daleks were your thing even then :D


Too bad you went and destroyed it after 20 years, we've all been there one way or the other :( Hope you recover some of it!

blackdalek

#5
I couldn't believe it... I hadn't seen it for 20 odd years. Was sure it was lost. Then I find it by accident, still intact, and in a matter of days destroy it. How could I have been so careless...,  At least my wife got to see it before I murdered it. I am shattered  :'( . I tried half the day to recover the missing data without success. I even tried to look at the sectors on the disk using Dicsology's file & sector editor, but it could not read the last 3 blocks of the file which all resided on track 39 of the disk. Discology kept reporting that "Track 39 unformatted" :(

I haven't done any proper programming in BASIC for 20 years. I am finding it very difficult to "decode" the remains of my program especially since my sparse use of REM statements was not exactly user friendly ;) .

I'm looking at lines of BASIC ...and wondering to myself things like "What the hell is variable cf? And why am I making it equal to fc? And what do the parameters being given to those RSX do? And why on earth did I string all those if/then statements together on a joystick input scanning line?" It's a sorry mess.

Luckily I've found a copy of the Super Sprites manual on CPC-Power site so at least I can figure out that part.

While I may eventually untangle this mess, I still have the problem that at the start of the program I had some lines which READ in a lot of DATA statements into variables to create the single screen level and providing starting positions for player and enemies, but all those DATA lines were at the end of the file and lost forever. I think it will be quicker just to start again from scratch and only reuse my sprite graphics.

I'm devastated. I wanted to show off my sad little attempt at programming a platform game to everyone. Maybe give someone a laugh. Then this happens :(

Here is a little snippet of the part which draws up the level. I've added in some human-readable notes of what I think is supposed to be going on in each line.

100 '***********************************DRAW UP A ROOM**************************
110 MODE 0                         'select mode and clear the screen
120 x=0:y=16                                  'intitialise grid for current room
130 READ t,s:IF t=-1 THEN 210            'read wall (s)prites from DATA until (t)imes=-1
140 FOR i=1 TO t                                'count out (t) (s)prites
150 x=x+8:IF x>160 THEN x=8:y=y+16        'increment the x pos of sprite by 8  until edge of screen then increment y pos and reset x to 8
160 IF s=6 THEN |POS,s,x-8,y-8:|SPRITE,s,0:GOTO 190                'print sprite type 6 (non-destructible wall) at position x,y
170 IF s=2 THEN |POS,s,x-8,y-8:|SPRITE,s,0:lift=1:GOTO 190      'print sprite type 2 (elevator) at position x,y and set the lift flag to 1 (why?)
180 IF s<>0 THEN |POS,s,x-8,y:|SPRITE,s,0        'print sprite of type s at position x,y... I'm guessing if s=0 then that tile is left blank?
190 NEXT i
200 GOTO 130
210 READ thlx1,thly1,thlx2,thly2     ' this get entry points of enemy - I don't know why there are 4 variables when I only had 1 enemy per screen?


And here is the point in the program where the corruption of the disk occurred - midway through line 640...

620 '**********************************Fire Away!**********************
630 IF fc=0 THEN MOVE gunx,guny:FOR i=30 TO 0 STEP -1:SOUND 4,30+(RND*4),1,MIN(15,i):DRAWR 200,0,3,1:DRAWR -200,0,3,1:NEXT i
640 IF tx>gunx AND tx+60<gunx+240 AND ty=guny-


Ironically, the program got "exterminated" exactly on the part which would have covered the firing of the Dalek's gun and target collision routines.
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

robcfg

Well, I'd try with another drive or trying to image the disk with a KryoFlux card and see if it can be fixed.


Anyway, please backup your precious files!

pelrun

To be fair, you probably didn't kill it by leaving it next to the monitor. The disc would already be pretty marginal, and reading it the first time physically disturbed the magnetic coating, causing the later reads to fail.

Unfortunately it's one of those problems you can only really identify in hindsight :(

blackdalek

#8
Quote from: pelrun on 15:17, 18 March 18
To be fair, you probably didn't kill it by leaving it next to the monitor. The disc would already be pretty marginal, and reading it the first time physically disturbed the magnetic coating, causing the later reads to fail.

Unfortunately it's one of those problems you can only really identify in hindsight :(

:o Disks can be damaged simply by reading them? This is not something I've encountered before. My CPC managed to read the file at least 3 times when I discovered it before I unplugged the drive and left it or a few days. I was also surprised that it was unreadable since the drive is encased in a shielded metal box... but I (not being an expert in electronic shielding) just assumed the shielding must not work if the device isn't connected to power....
Or perhaps when the drive powered up with a disk inside, could that have somehow caused damage to the media?
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

pelrun


Well, if the magnetic coating is loose, spinning the drive in the sleeve won't do it any favours.


But your last point is probably even more likely. Old drives didn't do a good job of preventing a pulse from going through the heads when the drive is switched off/on. When I was a kid I was told in no uncertain terms to always take the disc out of my CPC's drive before hitting the power switch. And worse - the head is sitting directly over the last track it read... which contains your game code.


External magnetic fields aren't a real concern. They drop off with the cube of the distance, so just the size of the drive and monitor casing is enough for the field at the disc surface to be well below the sensitivity of the media.





blackdalek

Quote from: pelrun on 04:09, 19 March 18
Well, if the magnetic coating is loose, spinning the drive in the sleeve won't do it any favours.


But your last point is probably even more likely. Old drives didn't do a good job of preventing a pulse from going through the heads when the drive is switched off/on. When I was a kid I was told in no uncertain terms to always take the disc out of my CPC's drive before hitting the power switch. And worse - the head is sitting directly over the last track it read... which contains your game code.


External magnetic fields aren't a real concern. They drop off with the cube of the distance, so just the size of the drive and monitor casing is enough for the field at the disc surface to be well below the sensitivity of the media.
I am certainly going to be more conscious of whether a disk is in that drive or not before I power it up or down in the future, to avoid any more catastrophes.

Sent from my 4013X using Tapatalk

CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

ComSoft6128

#11
Having came back to the CPC after a break of nearly 20 years I feared that most of the 3" and 3.5" discs here would be unreadable. So far from the roughly sixty 3.5's I have looked at four are dead and two are partially damaged - IE not all files can be read or copied to another disc. Of the ten 3" discs checked so far one was a dead parrot with another that initially worked OK failing later. This was better than expected but still a pain. However, this compares favourably with what I considered ( mid nineties ) to be THE permanent storage solution for all my CPC and PCW programs - a Windows 3.1 PC - the HD died after about six years leaving a really bad taste in my mouth. Backup! Backup! Backup!
Now when looking at these old discs I generally copy the files, using ParaDos, to a newly formatted disc before running them. Slow but safe.

Cheers,

Peter

blackdalek

Ok... I know I said I was going to try and repair my BASIC program and upload it, but really, I just don't seem to have the time in my days any more or the patience  :P

So instead, I could just upload the sprite graphic files for you to look at.
They are created using the Pride Utilities Super Sprites program which includes a viewer and RSX commands to use them in BASIC programs.
I don't know if there is another way to view them without that utility.

If someone wants to use them for their own project, that's ok with me, but don't try to make any profit out of them or the BBC will send their lawyers after us  :laugh:

I'll upload these next time my CPC gets switched on.
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

AMSDOS

I like the idea of having a platform style game which uses Elevators, have the Elevator stop at certain places and making a game more hazardous though how you time the Elevator moves. Kind of sounds a bit like "Charlie and the Great Glass Elevator", you don't quite know where you'll end up. :)


If there's intact Sprite and Data files, by all means attach. Perhaps with a simple mockup of the game screen, it maybe possible to reproduce. I haven't done an elevator style game before though, do you remember if the Dalek got stuck in the Elevator shaft? Or how it went if the elevator wasn't where it was? (Sorry I'm very thorough)
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

blackdalek

Quote from: AMSDOS on 08:27, 17 April 18Perhaps with a simple mockup of the game screen, it maybe possible to reproduce. I haven't done an elevator style game before though, do you remember if the Dalek got stuck in the Elevator shaft? Or how it went if the elevator wasn't where it was? (Sorry I'm very thorough)
Keeping in mind that I only ever made one single screen level, the elevator was a simple platform that raised up or down when you pressed up or down on the joystick while the Dalek was on top of it. There was one lift in the screen, and when the Dalek's x,y co-ordinates were in range of the lift so that no part of the Dalek overhung the sides of the lift, the joystick input scanning diverted to a subroutine to move the Dalek and lift together.
I might still have a screen grab of an early version of the screen.
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

AMSDOS

#15
Well this does't exactly move in conjunction with the controls, guess it just needs Dalek and Thals. The elevator in my routine works in with the EVERY statement.


100 MODE 0:INK 0,11:INK 1,26:BORDER 11
110 GOSUB 1000
120 y=15:d=1
130 GOSUB 1020
140 EVERY 10,1 GOSUB 2000
150 WHILE 1
160   oy=y
170   IF y=20 THEN d=-1
180   IF y=10 THEN d=1
190 WEND
1000 LOCATE 11,10:PRINT STRING$(10,154);
1010 LOCATE 1,20:PRINT STRING$(9,154);:RETURN
1020 LOCATE 10,y:PRINT CHR$(154);:RETURN
2000 LOCATE 10,oy:PRINT" ";
2010 y=y+d
2020 LOCATE 10,y:PRINT CHR$(154);:RETURN



CORRECTION: Added 1020 to Correct Line does not exist error.  :)
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

blackdalek

#16
It's been so long since I programmed anything, I don't remember what the EVERY command does. Is it a timer based jump? Anyway, I can easily look it up - I have my original user manual still :)

Attached here should be a screenshot I saved of an early version of the level. As you can see there is one lift in the centre of the screen. It is impossible for the Dalek to fall down the "lift shaft" because the lift only moves when the Dalek is on it. I never got as far as making it possible for the soldier to use the lift, so the lift is always on the level the Dalek left it at.

Also attached is the sprite data file containing the artwork I made.

p.s. - I could not, for the life of me, figure out how to copy my screenshot to a dsk image so that I could load it in an emulator and screen grab a jpg, so instead I have attached it in the original CPC binary format along with a short BASIC loader to set the inks correctly.
"SCRSHOT.BAS" will set the mode and inks and load the 16K image "scren.bin"

edit: another p.s. - The sprites RSX that needs to be loaded to use the DALEK.SPR file is part of this utility here called Super Sprites by Pride Utilities - www.cpc-power.com/index.php?page=detail&num=5838
I do not know if it is possible to use the sprite file with any other app.
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

blackdalek

now can someone tell me how to put the 3 files in that zip into a .dsk image so that I can load them on an emulator? :)
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

tastefulmrship

Quote from: blackdalek on 13:15, 17 April 18
now can someone tell me how to put the 3 files in that zip into a .dsk image so that I can load them on an emulator? :)
ATTACHED...

blackdalek

Thanks @SuTeKH/Epyteor

Now I can take a screen grab picture :)

It looked better on the CTM644 monitor :P ...but at least it is recognizable as a Dalek.
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

Powered by SMFPacks Menu Editor Mod