• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Looking for a good guide to programming

SophosMoros

Member
I am looking for a guide or book or website that offers a way to "learn to fish" instead of feeding me fish. I have watched tutorials and they are helpful but programming is a way of thinking and I want to learn how to train my mind to also think like a programmer. I am a designer, worked on AAA games, I have a degree in computer animation, and I understand some basic parts of programming but I just don't know how to look at a problem and construct a solution like an engineer would. I break things down from a design standpoint every single time then I get to the code and I completely draw a blank on how to set them up.

I think what I am looking for specifically and what I would benefit the most from would be if I could find some guide that goes over a concept whether it be loops, arrays etc. Then provides exercises where I would take what I just learned to solve the problems. I don't want my hand held but I may need some guidance until it really starts to click. I view coding as a tool belt and you have to know what tool to use to get the job done. I understand the tools but if I don't know when I'm supposed to use them or how to best use them I cannot do the job.

Does anyone know where I might find something like this?
 

TsukaYuriko

☄️
Forum Staff
Moderator
I'll move this to Programming.


Start GM:Studio. Select the Tutorials tab. (The Demos tab becomes interesting once your basic understanding of GM:S and its components has improved, too.)
Keep the manual open in your browser at all times (or open it from within GM:S under Help -> Open the Manual). Never hesitate to look up things that don't sound familiar using the manual's search function.
 
J

Jaqueta

Guest
Keep the manual open in your browser at all times (or open it from within GM:S under Help -> Open the Manual)
Middle Mouse Button is one of your best friends when checking examples, if you click on a function with the MMB, it will automatically open the Manual Page showing you what this function do, this also works if you want to quickly open a resource (sprite, script, object...).

IMO, one of the best way to learn GML, is opening other programmers examples/source codes and try to understand the logic behind it. It's a good idea to download the ones with commented code.
 
S

Snail Man

Guest
Honestly, the best way to learn to program is to program. A lot. If you just practice a lot, you'll find one day that it's second nature
 
L

lovareth

Guest
Agreed with Snail Man. Just keep programming and you will learn more. I admit that i only know how to used if - else statement not too long ago. But by using more and more gml functions, i have learn complex programmng statements. And personally, game programming is mostly mathematically. But i think that isn't the problem as you already have a degree ;)
 
M

Moon Goat

Guest
I learned most of what I know about programming with GML from Shaun Spalding, HeartBeast, and the good old GMC!
 
J

jackhigh24

Guest
i dont think of it as learning code or the functions as you would never or have trouble remembering them anyway, i just lay a game out like a flow chart you no one of those things that say do you like pie yes then this way, no then this way, thats really all i needed to figure out, the rest just come from trying to find the function that would do what you think needs to be done, then read about it and see if its fits in with what you thought. but still have read through all functions in the manual as that helps a lot even if you cant remember them, when you need to do something that a certain function would help with as you already read them all a little bit will stay in your mind and help you track it back down in the manual, after some time it all gets embedded in your brain and its just a lot easier from then on.
 
B

bojack29

Guest
Youll juat have to tinker with it. Get as much resource as you can from other people. Youll find neat tricks from people along the way like adding boolean values, empty alarms, FSMs and so on.

Ive built a large asset tray of different genres of games for people to peak at the source code if your ever interested.

https://marketplace.yoyogames.com/publishers/2297/bojack29

Best of luck to you!
 
P

Paolo Mazzon

Guest
Generally speaking, I would go with video tutorials for absolute beginners. I learned GML initially from video tutorials (Which are now taken off youtube) and after that, I learned a ton just from things on the GMC. Then I learned C++ from a written tutorial, and then hundreds of hours of tinkering and reading stuff on Stack Overflow. If you're going to use videos, I would recommend Shaun Spalding because he explains everything well; you will actually understand what he's doing. Written tutorials are good if you're cool with reading a ton and experimenting a lot. Once you have a basic grasp of the language, it would probably be a good idea to dig through the documentation and read how the language works.

I remember the developer of Gunpoint or Risk of Rain (I don't remember that well) was talking about how he learned GML, and he said he did everything in DnD until the DnD got out of hand, so he would look it up in the manual and replace bits and pieces with GML to make it more compact. A bit more contrived method, but obviously worked out in the end.

With all due respect to bojack, but I would not recommend looking at source code to learn. If someone simply gave you a working car, it would take you a lot longer to figure out how everything works than if you had a mentor present building the car with you. That said, once you understand how things work, looking at other people's code can help you a lot, since you can see different (And possibly more efficient) methods at solving problems you've come across.
 
T

TheMatrixHasMe

Guest
I'm going to second what a lot of people are saying in here. I know it goes contrary to the advice you're looking for but the best way to learn programming is to go through tutorials to get started but mainly just give yourself projects to work on. The best way to learn is by doing. Programming is just problem solving, but problem solving a lot! When one problem is solved the next one begins! Months later you find you're fluent and understand a lot more! Your brain will adapt and learn. If I take you to mexico and give you a how to speak spanish manual then when I pick you up a year later, I bet you'll be able to speak spanish. So, here's your spanish manual. https://docs.yoyogames.com/
 

Roachant

Member
One more tip, type out the code yourself instead of copy paste and add your own comments as you go. It sounds odd, but I know of a few people who copy paste everything and then don't understand how anything works.
 
Z

zircher

Guest
One more tip, type out the code yourself instead of copy paste and add your own comments as you go. It sounds odd, but I know of a few people who copy paste everything and then don't understand how anything works.
Solid advice. Typing helps to reinforce memory and (heh) introduces you GMS's syntax checking and highlighting.
 
Top