Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gamemaker Essentials

You're reading from   Gamemaker Essentials Learn all the essential skills of GameMaker: Studio and start making your own impressive games with ease

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784396121
Length 154 pages
Edition 1st Edition
Arrow right icon
Toc

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 $19.99/month. Cancel anytime