• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

Where do i start?? GML

tyngu

Member
So these days ive been looking after tutorials.
But i feel like im just copying and pasting them. Without learning anything.
So where do i start? Also the Game Maker Manual its weird for me.
 

Rob

Member
So these days ive been looking after tutorials.
But i feel like im just copying and pasting them. Without learning anything.
So where do i start? Also the Game Maker Manual its weird for me.
Try and modify the existing code. I always have to get stuck in, make mistakes, and eventually learn from it.
If you can become familiar with the coding language, get used to searching for functions that may do what you need, and understand what values the functions return, it will be really helpfully.
What was it about the manual that you didn't get?
 

TsukaYuriko

šŸŒ 
Forum Staff
Moderator
So where do i start? Also the Game Maker Manual its weird for me.
What's weird about it? Understanding how to use the manual is the key to being able to use GMS to its fullest potential, as well as for learning how to use it quickly. If we can clear up whatever uncertainties there are regarding it, that's probably going to be the one thing that will help you the most.
 

NeoShade

Member
Tutorials are great, but instead of copying and pasting the code, try typing the whole lot out yourself, and as Rob said, make some adjustments of your own.
These don't have to be massive adjustments, but simple things like using a different colour or starting with a different room size (which in turn means you might have to adjust dimensions in other parts of the code accordingly).

Copy-paste is easy to do, but as you said, you don't learn from it. By typing the whole lot out yourself, you'll probably find that it sticks in your brain a bit longer. Also, you might make some mistakes that the tutorial didn't make, and by comparing your code to the tutorial code, you'll learn where you went wrong.
 

Cpaz

Member
Gonna shill for @samspade here, but he has a fantastic series on gml fundamentals I recommend looking into. It's not specific to anything, but it's a bunch of really short videos that do a great job summarizing the basics.

It's in the process of being updated for 2.3 additions, but it's still worth looking into.

EDIT: But I also agree with what people have said above. Toy with things and see how they break/work/don't work.
 
I tought my son a few years ago, he was about 8 years old, how to program a very basic Mario game. I wanted him to know that making a game is not as easy as it seams but it IS fun. So to show him how it's done, I went through all the steps and for the sake of what I had in hand at that time where GMS 1 was at it's glorious days, I used Game Maker 5.3. Yep, wayyyy back. I also was using a very weak system for some reason in my computer store's lab so I needed something easy on the system resources.

So I got a few basic Super Mario World sprites and tiles (I find those are the most beautiful graphics you can have for a decent 2D Mario game).

I create 2 objects, bricks and Mario with their corresponding sprite images.

I added these objects in a small room and I ran it. My son found it boring but he has a pretty good sense of humour and he told me laughing, Dad, that's boring, Mario can't even move!

Well, I stopped the game, added 2 lines of code in the step even, one for left and one for right making Mario move left and right. Then, I pressed Play. Now Mario was moving left and right. My son was amazed and desired to continue this adventure. He told me that there's nothing to do, so I guided him in the next steps.

I said, It would maybe be a good idea to let Mario fall because now he's flying in the air like Super Man, he laughed and said, yeah, that would be a good idea.

So I added a few other lines for gravity in the step even of Mario and pressed play. After a few seconds, my son just bursted in laughter because Mario passed straight through the bricks.

So I told him, it would be a good idea now to make him land on the bricks right? He answered, yeah!!! He started to say, we need to do a lot!!! I said, yes, that's how games are done.

So I added a few other lines of codes in the step event to detect the brick object and land on it. I also modified the room a bit to add a few other bricks further leaving a small gap between each set of bricks. I then pressed Play and let my son fiddle a bit with it. He was happy, and cheerfull. But he fell in the hole between the 2 sets of bricks and Mario dissapeared off screen again.

We stopped the game and I said, let's make a few basic adjustments okay. Let's make it so when Mario falls off screen we won't need to pick him up on the kitchen floor to put him back in the game okay? Of course, he laughed and understood. So I programmed another set of a few lines to make Mario reappear at it's starting position if he was outside the room. We Played it, he fell and reappeared. My son had shiny eyes seeing all of this happening by magic.

I told him, would it be nice that we could make him jump now? He answered with a very big smile, YEEEEEESS!!! So I programmed a few other lines in the same step event for jumping but I did on purpose to make a little mistake, just for his enjoyement. I did not check if there were bricks below and simply added a negative speed when pressing the "up" key. I let him fiddle arround with it and he just laughed when he lost Mario in mid air who flew high above and dissapeared. I told him, let's correct that. He giggled and said Okay.

We ended up with a basic Mario walking, jumping, dying on spikes, animate when pressing a key and DON'T animate if no key is pressed. Very basic. And I let my son create his own level in the room creator. He had lot's of fun and even invented "Doom Traps" yeah, bricks that acted like spikes. I had invented a layered system where each layer represented blocks, death spikes with the tiles. He made his level with tricked blocks and made me play. I fell right through some bricks and died on some others while I could walk through some spikes. He was laughing his brain out watching me struggle in his devious level LOL.

