Chapter 4. Creating GUIs

In this chapter, we will cover:

  • Displaying a digital clock
  • Displaying an analogue clock
  • Displaying a compass to show player direction
  • Displaying a radar to indicate relative locations of objects
  • Displaying images for corresponding integers
  • Displaying images for corresponding floats and ranges
  • Displaying a digital countdown timer
  • Displaying a countdown timer graphically (5, 4, 3, 2, 1 – blast off)
  • Displaying a countdown timer graphically as a pie-chart style clock
  • Creating a message that fades away
  • Displaying inventory texts for single object pickups
  • Displaying inventory icons for single object pickups
  • Managing inventories with a general purpose PickUp class
  • Controlling the scrollbar with the mouse wheel
  • Implementing custom mouse cursor icons

Introduction

One element to the entertainment and enjoyment of most games is the quality of the visual elements, and an important part of this is the Graphical User Interface (GUI). GUI elements involve ways for the user to interact with the game (such as scroll wheels and cursors), and also ways for the game to present up-to-date information to the user (such as an inventory of what they are carrying, or the location of other objects in the game via a radar screen). This chapter is filled with GUI recipes to give you a range of examples and ideas for creating game GUIs.

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

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