Book Image

Sparrow iOS Game Framework Beginner's Guide

By : Johannes Stein
Book Image

Sparrow iOS Game Framework Beginner's Guide

By: Johannes Stein

Overview of this book

Table of Contents (20 chapters)
Sparrow iOS Game Framework Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Afterword
Index

Chapter 7. User Interface

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.