O'Reilly logo

GameMaker Game Programming with GML by Matthew DeLucas

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

Pushing your buttons

Now that the basic definitions and the syntax of GML have been covered, a simple button will be created to demonstrate some of these concepts. Buttons are a crucial part of most games' user interfaces and have a lot of uses. This button can be re-used in future projects, which allows the creation of custom buttons with just a few lines of code.

Creating the project

Before starting, a new project must be created. Upon opening GameMaker: Studio, a dialog window will open with several tabs. Click on the New tab to create a new project. This project will be named ButtonExample, as shown in the following screenshot:

Creating the project

Gathering resources ...

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