O'Reilly logo

GameMaker Cookbook by Brandon Gardiner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required