CHAPTER 20

Lives, Level Design, and Old School Scoring

This chapter covers lives for Dottima, the creation of additional levels, and a scoring system. You’ll use the Unity GUI system to display the lives, scores, and any needed text. Also, you’ll put in a game state system to handle messages like “level complete” and “game over.”

So far Dottima is invincible in the game, but that is about to change. You’ll keep it simple, and kill Dottima when she touches a Spiker or a DotRobot. Dottima gets a fixed number of lives, and when she runs out of lives it’s game over.

You’ll create additional levels with the current tile-set. You’ll design the difficulty ramping to make the game easy at first and more difficult for subsequent levels. You’ll also add ...

Get 2D Game Development with Unity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.