Chapter 3. Implementing Timers

In this chapter, we will cover these recipes:

  • Implementing a numeric timer
  • Creating a linear timer
  • Implementing a radial timer
  • Creating a mixed timer
  • Creating a well-formatted timer
  • Developing a well-formatted countdown that changes

Introduction

In this chapter, we are going to implement different kinds of timers and countdowns. These serve many different purposes in games, such as indicating to the player how much time he has left to complete a level or after how long he will be able to use a certain ability again. Timers are also a good way for players to experience flow throughout the game. On the other hand, countdowns can indicate how much time is remaining to complete a task, depending on the aspect of gameplay that we are trying to represent with a timer — for example, to let a player know how much time is remaining to complete a task, or how much time has elapsed since the task began. Both timers and countdowns are effective methods of altering the dynamics of gameplay.

We will begin this chapter by seeing how to create a numeric timer. From this, you will learn how to create graphic timers and, finally, how to implement a countdown that changes over time.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.116.50