The source code
- Code:
-
// Hello World In GML
show_message("Hello World!");
keyboard_wait();
game_end();
What does it all do?
- Code:
-
// Hello World In GML
This is a comment - it doesn't get executed.
- Code:
-
show_message("Hello World!");
This function creates a pop-up box with the text inside the string. show_message() is known as a function.
- Code:
-
keyboard_wait();
A function which makes the program wait until the user presses any key before it goes onto the next instruction.
- Code:
-
game_end();
Does exactly what it says - ends the game. In other words, terminates the program.
How do I compile it?
To use GML, you need to download Game Maker - the lite version is free. When you have installed it, just create a room, and put the source code in the room creation code (under "settings").