New version of Space Invaders (was: BASIC Space Invaders)

new games to be launched and discussed here
avtovaz
Posts: 34
Joined: Wed Jan 18, 2017 5:09 pm

Re: BASIC Space Invaders

Postby avtovaz » Tue Feb 07, 2017 8:21 pm

tricky , right ill have a read! thats interesting!


syd, thats exactly the lessons i wanted! i just did the first part with 3 coloured blocks, and i can see a,x,y now ill work threw this and hopefulyl till make sence!

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Tue Feb 07, 2017 10:53 pm

Sorry the code in this is so poorly laid out, I was writing it for a BASIC programming competition, but BASIC just isn't great for 50fps arcade games.

Added a moving player ship (Z,X) and bombs killing you, although they just STOP the program for now and I think it can kill you without hitting you but I haven't debugged it.

I hope that even though the code is not great, it is giving an idea of how I approach writing a game.
I usually write the technical bit that proves the game can be done (not necessary here), and turn that in to something visually appealing, so that I feel motivated to continue. I then just add things as I think of them, trying to balance getting bored with not leaving all the boring bits to the end.
I try to put in placeholders for things that will come later that may be a pain to add then, this isn't always the most productive way, but can help prevent coding yourself into a corner (like Phoenix) where there is a lot that needs re-writing to "do it properly".
Attachments
BasicInvaders.zip
(10.93 KiB) Downloaded 25 times

Tom_Lindberg
Posts: 75
Joined: Sat Jun 18, 2016 11:33 pm
Location: Sola, Norway

Re: BASIC Space Invaders

Postby Tom_Lindberg » Wed Feb 08, 2017 7:36 pm

avtovaz wrote:tricky , right ill have a read! thats interesting!


syd, thats exactly the lessons i wanted! i just did the first part with 3 coloured blocks, and i can see a,x,y now ill work threw this and hopefulyl till make sence!


And if you want a book I can recommend 'Discovering BBC Micro Machine Code' by A. P. Stephenson. A very pedagogic introduction for beginners. A joy to read! You can find a scan of it halfway down on this page:

http://www.8bs.com/othrdnld/manuals/publications.shtml

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Wed Feb 08, 2017 10:03 pm

Small update tonight, sorry.
You can now shoot (RETURN) although you can't hit anything :lol: and occasionally a bullet gets left on screen at startup.
Attachments
BasicInvaders.zip
(11.45 KiB) Downloaded 29 times

fuzzel
Posts: 208
Joined: Sun Jan 02, 2005 1:16 pm
Location: Cullercoats, North Tyneside

Re: BASIC Space Invaders

Postby fuzzel » Thu Feb 09, 2017 9:18 pm

Tom Lindberg wrote:
"And if you want a book I can recommend 'Discovering BBC Micro Machine Code' by A. P. Stephenson. A very pedagogic introduction for beginners."

Thanks for the link to the bbc books scans Tom. There are a few adventure writing books which I'll be sure to read.

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Sat Feb 11, 2017 6:09 pm

Sorry, I had to go to assembler and beebasm, I guess I'm just too used to the modern comforts.
Asm and data included, so that you can see how what was left as BASIC has converted to asm.
I haven't quite finished converting it, things like the ship is hidden until you move, but you get the idea.
All the nice easy bits like drawing the text on the screen are missing as it is a bit more of a faff to put them back, but I will eventually.
I've also started to re-expand some of the variable names, now that I don't run out of memory assembling.
The code should be "legal" except the direct access to screen memory, but that should be compatible.
When finished, it should be an easy port to the ATOM (but not by me) and should be "snow free", don't know about the Electron.
Sorry for all the woffling and for starting a game that we really didn't need!
Attachments
BasicInvaders.zip
(9.43 KiB) Downloaded 35 times

User avatar
dhg2
Posts: 51
Joined: Tue Oct 25, 2016 7:37 pm

Re: BASIC Space Invaders

Postby dhg2 » Tue Feb 21, 2017 10:42 pm

Cool stuff. Where's the BASIC competition being held? I searched the forum but couldn't seem to find it.
Regards,
- Patrick

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Tue Feb 21, 2017 11:22 pm

I can't find it myself now, I'll have another look tomorrow!

avtovaz
Posts: 34
Joined: Wed Jan 18, 2017 5:09 pm

Re: BASIC Space Invaders

Postby avtovaz » Sun Mar 05, 2017 9:07 pm

stillquite nerw to using the mmb files etc

