Setting up a basic HUD with code
Have you ever played a game and stopped to think, "Gee, I wish I knew what my score was!" No? That's probably because your score, health, and other important pieces of information are presented to you on the screen at any given moment. Now, this isn't the case for all games; of course, but it's true for classic and arcade games. Pac-Man and Mario will always tell you how many lives you have left with because it's important to have this information. Let's take a look at how we can display such information by making a simple game.
Getting ready
You'll need a few things before we can really begin. Firstly, you'll need to create a room called rm_game
. You'll also need four objects: obj_display
, obj_gameControl
, obj_base
, and obj_enemy
. The last two will require sprites. You'll also need to set up a new font. This does not need to be a custom font designed by you. Simply, click on the Create a font button on the toolbar, select the font you wish to use to display...