How do I learn GML?

D

DudeWhoWantsToMakeGames

Guest
I have been "Using" Game Maker Studio since I wanted to make my first game. I found Shaun Spaulding's tutorial on making a Platformer and tried to do that. Sadly, while I was trying to rename the game's file I accidentally deleted ALL of my work and decided to give up. I recently made a small platformer game (With the Game maker Video on it.) but that's really about it. I want to know How I learn GML like everyone else seems to be able to do. If Drag and Drop is the best way to start then can you help me with that? I want to at least be able to make, for EXAMPLE, an Action RPG game that goes up to at least until the first quest is done or a platformer with only one level.
 
Last edited by a moderator:

Binsk

Member
Eh, it is different for everyone. Some people like videos, some like articles, some just jump in on their own with the manual (this last one being my method).

If you've never used a programming language I would say start by learning these things:
  1. Basic GML syntax. Aka., the "grammar" of the language.
  2. Learn about conditionals / branching (aka., if statements), and loops (aka., while, for, do / until, repeat)
  3. Learn the actual functions to the language via the manual.
A little research can provide answers to all this. If you learn the grammar then you will know how to set and get variables and pass data around. Learn about loops and branching and you can now limit passing data to certain circumstances and/or manipulate it in more complicated ways. Learn the actual GML-specific functions and it opens up things like rendering, physics, and whatnot all based around the data you have now learned to manipulate.

I would say, you must learn #1 and #2 before you can do anything. #3 is a 'learn as you go'. I've been using GameMaker since 2004 and still find new functions and features that I either forgot or just didn't know about.

I would give you more resources but I have never actually used any besides the manual and asking questions here. As such, I'm really not familiar with many GameMaker specific tutorials. I'm sure someone else could chime in if that is your thing.
 

TheouAegis

Member
you open the manual and you read it. You make your own games, starting small. You write code that has nothing to do with a game, just to write code. Anytime you don't know how to do something, you go back to the manual. You read the forums for inspiration. You don't ask how to do something specific to your projects, but work it out yourself.

I might sound like a crotchety old man, but seriously, they've written a manual for every major build of GM for a reason.
 
R

robproctor83

Guest
Don't do drag and drop if at all possible. If you truly want to learn to use GM you should make a normal coded project. Think about it like this, using the drag and drop system will require a lot of learning and understanding how things work in order to make the types of games you want. You could instead spend that time learning to program, which in the long run will be easier to make the things you want. So, please, if you think yourself at all capable of coding I would go with GML.

The best way to learn? Easy, read the docs. They are your #1 source of understanding how to accomplish things. Searching Google and asking help on the forums is also a great addition to learning. You will find very smart and kind people here to help you along your way.

Also, a good way to maybe start is to download something like a premade game system from the market place, there is one for pretty much each genre (action rpg, platformer, etc). You can take that, break it apart and learn how to build on top of it. This way you can also feel assured that a lot of the basic things are done right, or at least in an acceptable manner and not something that may come back to bight you in the future. It's up to you though. Someone like myself always prefers to build things from scratch, but it's not necessary and can save you a tremendous amount of time. If you really wanted to go all out, I would suggest dissecting those game kits from the market place and then building your own from scratch adapting methods and ideals from those projects.

Best of luck,

Excellent GM resources
https://docs2.yoyogames.com/
https://www.yoyogames.com/blog
https://marketplace.yoyogames.com/
https://www.gmlscripts.com/
https://yal.cc/
http://nocturnegames.nocturnecreations.com/assets/

Useful Stuff
https://opengameart.org/
http://lpc.opengameart.org/
https://freesound.org/

Useful Software
https://www.audacityteam.org/
https://www.aseprite.org/ (paid)
https://www.gimp.org/ (free)
 
Last edited by a moderator:
R

robproctor83

Guest
Action RPG is not a genre for beginners. I would suggest starting out with extremely simple projects like Asteroids or Click the Clown to get a feel for programming. Then work your way up to RPG's.
That is a good point, an action RPG, even a single quest, will be a tremendous amount of work if you want everything to be fleshed out. Meaning, enemies, path finding, inventory, items, stats, combat, camera, dungeon, artwork, audio, gui, interfaces, collisions, etc etc. Yes, it will be a lot of work, but it's not impossible (but also not recommended) so keep that in mind. If you did want to do it though I would still suggest going to the market and downloading a premade kit and dissecting that and understand how it's build, what it's doing and how to extend it.

*edit: still, for first time I would really recommend something much simpler.
 

TheouAegis

Member
Don't do drag and drop if at all possible. If you truly want to learn to use GM you should make a normal coded project. Think about it like this, using the drag and drop system will require a lot of learning and understanding how things work in order to make the types of games you want. You could instead spend that time learning to program, which in the long run will be easier to make the things you want. So, please, if you think yourself at all capable of coding I would go with GML.

The best way to learn? Easy, read the docs. They are your #1 source of understanding how to accomplish things. Searching Google and asking help on the forums is also a great addition to learning. You will find very smart and kind people here to help you along your way.

Also, a good way to maybe start is to download something like a premade game system from the market place, there is one for pretty much each genre (action rpg, platformer, etc). You can take that, break it apart and learn how to build on top of it. This way you can also feel assured that a lot of the basic things are done right, or at least in an acceptable manner and not something that may come back to bight you in the future. It's up to you though. Someone like myself always prefers to build things from scratch, but it's not necessary and can save you a tremendous amount of time. If you really wanted to go all out, I would suggest dissecting those game kits from the market place and then building your own from scratch adapting methods and ideals from those projects.

Best of luck,

Excellent GM resources
https://docs2.yoyogames.com/
https://www.yoyogames.com/blog
https://marketplace.yoyogames.com/
https://www.gmlscripts.com/
https://yal.cc/
http://nocturnegames.nocturnecreations.com/assets/

Useful Stuff
https://opengameart.org/
http://lpc.opengameart.org/
https://freesound.org/

Useful Software
https://www.audacityteam.org/
https://www.aseprite.org/ (paid)
https://www.gimp.org/ (free)
Oh man, I keep forgetting about the blog. When I finally gave GMS2 a serious look, Google sent me there. And it has pictures (sometimes)! Anyone else actually read the blog posts about making a C64 emulator in GM?


You could always use one of the RPG Makers for making an ARPG. lol Man, it was a lot of fun sharing some of the crazy stuff we pulled off with RPGMaker2000 on one of the RM2K forums back in the day. ARPGs, SRPGs, TRPGs, parallax cutscenes, draggable inventories. Ahh.. Good times.
:squirrel:
 
R

robproctor83

Guest
Oh man, I keep forgetting about the blog. When I finally gave GMS2 a serious look, Google sent me there. And it has pictures (sometimes)! Anyone else actually read the blog posts about making a C64 emulator in GM?


You could always use one of the RPG Makers for making an ARPG. lol Man, it was a lot of fun sharing some of the crazy stuff we pulled off with RPGMaker2000 on one of the RM2K forums back in the day. ARPGs, SRPGs, TRPGs, parallax cutscenes, draggable inventories. Ahh.. Good times.
:squirrel:
When I was about 15 I got my hands on a Chinese program called RPG Maker 95, ah the memories. I spent at least a couple thousand hours fumbling through the program trying to make sense of what was going on since half of the GUI was still in Chinese. Sadly I never finished my game, but it was my first real attempt at making a game. Shortly after I found something else called... What was it... *Googling*... Klik & Play was the name, the original. Then Click and Play, and then got into developing web sites and software and gave up on games. Now there are a lot of incredible tools, but funnily enough RPG Maker is still around and is still producing the same quality games as the one in the 90s :)
 

TheouAegis

Member
When I was about 15 I got my hands on a Chinese program called RPG Maker 95, ah the memories. I spent at least a couple thousand hours fumbling through the program trying to make sense of what was going on since half of the GUI was still in Chinese. Sadly I never finished my game, but it was my first real attempt at making a game. Shortly after I found something else called... What was it... *Googling*... Klik & Play was the name, the original. Then Click and Play, and then got into developing web sites and software and gave up on games. Now there are a lot of incredible tools, but funnily enough RPG Maker is still around and is still producing the same quality games as the one in the 90s :)
One of my buddies had the Playstation RPG Maker. We fiddled with it for a bit. I almost bought the 3DS RPG Maker recently purely for the nostalgia feels, but I returned to my senses and removed it from my cart. lol
*quick nostalgia google*
Oh man, some of the names on here bring back memories...
http://rpgmaker2000.narod.ru/rm2k_faq.htm
Don Miguel (the translator of RM2k, if I remember correctly), MACK (good pixel artist), Drakul, Jericho, SewerShark, Chris Jennings, Norwolf, Dragonlord, PokeyTrev13, Ayruline, Mathieu Tremblay, JanusX, MysticGohan, DarkAngel504, Ichigo Momomiya...
And my old tutorial on ripping graphics from emulators. lol
http://www.angelfire.com/anime3/leimagnuschan/snesripz/
 
D

DudeWhoWantsToMakeGames

Guest
Eh, it is different for everyone. Some people like videos, some like articles, some just jump in on their own with the manual (this last one being my method).

If you've never used a programming language I would say start by learning these things:
  1. Basic GML syntax. Aka., the "grammar" of the language.
  2. Learn about conditionals / branching (aka., if statements), and loops (aka., while, for, do / until, repeat)
  3. Learn the actual functions to the language via the manual.
A little research can provide answers to all this. If you learn the grammar then you will know how to set and get variables and pass data around. Learn about loops and branching and you can now limit passing data to certain circumstances and/or manipulate it in more complicated ways. Learn the actual GML-specific functions and it opens up things like rendering, physics, and whatnot all based around the data you have now learned to manipulate.

I would say, you must learn #1 and #2 before you can do anything. #3 is a 'learn as you go'. I've been using GameMaker since 2004 and still find new functions and features that I either forgot or just didn't know about.

I would give you more resources but I have never actually used any besides the manual and asking questions here. As such, I'm really not familiar with many GameMaker specific tutorials. I'm sure someone else could chime in if that is your thing.
I'm not one of those people who A) Have enough patience to just learn from the manual and B) Retain enough memory to actually KNOW this stuff but I have been writing down the manual's scripting information in my journal for a few days now :D
 

HayManMarc

Member
I'm not one of those people who A) Have enough patience to just learn from the manual and B) Retain enough memory to actually KNOW this stuff but I have been writing down the manual's scripting information in my journal for a few days now :D
Don't worry. I've been using GM for years and I'm still ALWAYS referencing the manual for details about functions and stuff. I think it's just a part of the process. Plus, I can't remember stuff until I do it a thousand times. Lol
 

devKathy

Member
At least for my students, the fewer who want to read that day (maybe it's early morning or the holidays just concluded), the more I focus on giving better lectures and conveying things verbally. Those videos that Sam is putting out might be perfect in your case! :)
 

TheouAegis

Member
If you have enough patience to sit through Shaun's tutorials, enough patience to search for corrections to all the mistakes in his tutorials, or enough patience to wait on the forums for a correction to the mistakes, then you have enough patience to read the manual. But you're at least transcribing things from the manual, so just keep doing that if that's what works for you. Just because this isn't high school, it doesn't mean everything you do in high school doesn't apply here. Read the text, take notes, study the notes, apply what you were taught to simple tasks. In this case, you make up your own simple tasks rather than waiting for a teacher to assign homework. School isn't a waste of time, it's practice for how to be self-dependent. lol
 

Slyddar

Member
Check out the tutorial section on these forums > https://forum.yoyogames.com/index.php?forums/tutorials.15/
There are lots of cool small tutorials you can do which will help you build up your confidence in using GML, or DND.

Personally just reading the manual cold turkey doesn't work for me, as I find that a quick way to lose interest. Unless I have some sort of context, the content in the manual is not interesting enough to hold attention. In saying that, the manual itself it excellent when you have a general idea what you are looking for.

Like everything, start small, work your way up by learning the skills. Any black belt always started as a white belt.
 
R

robproctor83

Guest
Personally just reading the manual cold turkey doesn't work for me, as I find that a quick way to lose interest.
I wouldn't necessarily suggest reading it like a book, however it's worth reading the particular section of the manual that you are trying to figure out. If for example you needed to do something with surfaces, it's worth looking at the manual about surfaces and all the variety of functions you can apply to them. If you, for example, only reference code from the videos and tutorials you will only grasp a small subset of features. It's important to gain full context of these tools and the best way to do that is to read the manual.
 
D

DudeWhoWantsToMakeGames

Guest
Action RPG is not a genre for beginners. I would suggest starting out with extremely simple projects like Asteroids or Click the Clown to get a feel for programming. Then work your way up to RPG's.
Thanks for that info, however, that was just an example (I actually want to make one and with a little bit of practice and experience I made be able to do it.)
 
D

DudeWhoWantsToMakeGames

Guest
That is a good point, an action RPG, even a single quest, will be a tremendous amount of work if you want everything to be fleshed out. Meaning, enemies, path finding, inventory, items, stats, combat, camera, dungeon, artwork, audio, gui, interfaces, collisions, etc etc. Yes, it will be a lot of work, but it's not impossible (but also not recommended) so keep that in mind. If you did want to do it though I would still suggest going to the market and downloading a premade kit and dissecting that and understand how it's build, what it's doing and how to extend it.

*edit: still, for first time I would really recommend something much simpler.
I watched a few videos from a channel called Extra Credit about how to plan out your game and they listed a list of easy games to make (They also said it will probably be outdated in the future.) That was in 2015 and I was wondering what IS the easiest to make for a starter game? (BTW Happy New Year everyone!)
 

rIKmAN

Member
I watched a few videos from a channel called Extra Credit about how to plan out your game and they listed a list of easy games to make (They also said it will probably be outdated in the future.) That was in 2015 and I was wondering what IS the easiest to make for a starter game? (BTW Happy New Year everyone!)
One of the classics that don’t involve anything too complex but which have all the elements required for a full game so you can see how everything fits together (player input, movement, collision, scoring, sound effects, basic enemy ai and movement, basic loading / saving, different levels etc etc etc)

Pong
Breakout
Space Invaders
Asteroids
Frogger
etc etc etc

The official GMS2 tutorial games would also be a good starting place too.

Learn to walk before you try to run, it’s never a good idea to try and build a house on unsteady foundations.
 

TheouAegis

Member
Well, you can take a look through history to see what some people's first games were. lol

Tic-Tac-Toe

Made for computers back in 1952, so I'm sure you could pull that one off.

Blackjack (Twenty-One)
Made for computers back in 1954.

Checkers
Made for computers back in 1956.

Table Tennis / Pong
The first game was in 1958, later inspiring Pong in 1972.

Mouse In A Maze
This might be a bit higher in complexity, but writing maze creation and maze solution algorithms is fun. Oh yeah, made in 1959.

Spacewar
One of the most inspirational computer games, made in 1962.

The Oregon Trail
Made way back in 1971. We're starting to move up in complexity. lol

Maze War
The first FPS (first-person shooter), made in 1973.

Space Invaders
Hit arcades in 1978.

Intelivision
Not a game, but the system had lots of sports games in 1979, so putting sports games here. lol

Pac-Man
This classic came out in 1980. From personal experience: it's deceptively simple.

Donkey Kong
This arcade hit came out in 1981.

Tron
The game based on the movie came out in 1982. I always loved the lightcycle game!

Tetris
Created behind the Iron Curtain back in 1984, this was one of my favorite games to brainstorm code for.

Super Mario Bros.
Bundled with the NES back in 1985. Arguably the most famous action platformer ever.

The Legend Of Zelda / Leisure Suit Larry / Street Fighter
These all came out in 1987. You got your action RPG, your fighter, and a smutty adventure game.

John Madden Football
The first of this long-running franchise came out in 1988.

Solitaire
Released by Microsoft in 1990, a staple program in the Windows OS.

Sonic The Hedgehog
Action platformers revved up in 1991.

Dune II
The genre-defining RTS was made in 1992. A couple years later, Blizzard released Warcraft. So... a late-entry-level game genre. lol


My first game -- well, more like a prototype -- was a sliding puzzle. It was super simple, could be handled in various ways depending on your experience, lead me to some interesting reading on Google, and taught me how to solve sliding puzzles (yeah, I was working on a puzzle I had never solved until then). Then I moved on to writing up a bunch of maze algorithms (I didn't come up with them, I just adapted abstracts to GML). Eventually I made a Puyo prototype, then moved on to Tetris after thinking it might be fun to try different ways to code it. Then I moved on to Pac-man as a side project just to see what made it tick. (Unlike Castlevania, knowing how Pac-Man works hasn't made it any easier for me to beat it.) And yeah, my hiatus project is a Castlevania knock-off. Oh, I also have a card game I'm working on, but it's still just a proof of concept. ...Adulting with ADHD sucks.
 
P

Palocles

Guest
Dude, i’ve Just recently restarted with GMS but I did a software dev paper so I know most of the basics like for and while loops. That was a while ago though so i’m pretty rusty.

I think your best bet is to skip drag n drop and try follow one of the tutorials on YouTube. Just copy the code as they write it and when they use a function or something you want to know more about go to the manual.

Jumping straight into the manual will get you bored and overwhelmed quickly.

Shaun Spaulding and HeartBeast have good tutorials and FriendlyCosmonaut has a good video on object states that you’ll find helpful at some point.

Good luck, bro.
 

TailBit

Member
Drag and drop is pretty much just bits of code that is harder to connect .. but less intimidating.. code will have more options, and asking for help will be simpler for both sides since you can easily copy the parts you need help with.
 

Joe Ellis

Member
If you really wanna learn just teach yourself. Decide to make a basic game, then try to do the stuff you wanna do, read the manual, and gradually learn how to do each thing you wanna do. Objectiveness is the key, always have an objective, and try as hard as you can to reach it. That method works,
 

Sabnock

Member
D&D would not be my recommendation. pick a simple game, space invaders, Asteroids or something of that nature and do the tutorials. see the game through to the end and complete it but don't expect to be able to code anything complex within a couple of weeks. it can take months or more likely years.

Game maker does a lot of the hard work for you from a technical standpoint but what it can't do for you is make the core logic of your game or make it an instant classic, that has to come from you.

read through the manuals, ask for help, and do tutorials. there are millions of them.
 

Joe Ellis

Member
"more likely years." That is an important thing to realize. It will prob take at least 3 years till your perfect game is made. But worth waiting for
 

Yal

🐧 *penguin noises*
GMC Elder
I learned GML almost exclusively by reading the manual and copy-pasting anything that seemed to do remotely what I wanted to do. It probably helps to learn some basic programming concepts before you start memorizing functions, though... loops, arrays, variables, string handling and so on. The hardest step in learning programming is getting over the initial hurdle and start thinking like a programmer, the "learn new functions" and "figure out which things to glue together to do what you want" steps are comparatively easy once you know the basics. Those basic things are pretty much the same between every programming language in existence, so you could do with a text on C++ without too much issues if you can't muster up a good GML source.
 
Top