I am making a Galaga-like game. How can I make the ship fire gunshots? What logic do I need to make it work? I am using libgdx to develop the game. I have gotten the ship and an enemy on stage, but I have ran out of ideas for making the ship fire.

  • 3
    \$\begingroup\$ I suggest you find a tutorial on the subject and follow it. It's a little too extensive for a question/answer here. You can also check out the FAQ and learn where you can ask "getting started" and discussion oriented questions. Since any answer to this question is likely to be too high level to be of use to you. \$\endgroup\$
    – House
    Mar 11, 2013 at 15:04

1 Answer 1


So you have managed to spawn a Ship and an Enemy?

If so, creating a shot is simple. Simply spawn another Object like the Ship and Enemy, that (for starters) moves forward very fast and gets destroyed on impact.

The program does not care if it is a Ship, or a bullet. All it wants is to move stuff around and do logic.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .