Login | Register

Introduction

August 23, 2006, 10:42 by Calle
[loading]
-->
Using GML
Game Maker is known as the easy option to heavy languages, such as C or Delphi. It has gone so far that Game Maker users often aren�t even considered programmers. This crash course is meant as a fast way to unleash the true power of Game Maker, which is hidden inside its very own language; GML. After have taken this course no one can ever deny you know how to program.

GML is a highly competitive language in a lot of areas relating to easy game design and programming. Its main advantage is that the games are both easy to set up and hardly ever fails at compilation, thanks to Game Maker. The combination of this makes it a very good language for programming beginners. The flexibility though, makes it very useful even for experienced programmers. When you have finished the crash course, you will be able to face the real things and create your game just as you figured it in your head, just as the experienced ones.

Some fast facts
GML can be executed from any object in any event. There are two ways to input GML; either through the Drag & Drop action Piece of code, or in a script which is executed also even from an Drag & Drop action or from a Piece of code.

To add comments to your scripts, that is, text that won�t be executed, you simply add // in front of that specific text and the rest of the line will be commented. Another way is to use /* and */ simply exemplified like this:

//This text is commented and won�t be executed
This text will cause an error as it will be executed
/*
This text won�t cause an error because it is also commented
*/

Now any code here and below are not commented.


I also want to bring up the question about proper grammar. Game Maker is not at all as strict as most other programming languages. For an example, those of you who have earlier tried languages like PHP will want to put semicolon at the end of your lines, and this is the proper grammar in GML as well although it is not necessary. GML is very forgiving and theres a lot of grammar mistakes that you can do which the program will just ignore. However, if you intend to show your code for others you must be careful to do the right indention and put the semicolons at the right place, or others might consider you a beginner no matter how smart your code is.

Comments

Loading comments... [loading]
.
Users logged in:

game maker articles, game maker examples, game maker tutorials, gmtutorials, game maker questions and answers, game maker crash course, how to create games