Game Development Reference
In this chapter, we will cover:
F Displaying a bar for the player's health
F Drawing text for the player's health
F Displaying a bar for the player's ammo
F Drawing text for the player's ammo
F Drawing the player's name on screen
F Creating a crosshair
A heads-up display, or HUD, in addition to providing a user interface (UI), offers a means
of providing information to a player to allow them to interact with the game world.
UDK offers two methods for creating a HUD. The first and most simple method which
we'll be covering here is Canvas. The other method, which requires knowledge of the
flash language ActionScript and some fancy art skills, allows UDK to make use of a
third-party tool called Scaleform to draw the HUD.
Scaleform is probably what you see in most TripleA games, as it offers a far more impressive
and professional aesthetic, albeit at a greater time commitment, in addition to an expensive
suite of tools. There are a number of free flash editors available, however, including Ajax
Animator, FlashDevelop, and Open Dialect.