• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

OFFICIAL Tutorial Guidelines and Template


Friendly Tyrant
Forum Staff
Here you can post tutorials that you have written or recorded for everyone in the community to learn from. All tutorials must be free and threads posted should follow the template given below. Code should use semicolon line termination and appropriate indentation. And it should have sufficient explanatory comments. This improves code readability and promotes good coding practice. Check this pinned topic below for some examples.

This forum is moderated, meaning that after posting your thread it will not be visible until a moderator approves it. Threads that do not use the provided template, or use poor coding practices, or that the staff find inappropriate or of little use will be removed and an alert sent to the user to inform them.

Below is the Thread template that must be used when creating a new thread. It is designed to make it easier for both users and staff to see what the tutorial is about and give easy and immediate access to links and downloads:


GM Version: <Version Of GM used to make the tutorial>
Target Platform: <Target platform/s (iOS, Android, etc...) for the tutorial. Use ALL for general tutorials>
Download: <Direct link to the download or the Marketplace. Use N/A if there is no download>
Links: <Additional links for videos or extra information. Use N/A if not applicable>

<A brief one or two line summary describing the tutorial>

<The main body of the tutorial. If the tutorial is a video then it should go here, embedded using the Media button in the editor or the bbcode [MEDIA=youtube]oHg5SJYRHA0[/MEDIA]>

GM Version: GM7
Target Platform: All
Download: http://www.host-a.net/u/Mark13673/ObjectCreating.gmk
Links: Original Topic

This tutorial is basically an RTS building example aimed at teaching you how to use Parents, create buttons, use global variables, and permit user interaction.

The example itself should be good for beginners in GML as I have taken the time to comment every single bit of code so that at all times you can open an object and see exactly what it does, what it's for and how it does what it has to do. So if you are just starting in GML then this may be a bit complex but with a bit of reading of the manual and a bit of practice I'm sure that you will get it!

In this example I have made three button objects that, when pressed, create a mask object. This object uses the sprite of the instance to be created (given to it by the button object) for collision checking so that the player can see precisely where he can and cannot place the selected building. In the above screenshot, you can see that the mask object on the left is red to indicate that the building cannot be put there. This is because by giving the mask object the sprite of the object that we wish to create, we can then do precise collision checks using that sprite and have image_blend change the colour of the sprite if there is a collision.


The buttons themselves are three different objects, but they share a common parent. What is a parent? Well, it is a special object that...

<SNIP - further tutorial text...>

So that's it! A simple example but with lots of juicy details that I hope helps everyone who downloads!

General forum rules and guidelines apply too.
Last edited:

Let's Clone

A video tutorial of mine was removed because I did not terminate my lines of code with a semicolon. I don't understand the issue with that, but I'm happy to make the correction.

Would it be possible for you to update the template/guideline to mention this detail? As GML does not require semicolons, it was a big surprise to see my post be taken down for this reason and I think it would be nice for others to know ahead of time.

- Steven French


predictably random
Forum Staff
As we discussed by PM, you changed your project file to include semi-colon line termination, so I approved your post. Thanks for the fast response.

And your suggestion about more explicit guidelines is a good one. I'll discuss this with Nocturne.

EDIT: The guidelines have been updated.
Last edited: