Discuss My Space Invaders Clone in the Game Development forum on Dev Shed. My Space Invaders Clone Game Development forum covering non language specific programming - game creation, design, modding, theories and math. A place for developers and gamers of all levels to discuss and debate all things involved in game creation and modding.
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,387
Time spent in forums: 1 Month 4 Weeks 1 Day 21 h 39 m 3 sec
Reputation Power: 4080
My Space Invaders Clone
Here's a blast from the past. Bear in mind that the code quality may be slightly dismal since I'd only learned some Java about a few hours before banging out the code. This was written almost 10 years ago and written for Java 1.0, since that was the only compiler available then. The indentation is a bit funky since the code was written in an editor that didn't convert tabs to spaces correctly.
The code is liberally commented because I was going to write a tutorial around the program, but never got around to it. Anyway, have fun folks!
__________________ Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,387
Time spent in forums: 1 Month 4 Weeks 1 Day 21 h 39 m 3 sec
Reputation Power: 4080
It isn't meant to shoot all the time. Only one of your shots can be active at a time (it's in the instructions ). This is similar to the original space invaders game which also allowed only one shot to be active at a time.
Also, the enemy's shot is the same color as your shot and is dropped by one of the higher aliens, so it does pass through the others.