i used linux so i opened oracle box to run windows, and then opened teh mmc file programs.

I dragged and dropped invaders ssd onto a disk and then put it into the bbc. It just says bad program after its loaded in.


I put elite onto another disk too ad that does the same.

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Sun Mar 05, 2017 11:07 pm

You could try dragging a copy of the mmb and running it in an emulator, so at least you know the image is OK.
You could also try creating a disc on the beeb, writinga file to it and seeing if you can read it on the Mac.
I still have quite a bit of work to do on invaders and am currently sidetracked completing some 30 year old line drawing routines.

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Tue Mar 28, 2017 8:05 pm

Did a bit on the attract screen, loosing lives and game over tonight - new wave isn't initialised properly after game over.
You can shoot, but can't hit anything and the aliens are not very good shots!
No sound, no spaceship etc either!
Z,X and RETURN to start and fire (harmless bullets)!
Attachments
game.zip
WiP
(2.94 KiB) Downloaded 28 times

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: BASIC Space Invaders

Postby FourthStone » Wed Mar 29, 2017 2:09 am

Coming along nicely Tricky =D>

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Wed Mar 29, 2017 9:55 pm

I was just adding hitting aliens, when i realised that i had over optimised the storage and iterating of the invaders. What i did make it harder to find which invader was hit and whicho invader should​ shoot and very tricky to not mess up when you shoot the alien just moved or just about to move.
That is what comes of trying to make it fast enough in basic. It is more frustrating, because things were going very quickly as i wasn't having to skrimp on memory like i usually have to.
Oh well, on holiday next week so i might get something done then.

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Fri Mar 31, 2017 10:03 pm

Another little update tonight, now you can shoot the aliens and they explode with about as close as I can get to the explosion sound (so, not very close :lol: )
If anyone has a sounds that match those in the arcade game, I would be pleased to include them, with a credit if you like.
As this started out as a BASIC game, I'm trying to be legal, so a series of sound statements is fine, even an envelope should work!

If you clear the level, you will be rewarded with the game crashing :lol:
Z, X and RETURN
Attachments
game.zip
(3.18 KiB) Downloaded 24 times

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Sun Apr 02, 2017 6:32 pm

Added a few sounds effects, still no saucer and after the first level, you can get invisible bombs.
No joystick support yet, still Z,X and RETURN.
I haven't really checked for bugs and attract mode still needs sorting.

EDIT: disk image added, sorry.
Attachments
BInvaders.zip
(3.28 KiB) Downloaded 38 times
Last edited by tricky on Mon Apr 03, 2017 7:26 am, edited 2 times in total.

User avatar
Arcadian
Posts: 2806
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: BASIC Space Invaders

Postby Arcadian » Sun Apr 02, 2017 7:32 pm

No attachment Tricky!! ;)
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug NORTH (Manchester) (19-21 January 2018)
ABug SOUTH (Hampshire) (1-3 June 2018)

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Mon Apr 03, 2017 7:55 am

Sorry, added above.

User avatar
timmy
Posts: 157
Joined: Thu Apr 27, 2006 12:19 pm

Re: BASIC Space Invaders

Postby timmy » Tue Apr 04, 2017 11:33 pm

Excellent stuff Tricky!

User avatar
Kecske Bak
Posts: 676
Joined: Wed Jul 13, 2005 7:03 am
Location: Treddle's Wharf, Chigley
Contact:

Re: BASIC Space Invaders

Postby Kecske Bak » Mon Apr 10, 2017 6:20 pm

Wonderful stuff. I had a play with this yesterday and I'm really impressed. The thing that always interests me about tricky's games is they never look like they are running on a BBC, which is something almost unique as usually you can tell straight away if a game is running on a Beeb.

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Tue Apr 11, 2017 6:47 am

Thanks, i think that is helped, by being in mode 1 with palette switching giving more than 4 colours.
For this game, it doesn't do any tricks and even the font is just the beeb font shifted one pixel and anded with itself.
I guess that using the original graphics and animations and running in a portrait resolution gives a feel of the original game and helps the suspension of disbelief ;)

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Wed Apr 12, 2017 5:33 pm

Another small update, I wish I liked this game more!

TODO:
    spawn saucers
    disallow invisible bombs
    clear bombs and explosions after death
    end game when squashed
    GAME OVER
    improve sounds
Any other suggestions?
Attachments
BInvaders.zip
(3.58 KiB) Downloaded 20 times

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Fri Apr 14, 2017 9:02 am

