Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
3  
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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

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.