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:
TOPIC TEMPLATE
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>
Summary:
<A brief one or two line summary describing the tutorial>
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]>
General forum rules and guidelines apply too.
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:
TOPIC TEMPLATE
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>
Summary:
<A brief one or two line summary describing the tutorial>
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
Summary:
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.
Tutorial:
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!
Target Platform: All
Download: http://www.host-a.net/u/Mark13673/ObjectCreating.gmk
Links: Original Topic
Summary:
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.
Tutorial:
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: