Game Development Reference
In-Depth Information
Implementing Heads Up Display
In order to know what's happening, we need some sort of HUD. We already have crosshair
and radar, but they are scattered around in code. Now we want to display active powerup
modifiers, so you would know what is your fire rate and speed, and if it's worth getting one
more powerup before going into the next fight.
Design Considerations
While creating our HUD class, we will have to start building game stats, because we want to
display number of kills our tank made. Stats topic will be covered in depth later, but for now
let's assume that @tank.input.stats.kills gives us the kill count, which we want
to draw in top-left corner of the screen, along with player health and modifier values.
HUD will also be responsible for drawing crosshair and radar.
Rendering Text With Custom Font
Previously, all text were rendered with Gosu.default_font_name , and we want
something more fancy and more thematic, probably a dirty stencil based font like this one :
Armalite Rifle font
Search WWH ::




Custom Search