GML Learning GML from Scratch?

Hello. Thanks for stopping by my little thread. I appreciate it.

So, here's the deal. I am very new to GameMaker Studio, but not new to game making. However, I am an artist who has created things like UIs, 3D game specific models, and real-time 3D levels. I've worked with old school ray casting engines (like Doom and the like) up to modern day real-time 3D engines. But virtually all of my experience has been in creating graphics.

I really want to create my own small games and grow from there. Currently, I want to develop, learn, and explore mostly on my own. And this means that I will finally have to truly get my hands dirty with learning to code. And, in the case of GMS, learning GML.

Here's the thing, the last time I ever coded something that wasn't HTML it was BASIC. You know:

10 print hello
20 got to 10

;)

And that was decades ago (I am now 51 years old).

So, here's my very basic question:

What is the best way to learn GML?

I've already done a few of the tutorials that come with GMS and I get some of the concepts. But what I am not getting is how to THINK properly to create my own code. Sure, I can reuse code to accomplish things, like making an object move about the screen on a key press, and I can even modify the code so that I can use the keys I want instead of using the keys in the tutorial, but when I try to do my own thing ... like attempt to collide and push an object ... I get lost.

So, do I start by reading through, getting familiar with the code bits, memorizing them? How should I start? If you'd never coded before, where do you begin?

Any advice would be truly appreciated.

Thanks in advance.
 

obscene

Member
Welcome. I also learned to program with BASIC! GML is quite different but it's still stupid-easy to learn the basics.

do{
show_debug_message("Hello");
} until 1==2 // 1 never equals 2 so this will repeat forever just like your example

I started with the Shaun Spaulding youtube tutorials. Skip anything drag and drop, just learn code. Basically, you create a room, create and object and give it events. Then you tell it what to do in the case of an event. And it's all dirt simple.

As you're coding, you'll learn stuff like draw_sprite(). When you go to type in draw_sprite you'll get a list of autocomplete options like draw_sprite_ext() and draw_sprite_stretched(); It's a great way to learn what your options are. Press F1 and you can search what any function does. You'll basically just wonder into a lot of learning by accident if you're curious enough.
 

Jabbers

Member
Core beginner concepts to understand are what objects and events are, how variables work, and how to create an array.

After you understand these ideas, I seriously recommend you just plan out a game idea that gets you excited, and start working on it. The only way to remember how to code in GML, and to be able to think like a programmer, is to start coding.

Using the manual is important, but you can also ask questions here as and when you need help.
 

GMWolf

aka fel666
Learning by example is definitely a great way to go.
There are plenty of good resources for GM, be it example projects or tutorials.

For the very Beginning, I would take a look at the manual. Its very well written and should get you started with the basics of GML.
Then I would alternate between writing a game yourself (be it as small and simple as may be), and following an example.

By writing your own game, you will be able to make sure you understand GML.
By following an example, you will be able to learn new techniques.

As you get better and better with GML, you can start writing more projects, and following fewer examples.

One shortcoming I see many people hitting is not realising how one aspect of GML can be used in many situations. But experimenting with your own projects should help.

Finally, i would like to mention my YouTube channel, GMWolf. I don't think its suitable for beginners (though I do have a few videos on the basics of GM). But if you even want to learn more technical aspects of GML, I would obviously recommend it.
 

Niels

Member
I also had 0 programming experience before starting out with gamemaker (last year). Basicly following YouTube tutorials ( tutorials by shaun spalding, heartbeast, the concept boy and slasherXGames recommended) and reading the extensive library of help pages will get you pretty far
 

Xer0botXer0

Senpai
Learn as you go along. gms manual is of great help. Forums, as others have said youtube videos, you basically want to at least go over everything, some parts of gml will interest you, others wont. For example I'm interested in data storage and working with data so i've read up and experimented with variables. arrays, ds_map/list/grid, buffers and ini files. But I haven't looked at http requests and mumbo jumbo like that. I've looked at sprites and math functions and I've familiarized myself with Game maker studio. objects, sprites, scripts, timelines, backgrounds, rooms.

It'll take a few good years. But read about what seems important to what you want to accomplish/the game you wish to create, dont go too big. Every thing you learn in gml is something new to your arsenal of knowledge, the better you understand each concept the stronger your foundation will be when it comes down to making that game.

Like I said there's no need to learn it all at once, I haven't touched 3d or shaders. It's not relevant to my game right now. In the end if you work towards it you'll find a way to learn the language and make games, people can only aid in clearing out the road.
 
Top