How to generate moving schemes for sprites

Harkonnen 101 Mar 08, 2011 at 09:02


Do you know a very old game called Galaga ? It’s a shoot’em’up in which enemy waves come from the top of the screen, and do a dance before reaching their final position.

I’m developing a clone of that game for Android, and I wonder if there’s a tool or a method I could use to generate the coordinates used for the “dance” of my enemy sprites.

You can see this game here :

Thanks in advance

3 Replies

Please log in or register to post a reply.

rouncer 103 Mar 08, 2011 at 12:38

Well, that was actually a pretty classy arcade effect.
Its not easy to code… you could try a lot of different ways.

The way id do it is id start the aliens off in an entry state, where they fly into position and curve around a bit, then they go in formation state, then they would go from formation state back to exit state, which then goes to entry state then back to formation state again.

And just code it like I would a multiple state ai virtual machine.

Im sure even some movement programming / movement recording could be useful too, so you could go down that way maybe also.

TheNut 179 Mar 08, 2011 at 13:44

Ahh, the good old days. Fond memories.

The movement of the aliens when they are introduced is probably best done using Bezier paths. It will give you fine grained control versus trying to work with and manipulate spirals and circular curves, which I’m guessing is what the original author did.

When the aliens fly towards the ship, it looks like you could start it off with a random downward direction vector. Add a random probability the alien will swing around in a circle (using sin and cos) as it nears the ship’s horizon before it disappears off the screen and returns to its normal position.

Harkonnen 101 Mar 08, 2011 at 15:57

Thank you for your answers, they are very interesting to read :D

My first idea was actually to use movement recording to generate some coordinates. But I have no idea about the tool to use for that purpose. Maybe you know such a tool I could use ?

But Bezier Curves is a good idea too, although I think that the author could have never use them in early 80’s :)