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

Scripting obj_main_menu

As mentioned earlier, there are six events utilized by obj_main_menu. Many of these scripts appear to be rather lengthy; the reason for this is that when using the Draw events, just as when we create particle effects, there are many parameters that should be defined in advance.

Before creating these scripts, the contents of the main menu should be explained. We have this menu so that the player can adjust the following four main parameters of the puzzle game:

  • Number of columns
  • Number of rows
  • Number of pieces
  • The length of time played

In obj_main_menu, the adjustment of these settings will be done using four pairs of buttons, one button to decrease the value, and another to increase the value. A ninth button will be created that, ...

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