Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Space Invaders Help

Author
Message
outSync
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location:
Posted: 17th Oct 2003 00:54
I will admit that I'm a newbie, and I'm having trouble with my Space Invaders clone...

Anyways, I've got ship movement and alien movement pretty much down, as well as bullet firing (I haven't done the aliens yet). Anyways, I'm having a little trouble...

My code isn't that great, but I'd still like to ask a few questions (if you want the code posted, I'll comply).

I want to absolutely mimic the Space Invader's alien movement. I'm having a little trouble copying this, so if I could have some help with that.

Anothing thing is going to the next level. I'd like to just start on a clean slate with a new subroutine for each level. I'm not sure if this is the best way to do it...but anyway...

Thanks for any help!
-VariableS

2D Fan/Addict/Programmer
KNau
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: Canada
Posted: 17th Oct 2003 03:37
I wouldn't recommend creating a new subroutine for each level. I know it seems easier when you are starting out (it's what I used to do) but it's a bad practice and ultimately means more work for you.

Create one generic loop or subroutine for the entire game and then figure out what changes for each level. Make those changes something you read in through data statements or from an external file.

http://www.canceriannewmedia.com
Social Disease
20
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 17th Oct 2003 03:46
For the enemy movement what I would do is write script files for the different types of aliens. These could be easily loaded, and it makes alien behavior flexible even after the game is compiled.

The scripts contain a series of characters that denote an action. For example: d = down, l = left, r = right, u = up, w = wait... so forth.

Just make sure there is enough commands in the script for the alien to completly move off the screen.



So many games... so little time!

Login to post a reply

Server time is: 2024-09-21 06:53:40
Your offset time is: 2024-09-21 06:53:40