O'Reilly logo

The Game Maker’s Apprentice: Game Development for Beginners by Mark Overmars, Jacob Habgood

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

Chapter 12. GML: Become a Programmer

So far we've controlled the behavior of the different objects in our games using events and actions. These actions let the instances of the object perform tasks when certain events occur in the game. In this chapter we are going to define those tasks in an alternative way: by using programs. Programs define tasks through lines of text called code that use functions instead of actions. This extends the scope of Game Maker considerably as there are only about 150 different actions but close to a thousand functions. These functions give you much more control than actions, allowing you to define precisely how tasks should be performed in different circumstances.

The text in a program needs to be structured in a ...

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