-2
\$\begingroup\$

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.

\$\endgroup\$
1
  • 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\$ – MichaelHouse Mar 11 '13 at 15:04
3
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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