I said this because this is exactly how I learned GML. I started with the basics, one by one and one step at a time. From simple object placement in a room to character movement to character interaction. I learned GML like that. You maybe are not a Mario fan (I don't know), but it's to me the simplest way to learn game creation. Once you have the basics of this simple platform engine, you will learn to defy rules and change a platformer to a top-down game with a map. Learn animation and transforming sprites to others, using particle systems and transparence up until having some lights in your game.

Start simple with very basic tasks and evolve arround it. Games usually start with boring black and white squares or other people's sprites and tiles, then further we replace them with our own images.

Don't stress yourself and I know that sending people to tutorials is easy because everytjing is premade. I am not sending you there because back in Game Maker 4, I had no access to internet, I was constantly saving the executables on diskette to bring that back home with no internet access and I leanred with the GM manual starting with movement and object displacement.

When you think about it, a game is a simple HUGE mathematical equation. Where you can change X and Y values to change things from place to place and where everything becomes a big magic trick plenty of illusions. For example, moving x += 4 or x = x+4 (same thing)) this takes your object, and places it 4 pixels ahead, do than several times and you have the impression that your object is moving forward while all it's doing is changing place constantly.

I hope this helps you and can make you greatly love Game Maker and put you in the fabulous world of game making!!!
 

tyngu

Member
I tought my son a few years ago, he was about 8 years old, how to program a very basic Mario game. I wanted him to know that making a game is not as easy as it seams but it IS fun. So to show him how it's done, I went through all the steps and for the sake of what I had in hand at that time where GMS 1 was at it's glorious days, I used Game Maker 5.3. Yep, wayyyy back. I also was using a very weak system for some reason in my computer store's lab so I needed something easy on the system resources.

So I got a few basic Super Mario World sprites and tiles (I find those are the most beautiful graphics you can have for a decent 2D Mario game).

I create 2 objects, bricks and Mario with their corresponding sprite images.

I added these objects in a small room and I ran it. My son found it boring but he has a pretty good sense of humour and he told me laughing, Dad, that's boring, Mario can't even move!

Well, I stopped the game, added 2 lines of code in the step even, one for left and one for right making Mario move left and right. Then, I pressed Play. Now Mario was moving left and right. My son was amazed and desired to continue this adventure. He told me that there's nothing to do, so I guided him in the next steps.

I said, It would maybe be a good idea to let Mario fall because now he's flying in the air like Super Man, he laughed and said, yeah, that would be a good idea.

So I added a few other lines for gravity in the step even of Mario and pressed play. After a few seconds, my son just bursted in laughter because Mario passed straight through the bricks.

So I told him, it would be a good idea now to make him land on the bricks right? He answered, yeah!!! He started to say, we need to do a lot!!! I said, yes, that's how games are done.

So I added a few other lines of codes in the step event to detect the brick object and land on it. I also modified the room a bit to add a few other bricks further leaving a small gap between each set of bricks. I then pressed Play and let my son fiddle a bit with it. He was happy, and cheerfull. But he fell in the hole between the 2 sets of bricks and Mario dissapeared off screen again.

We stopped the game and I said, let's make a few basic adjustments okay. Let's make it so when Mario falls off screen we won't need to pick him up on the kitchen floor to put him back in the game okay? Of course, he laughed and understood. So I programmed another set of a few lines to make Mario reappear at it's starting position if he was outside the room. We Played it, he fell and reappeared. My son had shiny eyes seeing all of this happening by magic.

I told him, would it be nice that we could make him jump now? He answered with a very big smile, YEEEEEESS!!! So I programmed a few other lines in the same step event for jumping but I did on purpose to make a little mistake, just for his enjoyement. I did not check if there were bricks below and simply added a negative speed when pressing the "up" key. I let him fiddle arround with it and he just laughed when he lost Mario in mid air who flew high above and dissapeared. I told him, let's correct that. He giggled and said Okay.

We ended up with a basic Mario walking, jumping, dying on spikes, animate when pressing a key and DON'T animate if no key is pressed. Very basic. And I let my son create his own level in the room creator. He had lot's of fun and even invented "Doom Traps" yeah, bricks that acted like spikes. I had invented a layered system where each layer represented blocks, death spikes with the tiles. He made his level with tricked blocks and made me play. I fell right through some bricks and died on some others while I could walk through some spikes. He was laughing his brain out watching me struggle in his devious level LOL.

I said this because this is exactly how I learned GML. I started with the basics, one by one and one step at a time. From simple object placement in a room to character movement to character interaction. I learned GML like that. You maybe are not a Mario fan (I don't know), but it's to me the simplest way to learn game creation. Once you have the basics of this simple platform engine, you will learn to defy rules and change a platformer to a top-down game with a map. Learn animation and transforming sprites to others, using particle systems and transparence up until having some lights in your game.

Start simple with very basic tasks and evolve arround it. Games usually start with boring black and white squares or other people's sprites and tiles, then further we replace them with our own images.

Don't stress yourself and I know that sending people to tutorials is easy because everytjing is premade. I am not sending you there because back in Game Maker 4, I had no access to internet, I was constantly saving the executables on diskette to bring that back home with no internet access and I leanred with the GM manual starting with movement and object displacement.

When you think about it, a game is a simple HUGE mathematical equation. Where you can change X and Y values to change things from place to place and where everything becomes a big magic trick plenty of illusions. For example, moving x += 4 or x = x+4 (same thing)) this takes your object, and places it 4 pixels ahead, do than several times and you have the impression that your object is moving forward while all it's doing is changing place constantly.

I hope this helps you and can make you greatly love Game Maker and put you in the fabulous world of game making!!!
Thank you so much!! It was very inspiring 4 me!
 

samspade

Member
The gamemaker manual is great, but reading it as a starting point is not something that would work for most people (myself included). It is however, invaluable as a resource for answering questions.

As @Cpaz I have a more generalized tutorial series that is focused on how coding works rather than building a specific project which could be helpful depending upon what you're looking for (it is getting updated for 2.3 and will likely be through most updates by the middle of next month). I also wrote an blog post to answer this question.
 
Top