Game Development Reference
In-Depth Information
// draw game over text
renderGuiGameOverMessage(batch);
batch.end();
}
Summary
In this chapter, you learned how to implement the player's character, platforms,
and collectible items in conjunction with a basic yet functional physics simulation
and collision detection code. Nonetheless, it should be mentioned that the physics
simulation as well as the collision detection code both have their limitations. However,
as long as our original requirements of the game do not change, we will be just fine.
Furthermore, we completed the level loader and discussed how jumps for our
player's character work. Two conditions to lose extra lives and reaching game over
were added. The camera's position has been constrained in a way that it will never
follow the player's character below the height of the water. Finally, we added a
GAME OVER text message so that the player receives a visual feedback that all lives
have been used up. The feather power-up also gives visual feedback when collected
and active by displaying a feather icon with a nice little countdown timer that shows
the remaining time for the effect to last.
This concludes the basic implementation of the Canyon Bunny game, which also
means that we have now implemented all the features that we had originally defined
in our outline back in Chapter 1 , Introduction to LibGDX and Project Setup .
In the next chapter, we will create a menu system to enrich the overall
game experience.
 
Search WWH ::




Custom Search