Summary
In this chapter, we learned about the specialties of the modern mobile device. We created a Space Fighter game to try it out. We gained access to the device's accelerometer to detect when it is rotated. This gave our spaceship the ability to be steered. We also made use of the touch screen to give a player the ability to shoot enemies in the game. Because we wanted an infinite amount of space to fly through, we had to make it all without the player moving. Instead, everything else moves around the player, faking the player's movement. It also required a system that continuously spawned new enemies and obstacles around the player, allowing us to keep flying and finding new things to play with.
In the next chapter, we will be taking a short ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access