Jump to content


Photo
* * * * * 4 votes

Easy-To-Learn Gml Tutorial


  • Please log in to reply
155 replies to this topic

#1 General Leo

General Leo

    Master Gamer

  • GMC Member
  • 976 posts
  • Version:GM8.1

Posted 23 August 2005 - 06:10 AM

  • Title: GML Tutorial
  • Description: Teaches D&D users how to use coding instead.
  • GM Version: GM6 or higher
  • Registered: Not needed
  • File Type: .rtf ("notepad" or "write" file -- open with any text editor)
  • File Size: ~191KB
  • File Link: HERE

 

Additional Info

If you know D&D (Drag and Drop) or at least the basic structure of game making, this tutorial will teach you how to easily advance into scripting your own GML (Game Maker Language) scripts with no previous experience! Hundreds of people now have PMed me or emailed me their success stories. My Easy-to-Learn GML Tutorial is the best out there because I teach as if you have no experience which helps ANYBODY understand scripting. I guarantee if you have a basic understanding of game making, you'll learn GML by reading my tutorial! Keep in mind scripting GML can be learned in a matter of minutes but takes years to fully master.

Also, as stated in the tutorial, this tutorial is meant to teach scripting for GM6, or higher and may not be completely correct for GM5.3 or below.

Search Tags


  • GMCTUTORIAL
  • GMCGML

Edited by General Leo, 23 September 2014 - 04:42 PM.

  • 5

My BEST and most simple GML tutorial: Easy-to-read GML tutorial

Message me if you'd like FREE unlimited space to upload your games and files.


#2 General Leo

General Leo

    Master Gamer

  • GMC Member
  • 976 posts
  • Version:GM8.1

Posted 17 September 2005 - 07:57 PM

updated to version 5.1 which has some small corrections and improvements. It really helps when people PM me and tell me what they think!


If I get many more PMs, I may even make a tutorial on d&d or maybe one for flat out first time users for GM. Tell me what you think.
  • 0

My BEST and most simple GML tutorial: Easy-to-read GML tutorial

Message me if you'd like FREE unlimited space to upload your games and files.


#3 Dragonfist028

Dragonfist028

    GMC Member

  • New Member
  • 69 posts

Posted 12 December 2005 - 04:52 AM

Great piece of work! any chance you could explain the switch and loop statements? Tnx in advance!
  • 0

#4 General Leo

General Leo

    Master Gamer

  • GMC Member
  • 976 posts
  • Version:GM8.1

Posted 03 January 2006 - 07:25 PM

Great piece of work! any chance you could explain the switch and loop statements? Tnx in advance!

<{POST_SNAPBACK}>

Maybe, I'll think about it. :)



Now updated to version 5.2. I added a few more scripts and made (what I think) to be the last grammer and spelling mistakes.

I've also updated my email address and site at the bottom. My new site is PixelPerfectGames.com which is getting a MAJOR facelift soon.

Enjoy the new tutorial version!

Edited by General Leo, 13 February 2006 - 04:40 PM.

  • 0

My BEST and most simple GML tutorial: Easy-to-read GML tutorial

Message me if you'd like FREE unlimited space to upload your games and files.


#5 Dragon2007

Dragon2007

    GMC Member

  • New Member
  • 1 posts

Posted 10 February 2006 - 10:44 AM

anyway u can add the tutorial in text or microsoft works format?
  • 0

#6 General Leo

General Leo

    Master Gamer

  • GMC Member
  • 976 posts
  • Version:GM8.1

Posted 13 February 2006 - 04:43 PM

Guess what people, I worked on it even more! I included an updated font_add_sprite sprites incase any of you are actually using the old one. I found out the rest of the symbols and stuff so all the most common ones are included now.

I also made a ton more changes all over the place. Soo glad this is helping so many people. B)

Keep those PMs and emails comin.

I've had many people ask me to add multiplayer and 3D codes to my tutorial. I want to remind you all this is a beginners guide to learning GML, adding things like that would only confuse people more then they are before reading my tutorial.

Maybe I'll make an advanced GML tutorial? PM me if you think I need to write one. I just might make one if I get enough requests.
  • 0

My BEST and most simple GML tutorial: Easy-to-read GML tutorial

Message me if you'd like FREE unlimited space to upload your games and files.


#7 Sir Kildar

Sir Kildar

    GMC Member

  • New Member
  • 80 posts

Posted 13 August 2006 - 02:55 AM

anyway u can add the tutorial in text or microsoft works format?

<{POST_SNAPBACK}>

[COLOR=orange][SIZE=7][FONT=Impact][U][I][B]
Dear G-leo
This tutorial RULES!!!! :P
i am now able to progress on my game series (MOI, a.k.a Myths of Inkorta :) ) by adding arrow types and quantities, creating bars that when they reach a certain level can increase the players health, making enemy healthbars, allthanks to you! :D there is one problem.... i am not very good at text :P , i have looked around and not found 1 single thing that does codes as text, i will be able to make small text boxes but not very professional! :P please, please,PLEASE! put on something that could help me with my text problems,
S.Kildar
p.s. Did imention i couldn't understand GML language until now!
  • 0

#8 jc84144

jc84144

    GMC Member

  • New Member
  • 78 posts

Posted 24 December 2006 - 02:27 AM

anyway u can add the tutorial in text or microsoft works format?

<{POST_SNAPBACK}>

[COLOR=orange][SIZE=7][FONT=Impact][U][I][B]
Dear G-leo
This tutorial RULES!!!! :P
i am now able to progress on my game series (MOI, a.k.a Myths of Inkorta :( ) by adding arrow types and quantities, creating bars that when they reach a certain level can increase the players health, making enemy healthbars, allthanks to you! :P there is one problem.... i am not very good at text :D , i have looked around and not found 1 single thing that does codes as text, i will be able to make small text boxes but not very professional! ;) please, please,PLEASE! put on something that could help me with my text problems,
S.Kildar
p.s. Did imention i couldn't understand GML language until now!

<{POST_SNAPBACK}>


Yeah could we have somthing on Text boxes please :P
  • 0

#9 Sniffy

Sniffy

    GMC Member

  • New Member
  • 1 posts

Posted 29 December 2006 - 02:59 PM

Any chance I can get a list of functions?
  • 0

#10 Bloodveld

Bloodveld

    GMC Member

  • New Member
  • 2 posts

Posted 22 January 2007 - 12:15 AM

Woah. This is amazing. No, I haven't read it yet (XD), but I did skim it. What I really like about this tut is that instead of just saying "This code is the same thing as this D&D button" and leaving it at that, it explains a bunch of stuff with a good amount of detail, like arrays.

Awesome job. <_< (Also, this forum needs a clapping emote.)
  • 0

#11 Anubis208

Anubis208

    GMC Member

  • New Member
  • 9 posts

Posted 01 February 2007 - 02:41 AM

This is so awsome. I have been doing 3-d off of other people's scripts, but now I can actually make my own!!!!! This is the best, clearest tutorial on GM: that I have ever seen. I can actually understand it!!!!!!!!! :angry:
  • 0

#12 RPG_fan_attic

RPG_fan_attic

    GMC Member

  • New Member
  • 1142 posts
  • Version:GM8

Posted 03 February 2007 - 06:57 AM

Nice, im going to read this coz my brother is the 1 that puts code into my game, its time i learn code
  • 0
<a href="http://gmc.yoyogames...owtopic=292575" target="_blank"><img src="http://img252.images...493/yeryq5.png" border="0" class="linked-sig-image" /></a>

#13 cred13

cred13

    GMC Member

  • GMC Member
  • 270 posts

Posted 03 February 2007 - 06:40 PM

i used this to learn gml... it's very good!
  • 0

#14 ideweever

ideweever

    GMC Member

  • New Member
  • 108 posts

Posted 15 February 2007 - 12:05 AM

thanks alot for this tutorial it really helped me alot. ive been trying to learn how to write some scripts but didnt know what all symbols mean. :D :( :P
  • 0

where is that monkey?

#15 Dany

Dany

    GMC Member

  • New Member
  • 150 posts

Posted 02 April 2007 - 03:43 PM

Ok,that's good,but AT ALL it not explains it!
  • 0

#16 freaked

freaked

    freak up!

  • New Member
  • 890 posts

Posted 07 April 2007 - 09:16 AM

thanks alot for this tutorial it really helped me alot.  ive been trying to learn how to write some scripts but didnt know what all symbols mean. :D :GM063: :D

<{POST_SNAPBACK}>

:mellow: ;) :
thanxthanx thanx *100000 I FINNALY LEARNT GML!!!!!!!!!!!!!!!!!!!!!!!!! :
  • 0

#17 shomon

shomon

    GMC Member

  • New Member
  • 1 posts

Posted 10 April 2007 - 11:12 AM

Thanks

it's a good tutor ^ ^
  • 0

#18 General Leo

General Leo

    Master Gamer

  • GMC Member
  • 976 posts
  • Version:GM8.1

Posted 16 April 2007 - 09:55 AM

Thank you all for the replys. I made this tutorial a long time ago now and to this day, I still get people messageing me telling me my tutorial is the best and easiest way to learn GML.

THANK YOU ALL for helping spread the word. I love hearing that my tutorial has helped so many people start to write their own scripts. I'll see if I can't work on the tutorial some more sometime.
  • 0

My BEST and most simple GML tutorial: Easy-to-read GML tutorial

Message me if you'd like FREE unlimited space to upload your games and files.


#19 Spector_Slayor

Spector_Slayor

    GMC Member

  • New Member
  • 81 posts

Posted 06 May 2007 - 04:25 PM

This is the best free tutorial ever made in my opinion.... :P
  • 0
Did you know we can rotate objects in the room editor now┐ =)
Sneak Peak at my upcoming game [ScreenShot]
//Don't drink and script you may crash your computer.
Posted Image

#20 General Leo

General Leo

    Master Gamer

  • GMC Member
  • 976 posts
  • Version:GM8.1

Posted 15 May 2007 - 08:09 PM

hey guys, just uploaded version 6.1 of my tutorial. I noticed some of my links were going bad so I erased them and put my paid host to ensure it will work for a long, long time.

Glad my tutorial is continuing to help all of you.
  • 0

My BEST and most simple GML tutorial: Easy-to-read GML tutorial

Message me if you'd like FREE unlimited space to upload your games and files.


#21 Zpace

Zpace

    GMC Member

  • GMC Member
  • 58 posts

Posted 14 June 2007 - 09:47 AM

NOW THIS really helped me out :). Thanks man. I think everyone which are willing to learn GML should read this. :)

OverAndOut.
/Zpace
  • 0

#22 ewaygames

ewaygames

    GMC Member

  • New Member
  • 10 posts

Posted 19 June 2007 - 07:47 PM

It is a lot of reading, I got a little confused when it started to go to the ! sign and brackets, Then I got totally confused when I got to the jump to a place and so on.

Anyway this guide was somewhat helpful if it was broken down more into detail.

Is there some way to get a broken down guide or book from somewhere on D&D, GML or both?
  • 0

#23 Compmonkey

Compmonkey

    GMC Member

  • New Member
  • 161 posts

Posted 21 June 2007 - 01:06 PM

I got confused on the arrays before i saw this =P im still a little =P but i know alot of other things thanx to this =)
  • 0

#24 me123

me123

    GMC Member

  • New Member
  • 123 posts

Posted 05 July 2007 - 06:14 AM

can you make changes to it so it can work with game maker 7?
  • 0

#25 hellfire911

hellfire911

    GMC Member

  • New Member
  • 844 posts

Posted 07 July 2007 - 03:03 PM

Basically :lol: and :whistle: are the same.
  • 0

#26 cheeserules

cheeserules

    GMC Member

  • GMC Member
  • 570 posts

Posted 16 July 2007 - 05:08 AM

I sooooooo reccomend this tutorial! It tought me half the stuff I already know and than another half of the stuff it tought me instantly! It is extremely well documented. It's the best beginner's GML tutorial out there!
  • 0
SOMETHING WITTY!

#27 theBlighter

theBlighter

    GMC Member

  • New Member
  • 177 posts

Posted 22 July 2007 - 03:09 AM

Best. Tutorial. Ever.

Dude, I just got through a section that taught me two things: How to make different sized jumps based on how long you press the jump button, and how to get realistic stopping (like, not stopping instantly, but stopping more like a sort of speed gradient).
  • 0

#28 rogueheart_69

rogueheart_69

    GMC Member

  • New Member
  • 3 posts

Posted 01 August 2007 - 08:43 AM

thank you so much fr putting this up...i cant tell you how much this has helped me...

i actually understand it now.....!!!!!java script:emoticon(':whistle:')
smilie!!!!!!!!!!!!!!!!!!!!!!!!
  • 0

#29 Phantom_Of3

Phantom_Of3

    GM Programmer

  • New Member
  • 710 posts

Posted 07 August 2007 - 07:26 PM

Great tutorial for learning to use GML, but next time do you think you could put in statements besides if? Some confusing ones are for, while, until, and even with can be confusing.

So maybe in the next guide you could include those. I am currently making a guide to starting off as a beginner and becoming advanced. I will recommend this guide as one for learning how to use GML.
  • 0

#30 mattpk

mattpk

    GMC Member

  • New Member
  • 821 posts

Posted 15 August 2007 - 01:56 AM

x += 1
This code is most likely the type of code used in most platformers or RPGs. If put into the "keyboard left" event of an object, it will rapidly move the object to the right. using a - (minus) sign instead of the plus sign will cause it to go backwards making it (in this case) go left.

You said that in your tutorial. read it carefully. why would anyone want to to move an object right when you press left???
  • 0

#31 MythicRuler

MythicRuler

    GMC Member

  • New Member
  • 438 posts

Posted 15 August 2007 - 10:02 PM

Nice tutorial! I still don't see the benefit of arrays though. For the items say you use an array like this:

item[1,0]="coin"
item[1,1]="gives you money"
item[1,2]=1
item[1,3]=100

Why use that when you could use this:

coinname="coin"
coindescription="gives you money"
coinamount=1
cointcost=100

What is the difference? Why is it bettery to use arrays? Thanks.
  • 0

#32 funcravers

funcravers

    GMC Member

  • New Member
  • 1087 posts

Posted 18 August 2007 - 12:45 AM

Thank you so much! I am a leader of a GM team and its very sad that i could hardly use GML but this tutorial tought me most of it in about 30 minutes! :D
  • 0

#33 Nergal

Nergal

    GMC Member

  • New Member
  • 33 posts

Posted 20 August 2007 - 03:54 AM

I LOVE YOU FOR MAKING THIS TUTORIAL! :blink: At first I didn't think it was going to work much, but then one day I got sick. Since I was sick, I had nothing better to do than read, so I turned on my computer, opened the tutorial, and understood all of it! Now I actually know how to use code other than sound_play(whatever)! Thank you very much! I highly recommend this tutorial to ANYONE who wants to learn GML.
  • 0

#34 crems123

crems123

    GMC Member

  • New Member
  • 90 posts

Posted 22 August 2007 - 03:18 PM

Nice tutorial! I still don't see the benefit of arrays though. For the items say you use an array like this:

item[1,0]="coin"
item[1,1]="gives you money"
item[1,2]=1
item[1,3]=100

Why use that when you could use this:

coinname="coin"
coindescription="gives you money"
coinamount=1
cointcost=100

What is the difference? Why is it bettery to use arrays? Thanks.

<{POST_SNAPBACK}>


there are a lot of advantages by using arrays but these are some main ones


for starters the variables are shorter to write,

secondly you can use variables as array numbers like this:
item[var,var]
which i found useful for making inventories

and when you have loads of items you only need to change 1 or 2 numbers not a word or even 2 words which saves a lot of time.


what looks better

this
coinname="coin"
coindescription="gives you money"
coinamount=1
cointcost=100
potionname="potion"
potiondescription="heals you"
potionamount=5
potioncost=250


or this
item[1,0]="coin"
item[1,1]="gives you money"
item[1,2]=1
item[1,3]=100
item[2,0]="potion"
item[2,1]="heals you"
item[2,2]=5
item[2,3]=250



the one using arrays looks a lot more formal and easier to read if you use them alot in code.

hope this helped :whistle:


thanks general for this tutorial i wouldnt have even bothered with gml until i found you guide :mellow:

Edited by crems123, 22 August 2007 - 04:58 PM.

  • 0

#35 AjDeF3

AjDeF3

    Platform Game Lover

  • New Member
  • 1264 posts

Posted 22 August 2007 - 11:54 PM

This is how i learned GML. I printed it and read it about 5 times.
The only thing better than this is actually having a person tutor you.


HIGHLY RECOMMENDED
  • 0
My game: NEW VERSION! 5 Levels!


Play Sonic Super Dash!
And last but not least... Play my FAVORITE game ever made with GM, and purchase the full version. Here

#36 General Leo

General Leo

    Master Gamer

  • GMC Member
  • 976 posts
  • Version:GM8.1

Posted 27 August 2007 - 10:55 PM

Ok guys, I released my final version of the tutorial. It has the last of the grammar and typo fixes. I also changed a bit of the wording so it's less confusing in the parts people are saying they got lost at.

Hope it continues to help you all!
  • 0

My BEST and most simple GML tutorial: Easy-to-read GML tutorial

Message me if you'd like FREE unlimited space to upload your games and files.


#37 Phantom_Of3

Phantom_Of3

    GM Programmer

  • New Member
  • 710 posts

Posted 31 August 2007 - 07:38 PM

The problem is that you only talk about one statement: if. That is one that is really easy to learn you need to get onto other statements like while, with, then, continue, break, switch, return and all of the other ones.
  • 0

#38 ryguydavis

ryguydavis

    GMC Member

  • New Member
  • 277 posts
  • Version:Unknown

Posted 06 September 2007 - 07:30 PM

I've given this a quick look over, and from what I can tell, it is a very solid beginning to gml. It makes the daunting looking help file not quite as necessary when starting out-- though I highly highly recommend the GM help file, I still refer to it after 5 years of programming. Something about this tutorial's relaxed style of writing, though, is almost as if someone is talking, which makes it easy to understand even if someone has no experience with programming and it seems impossible to learn.

EXCELLENT idea to add in some example scripts at the end. It puts code into practical terms, shows that this strange language has serious power and gets creative ideas going.

I would suggest you make a series of these, going from start to some more advanced features, though I understand how much work writing something like this is.
  • 0
Posted Image

#39 Protolisk

Protolisk

    GMC Member

  • New Member
  • 77 posts

Posted 12 September 2007 - 09:12 AM

I sent the games tech teacher the file and he gave it to everyone in the class.

A bit confusing at the end but still good. Could you please make another that has other things like when and all that.
  • 0

#40 anhkanm

anhkanm

    GMC Member

  • New Member
  • 55 posts

Posted 24 September 2007 - 01:23 AM

I know that this topic is old and all but If you would like I can make your tutorial into an html file with clickable links to certain parts of the tutorial. FYI displaying it on a web browser is easier for the public that haven't subscribed to microsoft word atm and it wouldn't take me long at all to make it...

btw this is great stuff !!!
  • 0

#41 crems123

crems123

    GMC Member

  • New Member
  • 90 posts

Posted 29 September 2007 - 10:18 PM

no actually i think its easier in word. many people are scared of the html help file type. this is the best way and easier to print it all out

Edited by crems123, 04 October 2007 - 09:47 PM.

  • 0

#42 General Leo

General Leo

    Master Gamer

  • GMC Member
  • 976 posts
  • Version:GM8.1

Posted 12 October 2007 - 10:42 AM

My GML tutorial is free for anybody to use, convert, hand out, modify, blah blah so long as credit is given where due.

I like that you all are commenting on parts of it but PLEASE do realize I created this as a beginners guide. Why in the world would I get into other statements like while, with, then, continue, break, switch, return...ect. That would brink the edge of beginner level and probably cause a few readers to lose interest. I have been pondering the thought however of making an experts scripting tutorial... We'll see.
  • 0

My BEST and most simple GML tutorial: Easy-to-read GML tutorial

Message me if you'd like FREE unlimited space to upload your games and files.


#43 NitroFaber

NitroFaber

    GML Guru

  • New Member
  • 128 posts

Posted 13 October 2007 - 01:42 AM

I think that an experts tutorial to continue on from this tutorial would be very useful for some people.
  • 0

#44 LRG

LRG

    GMC Member

  • GMC Member
  • 687 posts
  • Version:GM:Studio

Posted 13 October 2007 - 03:49 AM

I know this is kinda off topic but can you please make a 'more advanced tutorial' that covers while, with, then, continue, break, switch, return and loops... I'm using GML for the first time using your tutorial but in my rpg game I need more advanced coding, I did a lot of copy-and-pasting (credits given of course) but could understand little of it...
  • 0

...Coming to you May 1, 2012 or later...
Posted Image


#45 paolo-dude

paolo-dude

    GMC Member

  • New Member
  • 210 posts

Posted 06 December 2007 - 05:03 PM

Very useful! Helped me get to grips with GML.
One thing I could not work out. Arrays. I tried them withs scripts, and just in the code box.
11/11 is my rating.

~PD~
  • 0
Her eyes are like looking into the abyss...

#46 Silverbros

Silverbros

    GMC Member

  • New Member
  • 23 posts

Posted 07 January 2008 - 02:24 AM

Thanks You for taking the time to make a tutorial, I'm sure on all of our behalf that we learn how to begin gml coding. this really help me, know i know basic gml coding, I'll use the help section to learn the advance, but right now i can improve my game, and know what I'm doing. if someone just take about 30mins just to set read it and test it out, then they would understand it. my friend got the same tutorial, yet but he won't take the time out to read it...and...yeah...anyways good tutorial, thanks a lot and i hope you make a new tutorial for advance gml coding, I'll definitely want to read that, and i hardly want to read anything, thanks again. :rambo
  • 0

#47 RomanS

RomanS

    GMC Member

  • New Member
  • 124 posts

Posted 07 January 2008 - 04:48 AM

I dont like the tutorial very much because it doesn't help you put the code
together with another code it only explains what a certian function does but I like how its easy to understand.
What would be really nice is if he made examples to try out for the code
he made but making something people would normally use. :rambo
  • 0

#48 OmegaZero

OmegaZero

    GMC Member

  • New Member
  • 122 posts

Posted 09 January 2008 - 01:31 AM

An expert tutorial would be good... :P
  • 0

#49 Victor

Victor

    GMC Member

  • New Member
  • 311 posts

Posted 12 January 2008 - 12:00 PM

Well you have put quite a lot of effort into this, I can see that.. Which is good. BUT if you want to learn other people to code, you'll have to structure your code a lot better.

For example, your code isn't even indented. You aren't consistent with using brackets, and similar things.

Beginners that reads this might look up to you, and do as you do.. And then, they will do it the wrong way.
  • 0

#50 Tanman

Tanman

    GMC Member

  • New Member
  • 17 posts

Posted 22 February 2008 - 04:30 AM

Finally, I found an easy to learn GML tutorial. Thank you so much. I hate making posts on stuff that im trying to learn and getting the answer of go learn GML lol. I finally understand it.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users