Game Development Reference
In-Depth Information
Chapter 11
Enhancing The User Experience:
GUI and Sound
The term video game is used to describe games that are played via a video monitor or screen
of some sort. Early video games were limited to text and keyboard characters on monochrome
displays, but they have since evolved into complex game experiences that use 3D imagery, stereo
sound, and—depending on the platform—motion detection and sensory feedback capabilities.
The Graphical User Interface or GUI is a visual overlay that assists the player by communicating
information including score, inventory items, and maps, and also can provide additional means for
the player to interact with the game.
Sound is also crucial to a robust and rich game experience. Music is used to set the mood of the
game; to communicate hints and information regarding gameplay to the user using (anything from
simple sounds to narrative dialog); or, as sound effects, to augment the corresponding visual action
ensuing on the monitor.
Creating GUI Controls
Creating and using GUI controls is accomplished through scripting and the OnGUI() function. While
you can add GUI scripts to any game object or GUI code to any script, keeping them organized
makes it easier to edit, update, and troubleshoot your project. In the Unity editor top menu, select
GameObject ➤ Create Empty and name it GUI. Like the Directional Light and Audio game objects,
the precise Transform position is not important. The GUI controls you create will be displayed based
on the screen coordinates you designate for them rather than the game world coordinates of the GUI
game object.
303
 
Search WWH ::




Custom Search