Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Gamemaker Essentials

You're reading from  Gamemaker Essentials

Product type Book
Published in Mar 2015
Publisher
ISBN-13 9781784396121
Pages 154 pages
Edition 1st Edition
Languages

Drawing information


When it comes to debugging a game, it can often be helpful to draw information to the screen. Things (such as drawing variable values) can be extremely helpful in seeing exactly what is going on in the game at any one time.

Drawing text

As mentioned before, drawing text to the screen can be extremely helpful. While prototyping parts of a game, such as a health system, you could simply draw the health value in text instead of going straight to a health bar.

It's common to see counters when using text to debug games. If we want to check how many of an object exists at any one time, we can draw the number to the screen using the draw_text and instance_number functions. This allows you to see exactly how many instances of an object exist when the game runs.

We can use text to see pretty much anything during a game. Things such as the position of an object to the text the user has entered on the keyboard can all be seen by simply drawing variables to the screen as the game runs...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}