In the previous chapter, we learned about adding the first gameplay elements into our game. Our pirate ship can now shoot cannonballs, and if the cannonballs hit the enemy enough number of times, the enemy ship will be destroyed.
In this chapter, we are going to add user interface elements. Specifically, we will improve our game in the following aspects:
Display and update the health of each ship
Add buttons on the screen
Display text on the screen
So, let's start by adding a visual representation for hit points on the screen.