Tidied up a bit, still doesn't end when you get "landed" on.
It is actually starting to feel like Space Invaders now.
Attachments
BInvaders.zip
(3.66 KiB) Downloaded 22 times

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Fri Apr 14, 2017 8:07 pm

Improved attract mode and added an abrupt end of game if the invaders "land".
screenshots.png
Attachments
BInvaders.zip
(3.69 KiB) Downloaded 29 times

User avatar
PitfallJones
Posts: 431
Joined: Fri Feb 22, 2008 3:44 pm
Contact:

Re: BASIC Space Invaders

Postby PitfallJones » Sat Apr 15, 2017 1:38 am

Wow! This is absolutely amazing! (Apart from from the fire sound that sucks)
- it made me remember the first time I ever played it which was on one of those cocktail sitdown machines...
Love how you've done the colours (the original was monochrome with the colour overlay as I remember ...)

Please, Please, Please do Lunar Rescue (Not Lander!) next... that was the other cocktail one I used to play...

PJ

P.S. The upside down Y stuff is a lovely attention to delail....

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: BASIC Space Invaders

Postby FourthStone » Sat Apr 15, 2017 3:42 am

Really looking good Tricky, always amazes me that it can take months to do all the final polishing but when done well the results are amazing and worth all the effort, well done sir =D>

Now to get back to procrastinating on my projects... :lol:

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Sat Apr 15, 2017 7:46 am

Can anyone think of a beeb game with an appropriate sound effect for the firing noise in Space Invaders?
Any game on any platform using the beeb's SN76489 will probably do.
I tried for many hours to get the high pitched whistle right, but just couldn't do it (sound is definitely one of my weakest points).

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Sat Apr 15, 2017 9:50 am

OK, less horrible shooting sound effects, hopefully reminiscent of the real thing.

EDIT:
I did look at lunar rescue, as I know someone else who likes it, but wasn't sure how popular it was.
Lunar Lander is on the list, but quite a way down!
Lunar rescue looked good for an emulator like my Sprint, Circus and RipCord beeb emulators, but not being a 6502 game, it would be too much work.

Another problem with lunar rescue is that I'm not very good at it and would have to rely on youtube video to get the game play correct!
Attachments
SpaceInvaders.zip
(3.72 KiB) Downloaded 26 times

User avatar
FourthStone
Posts: 400
Joined: Thu Nov 17, 2016 2:29 am
Location: Melbourne, Australia

Re: BASIC Space Invaders

Postby FourthStone » Sat Apr 15, 2017 10:26 am

All I hear when shooting is a high pitched squelch which lasts as long as the bullet is alive.

This vid has the closest sound I've heard, the game even has the upside down Y being fixed by the invader.

https://www.youtube.com/watch?v=LTyozRUeWKo

Sounds like a gas valve being released maybe?

Don't have any sounds for you other than that sorry :oops:

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Sat Apr 15, 2017 12:25 pm

I have the original sound, but it is proving very hard to reproduce with the beeb's sound chip.
My partner asked me why I didn't just download a WAV and play that :roll:
I may actually have to do that, although it would go against trying to make an OS "legal" game (apart from screen memory access of course).
The current sound is basically

Code: Select all

SOUND 0,-4,  7,15
SOUND 1, 0,255,15
SOUND 3,-2,240,15
I was looking for a game with a similar sound effect and similar hardware to the beeb (so I could steal it) but can't find any.
I may try the speech chip as that may have something appropriate, or I do have lots of CPU cycles spare, so playing a sample isn't out of the question (but it does seem like overkill).

User avatar
tricky
Posts: 1918
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BASIC Space Invaders

Postby tricky » Tue Apr 18, 2017 9:02 pm

OK, here it is, only tried it on b-em and beebem in model B mode.
Full source (beebasm, thanks RichTW) is included, loading screen (partially converted with image2mode7, thanks kieranhj), and graphics as EQUB statements; copy the data to screen memory to visualise it.
Joystick and keyboard supported, it isn't polished, but is actually growing on me, so it may get revisited later.
I usually score a little over 3600.
I will fix any bugs or compatibility issues reported.
Richard

URL:http://youtu.be/N3TK3CLQCRA
Attachments
Loading.png
SpaceInvaders.zip
(15.81 KiB) Downloaded 31 times
Last edited by tricky on Tue Apr 18, 2017 9:34 pm, edited 1 time in total.


Return to “software: new games”

Who is online

Users browsing this forum: No registered users and 1 guest