Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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. – Byte56 Mar 11 '13 at 15:04

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.