Creating a flappy bird animation

316 views Asked by At

I am pretty new in Java and I am working on my own flappybird game copy. Just teoretically, how would you create the animation of the bird? Should I do it as a compilation of many pictures or is there any Class which could change the angle of the bird when It goes up?

1

There are 1 answers

0
Edwin Buck On BEST ANSWER

In very general terms, I would have an animation (a series of pictures to be played in response to an event and the passage of time).

Then I would set an animation for the object (the bird) and the start time of the animation each time someone presses the space key. Then, as my timing loop advances, I'd check to see if the sprite's presentation needs updated based on the time elapsed since the animation started.

Once the animation has no more sprites to present, I'd go back to the bird's normal sprite.