PDA

View Full Version : Space Invaders help


christian_s
12-07-2007, 01:53 PM
For training purposes, I'm making yet another version of this classic arcade game. I'm having an issue, with the movement of the 55 aliens in the game.

I have isolated the code for the alien movement, into this file:
http://www.actiontime.dk/spaceinvaders/index.html

Fla can be downloaded here:
http://www.actiontime.dk/spaceinvaders/si4.fla

The problem is, that the lower row of aliens, is beeing misplaced, when the cluster of aliens are changing direction - resulting in complete misplacement of all the aliens.

Can someone spot the problem?

By the way, the button 'FJERN ALIEN' means 'REMOVE ALIEN' in English.
The function of this button, is to remove aliens row by row, to check if the alien movement script, is performing correctly, while the number of aliens decreases.

But why does the lower row of aliens, get misplaced on the x-axis, on change of direction???

rrh
12-07-2007, 04:07 PM
Code you post some of the code as text? I can't open your .fla

rrh
12-07-2007, 04:14 PM
But actually, you probably are making things too complex. One of the things that was clever about the original Space Invaders was that it had so many enemies with limited resources. It could do this because every frame, only one creature moved. And it didn't need to keep track of the location of every single creature, because the group moved as a whole.

jaredy
04-24-2008, 05:03 AM
Just thought I'd share something that I got working.

http://jared.simplistika.com/actionscript-3-space-invaders/