GMS 2 Programming tutorials that are actually for beginners

Discussion in 'Programming' started by Alex IE, Aug 13, 2019.

  1. Alex IE

    Alex IE Member

    Joined:
    Mar 25, 2019
    Posts:
    14
    Hello all,

    Sorry if this topic causes some eye-rolls, but I'm really hoping someone can help me out here. I've been using game maker on and off for a few months now, and I feel like I've been getting nowhere. Every tutorial series I've seen that is recommended as being for "beginners" gets way too confusing a few episodes in, to the point where I'm just copying code without really knowing why things are coded the way they are in the videos. I'm not trying to attack specific uploaders or anyone in the community, but I don't see what I've been missing that everyone else seems to find so intuitive. I do understand some coding basics (and I do mean basics), but it seems that in so many tutorials most functions aren't really well explained. Even the game maker manual doesn't really explain what an array "is", and simply skips ahead to "what it can do."

    Are there any tutorials out there that actually explain concepts, and then shows how to utilize and build on these concepts in order to make a basic game? I hope this post doesn't piss anyone off, I am genuinely trying to get better and improve my coding, and I'd like to stick with game maker since I did purchase it, but not being able to get my head around these "basics" and progress to doing the things I actually want to do is becoming extremely frustrating. Again, sorry for the noob post and my sincere gratitude to anyone who can offer any advice besides "quit" or "git gud."
     
    Toque and SilentxxBunny like this.
  2. SilentxxBunny

    SilentxxBunny Epsilon

    Joined:
    Jun 21, 2016
    Posts:
    132
    I feel that. I've been using GM for most of my life and I only barely understand some of those concepts - not nearly well enough to explain them to you.

    wish I had a better answer... I'll be keeping an eye on this thread - because I think it could benefit me, as well. :squirrel:

    Personally: I find it very hard to learn anything by reading. Textbooks, documentation, long tutorials, etc. are more or less just "blocks of words" to me. Even after reading them several times - I don't always "comprehend" what I've read. Videos are a bit better for me... But I do best with "interactive learning" or "learning by doing." I wonder if there's anything like that. I'm going to ask Google - be back later. ;)

    Edit: In the interim - perhaps check out this tutorial on using Arrays in JavaScript (same principle - in a similar language.) w3schools does a decent job of explaining the concept - but I'll keep an eye out for something else.
     
    Last edited: Aug 13, 2019
    MaxLos likes this.
  3. CloseRange

    CloseRange Member

    Joined:
    Jul 2, 2016
    Posts:
    988
    I'm not sure why anyone would be pissed by this question.
    I'm studying to be a teacher and one thing i've noticed is that it's very hard to teach programming.
    programming is something that before you know how to do it it's super hard and makes no sense to the point that we ALL started out copying and pasting code.

    Once you do get it and it all clicks there is this big face slap moment where it's like "no duh! how did I not get this before??"
    and so when people try to teach it, to them it feels like you should easily get it too because it's "so obvious" and "clear" so there is no clear way on how to teach it.

    as for content makers.... I started out 10 years ago with rexfurry but he's been a dead channel for 5 years and looking back didn't do the best of tutorials...
    rn i think your best bet is Shaun Spalding as he's the current big game maker content creator but because I'm not a beginner anymore I don't watch many of his videos so I cant speak for the quality of them.
     
    MaxLos and SilentxxBunny like this.
  4. SilentxxBunny

    SilentxxBunny Epsilon

    Joined:
    Jun 21, 2016
    Posts:
    132
    Great recommendation! I've been following along with his GMS2 GML Platformer series recently. He does make a good effort to explain "why" before "how."

    The only problem I've had with them is getting to the end of the video - realizing I missed something - and being unable to figure out what I've missed... I find it helpful to reduce the video speed to 0.75. I think that's a personal issue, though.
     
  5. CloseRange

    CloseRange Member

    Joined:
    Jul 2, 2016
    Posts:
    988
    not at all. When I started I had the same problem I still remember having to rewind all the tutorials several times very slowly double checking all the code only to realize I misplaced one line or put the wrong variable.

    Keep it up and one day you'll be making games with no videos at all.
     
    SilentxxBunny likes this.
  6. IndianaBones

    IndianaBones Member

    Joined:
    Jul 5, 2016
    Posts:
    2,342
    This is a great question. There are some basic concepts that can get overlooked, but which beginners would benefit from being able to form a mental model of what is happening behind the scenes. There needs to be some solid rock foundations before you can build a house so to speak.

    Here's my attempt at giving an analogy for what an array is:

    --------
    They sure don't make tutorials like they used to! Back in my youth, I had to use these things made from trees...I think they were called books. Not being facetious, I actually went to the public library and read tons of books on computers. One of them had a fairly good analogy for computer memory, (with lots of helpful picture) linking it to cubby hole shelves like this:

    upload_2019-8-13_17-29-44.jpeg

    This is your computers memory at the start, a bunch of empty boxes.

    When you tell the computer you want to create a variable called "A", the computer goes and finds an empty cubby hole, and labels it "A" so it can find it later.

    So you have a cubby hole labelled "A", but there's still nothing in it.

    So you tell the computer to put something in it : A = 10;

    So now you have a cubby hole labelled "A", and it has a piece of paper in it with 10 written on it.

    Now the computer knows, whenever you say "A", you want it to go check the value of the cubby hole labelled "A" and give it back to you.

    You can make another variable called "B", and the same thing happens, computer finds an empty box, calls it "B", then lets you chuck stuff in there.

    upload_2019-8-13_17-33-36.jpeg

    Now, lets say I need to keep track of a players inventory, and it has 10 slots.

    I could create 10 different variables, A, B, C, D, E, F, G, H, I, J, K. Then I'd have somewhere to store each piece of inventory.

    BUT, it gets a bit tedious having to type out all these things. And what if the player is able to select one item that is attached to a hotkey for using it immediately in game?

    How would I keep track of that....I'd need another ten variables that were either true or false, telling me which of those A-K variables was the currently active one.

    E.g (if C was selected by the player)
    AIsSelected = false
    BIsSelected = false
    CIsSelected = true
    ...etc...

    This is where arrays start to come in.

    What if I could ask the computer to give me 10 boxes all at once, and only have to refer to them by one label!

    An array is like giving a name "Inventory" to the first box that is "A" in the picture above, with a bit of extra info - that is is an array 10 boxes long.

    So an array is just a special way of requesting a bunch of cubby holes and giving them all a single name.

    But, IndianaBones, I hear you ask....if the label "Inventory" is only on the first box, how the heck do I tell the computer to give me the info in the 6th box along, if it has no label.

    Well, then, as you may have seen, you tell the computer you want to look in the 6th box, by using the name of the array, and a number!

    So then you can say computer give me the item in box 6 : Inventory[6]

    BUT WAIT - there's a catch - computers like to number things starting from 0!!!!!

    So the first box is actually box 0
    Second box is box 1

    So the 6th box, we actually use the number 5 to access it : Inventory[5]

    This can take some getting used to at first, it takes practise and a bit of mental effort sometimes to fully master. But it will eventually click with repeated use!

    So, an array is basically just a tasty block of variables, with a slightly different way of accessing them.

    BUT WAIT, THERE's MORE!

    Now, if we want to keep track of which item is the active item, now we only need one variable: "activeItem"

    IF the players selected item is in box 6 (but wait! remember because the computer starts from 0, we'll use the number 5 to access it), I can just put : activeItem = 5

    Then, I can refer to this box/variable by going : Computer tell me whats in the activeItem box! : Inventory[activeItem]

    To change the selected item, I now only need to change the number of the value in activeItem variable, instead of messing around with all those true/false variables earlier above.

    IF YOU ORDER NOW, YOU ALSO GET the POWER of LOOPS!

    Because you can now access the items in an array using a number, you can use for() loops to scan through the array if you need to know something like : Holy Moly! the player pressed the "USe Health Potion" button - we need to find if they have any health potions left in their inventory....

    Code:
    for ( var i = 0; i < 10; ++i )
    {
        if ( Inventory[i] == Item.HealthPotion )
       {
            Inventory[i] == Item.Empty;
            PlayerHealth = MaxHealth;
            break; // Special command to tell the computer to stop the loop because we've found what we wanted and don't need to waste time looking through the rest of the inventory.
       }
    }
    
    If this is still as clear as mud, feel free to ask more questions so I can fill in the gaps.
     
    Remeuf, jackquake, Toque and 3 others like this.
  7. Alex IE

    Alex IE Member

    Joined:
    Mar 25, 2019
    Posts:
    14
    Thanks for the comments! Mixed opinions about Shaun's videos, certain videos were helpful but in others he kind of glosses over "easy" aspects of whatever programming he's doing that kind of throws me for a loop. It also seems somewhat contradictory to me how he sometimes ignores built-in functionalities of gamemaker (again, in beginner videos!) and instead chooses to code everything from scratch (because of "good practice" or something). Nothing personal against the guy, but the intricacies of manual camera control was kind of lost on me when I was still learning what a variable really was.
     
    SilentxxBunny likes this.
  8. JohnnyChaos

    JohnnyChaos Member

    Joined:
    Jul 16, 2019
    Posts:
    1
    I'm enjoying the TheSly's "how to make tile based platform games with gamemaker" on Udemy.
    He explains all the code and goes through the complex stuff fairly slow.

    One thing I don't like though is he sometimes goes through how to do something, then deletes it all and shows you how to do it better.

    Like you I too feel like I've been blindly copying code a lot of the time, but going back and editing things I realise more has sunk in that I thought, and I now feel I've had an "ah ha" moment with variables and if I went back through it again I'd understand a lot more.
     
    SilentxxBunny likes this.
  9. Homunculus

    Homunculus Member

    Joined:
    Jun 20, 2016
    Posts:
    853
    While Shaun and many others are doing a really great job with youtube tutorials, sometimes I feel like some specific tutorials are needlessly complex or fail to address who the target audience is. Shaun smooth camera movement is an example of both of the above, I watched it a few times but I still fail to see any good reason to use camera_create, involving matrices and projections, when camera_create_view does the exact same thing in a much simpler way and is probably all you will ever need for a 2D game. This is assuming you don't want or can't define the view in the room editor, which is probably what you'd suggest to a beginner at first. HeartBeast rpg tutorial series using physics for movement is another infamous example.

    Realistically though, you can't expect youtube tutorials to go into every little thing that's shown. If you really want to get the most out of those videos, you will need to investigate everything you see and don't fully comprehend by yourself by using the manual, forum or other sources. Just following the tutorial is not nearly enough.
     
    Last edited: Aug 13, 2019
    Bentley and SilentxxBunny like this.
  10. SilentxxBunny

    SilentxxBunny Epsilon

    Joined:
    Jun 21, 2016
    Posts:
    132
    This is a great answer. The cubby analogy provides a good visual image. :D

    Switching from "letters" to "numbers" was a bit jarring - but I think you covered it well.

    In past versions: I've always felt comfortable doing that... but with GMS2 it seems that straying from the tutorial (even for a moment) will invariably break everything. :bash:

    I don't know why I'm struggling with it so much... but I feel that I've gone off on a tangent, and that you're in more capable hands now.

    Thank you, everyone!
     
    IndianaBones likes this.
  11. Alex IE

    Alex IE Member

    Joined:
    Mar 25, 2019
    Posts:
    14
    Just want to throw out there that I've noticed the way different kinds of variables are used varies (hehe, get it?) wildly from one tutorial to the next. Is there a "right" time to use only temporary variables or is it down to personal preference? Also, for the sake of argument, is there a good reason why you wouldn't make every variable global in scope if there is any likelihood of re-using it later on?
     
  12. IndianaBones

    IndianaBones Member

    Joined:
    Jul 5, 2016
    Posts:
    2,342
    Another way to think of an array is ordering a custom made set of cubby holes, lets say I order a cubby hole unit with 10 cubby holes. The name of the array is written in big letters on the outside of the unit "Inventory". Each individual cubby hole has a number from 0-9 (total 10 cubby holes). You then refer to each cubby hole by saying I want cubby hole number 3 from the unit called "Inventory".
     
  13. Remeuf

    Remeuf Member

    Joined:
    Aug 11, 2019
    Posts:
    16
    I understand your frustration :)
    How to really explain a "print" or an "if" or a "variable" ... otherwise to enter the machine and code with 1 and 0 ....

    How to explain the literary word "wine" for example, where does it come from? Latin, Greek, or even further?
    My opinion is that it is useless (for the moment) to go so far but to swallow. The rest will come after I hope so.

    I start only (since 1 week) and I have an additional barrier (English) that I understand a little bit. So I am a baby who is learning little by little.
    Good luck !
     
    Toque likes this.
  14. Remeuf

    Remeuf Member

    Joined:
    Aug 11, 2019
    Posts:
    16
    This is only to not weigh down the memory of the computer, although our computers are more and more powerful. A temporary variable is used only once I believe and hop ... it disappears and alleviates the memory of the animal;)
     
  15. Homunculus

    Homunculus Member

    Joined:
    Jun 20, 2016
    Posts:
    853
    There's in general a very clear use case for every type of variable (local, instance and global). While sometimes you may get away using a global instead of an instance variable, it's definitely not up to preference.

    As said by @Remeuf , among other things (like performance in reading globals vs locals and scoping) variables take up memory, and being able to use them appropriately makes sure your game is not needlessly cluttered. It's also a matter of good practices and code maintainability: if you are reviewing a piece of code you wrote a few months ago (and chances are you don't remember what it does), seeing a local variable used in a specific script instead of an instance or global variable can give you an insight on understanding the code you are reading. Same if someone else in your team has to read your code: if I see an instance variable I automatically assume you are going to use that information somewhere else inside the object, which can be incredibly misleading if instead the variable is meant to be local.

    All of the above is to say that you definitely want to know why you are using one type of variable with respect to another.
     
    IndianaBones likes this.
  16. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,794
    If your goal is to master basic syntax, I think even a "basic game" is too lofty a goal. Out of the gate you are aiming 2 levels above basic syntax (basic syntax > basic components and patterns > basic game), so you are building a house with a third floor but no ground floor. Most "how to make a game" tutorials suffer from this same issue, and you shouldn't be surprised about your inability to understand basics if you're blindly playing along.

    As for why you haven't found the coverage you're looking for, there are 2 major perverse incentives against writing tutorials that cover basics properly.
    • Rookies don't search for tutorials on basic skills because they are too hasty to achieve their "dream" and don't know what the basics are called.
    • Training rookies to become competent developers decreases their dependence on tutorial channels and compromises future view counts.
    It'll take someone who doesn't give a crap about SEO or subscriber/view counts to make it happen. And I'm planning to be one of them.

    In the meanwhile, instead of continuing to try to make even a basic game, take a break and try making basic reusable components out of what you learned. For starters, use what you know about mouse events to make a menu, arrays to make an inventory, or loops to make bullet patterns. You'll be closer to the ground and get to spend more time on your own with basic syntax. That I think promotes better understanding than a whole game.

    This is something that I also find rather upsetting about my fellow instructors. Unlike me, they don't seem to take proper scoping seriously at all, and their students take that cue. They pay the price when variables, instances and other resources that should be kept apart start disrespecting each other's space.

    Here is the general rule for choosing which scope a variable belongs in:
    • Local variables are for holding temporary results of computation.
    • Instance variables are properties of individual things.
    • Global variables are properties of the environment in which things live.
    Each plays a distinct role and should not be mistaken for one another. In particular, you should never put everything in the global scope just to silence errors, or leave a temporary value in the instance scope just because you can't be bothered to add the var keyword.
     
    Bentley, Alex IE and IndianaBones like this.
  17. Alex IE

    Alex IE Member

    Joined:
    Mar 25, 2019
    Posts:
    14
    This was all very useful! I did make a few things on my own after doing tutorials awhile back, but I kind of hit a brick wall. I guess I just need to think in simpler terms for now. So what are some other good exercises you'd recommended for GML?
     
    Toque likes this.
  18. asollazzo

    asollazzo Member

    Joined:
    Jan 15, 2019
    Posts:
    41
    Couple months ago when I started learning programming/game maker I did all this guys videos tutorials and they really helped me with the basics. He goes through everything thoroughly and makes mistakes and then shows how to fix them which I think helped me.
     
    Toque likes this.
  19. curato

    curato Member

    Joined:
    Jun 30, 2016
    Posts:
    431
    I have thought on and off to do a tutorial series that was more centered around the core concept of programing and design to build knowledge of the core constructs and how to design a program so that some that has no programing experience could gain the logic skills and basic syntax they need to understand a tutorial or be able to layout and design something of their own an be able to look up the commands they don't know etc. But I have been rather busy with my own project and it would make more sense have the Q4 code updates anyways.
     
    Toque likes this.
  20. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    2,187
    Another option to learn the basics is to look outside of Game Maker. There are many basic programming courses available online for free and for a small price. For example, MIT has a number of their intro level programming courses available for free on YouTube.

    https://www.youtube.com/playlist?list=PLUl4u3cNGP63WbdFxL8giv4yhgdMGaZNA

    If you're looking for something more approachable, you could learn processing or processing.js (effectively java and java script) from the coding train (again on YouTube). Not only are there courses on many of the fundamentals, specifically as fundamentals (e.g. what is a for loop) but it is an active channel with many many videos and especially many short fully contained videos with small projects

    https://www.youtube.com/user/shiffman/playlists?view=50&sort=dd&shelf_id=2

    (I'm trying to link to the playlists so hopefully that works).

    While learning outside of GM does mean you'll pick up things related to a specific language that won't be applicable, you'll also learn the basics of reading other languages, which is very helpful as there are many coding problems that have been solved in other languages but not necessarily in GML.
     
  21. Toque

    Toque Member

    Joined:
    May 25, 2017
    Posts:
    1,175
    Learning game maker ( game development ) is hard.
    Computer programming is hard. You have to write sentences in a strange language syntax on abstract concepts that often return nothing visually.
    Then you put this foreign language in a box with 100 buttons and drop down menus windows and they sort of link together.

    Now everyone around you knows what’s going on. Great. Now you feel stupid. The forum has lots of help but its unrealistic that they can teach you how to program.

    I dont know any tutorials or perhaps what your asking for a class for learning the entire language. As far as I can tell its mostly self taught. Like most skills lots of practice and repetition. Watch lots of different tutorials and things will start making sense.

    I like the cosmonauts tutorials. Lots of good stuff in there.

    You can do lots without Var and arrays. I know I do. You can program without knowing 80% of the language. Then add as you go. I find its better to learn things as I need them and when I see the practical use of it then it actually makes sense. Unfortunately tutorials have a mish mash of concepts that you need and dont need.

    I hit a wall a few months into GameMaker too!!!! Just keep going and it will get easier and better. A painful hump and then you will get there. Hang in there.

    I wish there was a true university or community college course on GML that I could take. That would fit my learning style. (course for old and stupid person)
     
    Last edited: Aug 13, 2019
    Remeuf likes this.
  22. Toque

    Toque Member

    Joined:
    May 25, 2017
    Posts:
    1,175

    Make a little game in the upcoming game jam. Keep it really really simple and just have fun. Its a great feeling to start and finish a game too.
     
    Last edited: Aug 13, 2019
  23. Remeuf

    Remeuf Member

    Joined:
    Aug 11, 2019
    Posts:
    16
    Maybe my method of getting started can help or not ;)
    For each line of code in a tutorial, I explain what I write by looking in the manual. Sometimes with examples. Then I print all the code on paper, like a book that can be consulted at any time. It is very long but it forces me to understand and memorize.
    Example of a small piece of code from the Space Rock tutorial:
    Code:
    // Event create = pour initialiser les variables, créer des choses une première fois, etc...
    
    // permet de choisir aléatoirement entre plusieurs sprites au début.
    // sprite_index renvoie l'index de l'image en cours et peut être changé par une autre
    // renvoie -1 si pas d'image associé
    
    sprite_index = choose (sp_large_Aste, sp_small_Aste, sp_med_Aste);
    
    // irandom renvoie un entier aléatoirement mais génère la même chose 1 seule fois au début de partie
    // exemple : if irandom(9)=1; {scrore += 100;} --> 1 chance sur 10 d'ajouter 100 au score
    // randomize au début de partie permet de "randomizer" la graine au départ comme une sorte de shaker
    // randomize();
    
    direction = irandom_range(0,359);
    image_angle = irandom_range(0,359);
    speed = 1;
    
    // move_wrap permet de faire ressortir l'objet de l'autre côté de l'écran
    // move_wrap(horizontalement, verticalement, marge) --> margin = à quelle distance du bord
    // sprite_width = largeur du sprite en pixel
    
    move_wrap(true,true,sprite_width/2);
    image_angle = image_angle +1;
    
     
    Last edited: Aug 16, 2019
  24. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    7,350
    Personally, I think most of the tutorials out nowadays for GM and other languages are far more beginner friendly than what I had growing up. My first programming tutorial was the BASIC manual that came with my Commodore 64, which didn't help much at all. So I had to check out books from the library for more help, which most of the stuff flew right over my head -- I was only 9 or 10 at the time. The only thing I ever learned how to do was play one channel of sound and lock up the system with a PRINT loop. I never touched coding again until GM5. Back then, I didn't even really have tutorials that I knew of. I would just scour the forums (very time-consuming on DSL) reading everyone's conversations. Eventually the Tutorials forum started to fill up and I would pick through them, usually looking for tutorials from the members I respected the most. It was like the forums are today, with lots of misinformation from other people learning as they went as well, even from the more experienced members.

    That was one aspect of the old forums I really liked, looking back on it. Our codes were really sloppy and often project-specific resulting in countless bugs. Everyone was still learning GameMaker and most of us had little or no programming experience, so we were almost always debugging each other's projects. It was nice whenever Mark, Mike or Russ would pop their head in to help out with discussions too. The more we debugged other people's codes and not just our own, it became clear to some of us that the current conventions seen around the forum were not good codes. I remember one game in particular that I downloaded and really, really enjoyed playing at first because it was so well presented and fun -- until I broke it (lol). On a gamepad, the game would have been nearly perfect, but on a keyboard I could cause all sorts of movement glitches. Also, sadly, the game was broken from the start by an image_xscale glitch that remained in GM until some point into Studio1. As these bugs reared up in games, we were forced to try different codes to get around them. Some beginners would just add more conditionals, bloating their code to crazy levels. Others (like me at the time) would look to GM's functions (I had an engine based around collision_line that worked well enough, but it was just too slow). The "pixel-perfect collision" code that's so popular around here didn't become a regular code until late in GM's life, then some members were like, "Hey, that's a cool code," and it became a staple; same with the "right minus left" code for determining direction based on conflicting key inputs.

    They're not necessarily perfect codes and not always useful -- "right minus left" is only useful for multi-button inputs like keyboards; "pixel-perfect collision" is unnecessarily over-intensive for some games. GM's physics engine is nifty bloat code that makes physics-based programs much easier for people to make; but as Catan pointed out, some people overuse it even in tutorials. To a lot of the newbies around here trying to learn from tutorials, it might seem like we are constantly bashing tutorials like Shaun's, or hating on people that watch their videos, but to an extent they helped out immensely around the forums by answering a lot of frequently asked questions with their videos. The negativity surrounding their tutorials comes from bugs in their code, lack of proper video editing, needless complexity (as Catan pointed out), as well as the over-reliance on blindly following the tutorials without any real effort to understand the core concepts of the videos on the part of the viewer -- which is one of Frosty's biggest peeves. We don't hate them, we're just overly critical of them. (lol)

    As for me, these forums and the old forums, as well as Reddit discussions around the web, did so much more to get me into programming than any of the old books I used to read at the library. I kind of wish I had taken CS courses in college, but those early years trying to learn BASIC ruined coding for me until I found the GM forums. And that's my advice -- just read through as much of the forums as you can. You're not the only person using GM to not know what an array is or not comprehend even a smidgen of the usefulness of certain functions in GM. The forums answer most questions you might have. Those that aren't answered, you can ask here or just set out to understand on your own -- there are lots of posts about how to do that, too!
     
  25. TheSly

    TheSly Member

    Joined:
    Jan 16, 2017
    Posts:
    1,015
    I make tutorials, and my whole first series is based on D&D, but I am also aware it's not for the very basic beginner. Even though I try to break things down, it does get pretty complex. The reason for that though, is you can only hold peoples hands, and do the very basic intro stuff, for so long before you lose your audience fast. The one thing you need to learn when trying to learn GM, or pretty much anything, is there is no one course fits all. You will be required to go out and find answers in many locations, as we all have different experiences and backgrounds, so we are all at different levels.

    Programming is difficult. It takes time, and patience, and if you give those things to it, you will eventually be rewarded. If you have a query, google it. Read other people's finding. Stand on the shoulders of those who have worked out a similar problem years before. As @TheouAegis mentioned, I also started with Basic on Commodore 64, and damn it was hard. I'd type out pages of code from a magazine and then run it to have it fail, and not know anything about fixing it. That left a bad taste in my mouth, and even though I dabbled with coding, it was a difficult thing to learn with the limited resources available. The amount of info on Google through Reddit/forums and youtube tutorials these days is amazing. Really, anyone can learn to program if they invest enough into it.

    Keep trying, keep searching, keep learning...one day it will start to click and you'll think of what you want to do, and actually know how to code it. It's an exciting moment :)
     
    Toque likes this.
  26. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    2,052
    On the plus side, once you've learned programming with one language, you can apply much or most of the thought processes and methodologies you've learned to other programming languages.

    While I too dabbled on C64 basic (trying to write text adventure games mostly) my first serious go was writing assembly code on Amiga for demos. That's the MC68000 processor family, in case someone's interested. I mostly used a reference manual to learn, as scene people I knew tended to jealously guard their code. Then for job purposes came PHP, JavaScript and related stuff. After all that, starting to learn GML was not a big hurdle.
     
  27. Remeuf

    Remeuf Member

    Joined:
    Aug 11, 2019
    Posts:
    16
    Ah ah .... the Amiga, commodor, Zx Spectrum, Amstrad CPC128, Mo5! the basic! too funny...
    Me too, I started the basic on these machines, it was magic. Today, after 35 years of absence, I try to feel the same sensations here with GM. At the time I had a brother, a big head, who guided me.
    Already, visually editing a variable that moves or even a string of characters, excites me. I find a little the good things of my youth.

    N.B: know that there are many, many more tutorials in English than in any other language. Not easy to find something serious in your mother tongue! a big problem for me.
     
    Last edited: Aug 17, 2019
  28. Toque

    Toque Member

    Joined:
    May 25, 2017
    Posts:
    1,175
    Apple IIe basic. Crushed learning Amiga C. The manual was terrible.

    Sometimes I have to watch several tutorials to find one that clicks.

    Why doesn’t non English users make tutorials?
     
  29. Remeuf

    Remeuf Member

    Joined:
    Aug 11, 2019
    Posts:
    16
    Oh yes, there are tutorials in all languages I think. Maybe not in Celtic, Catalan or Pygmy ... I do not know;)
    But the resources in tutorials are much more important in the language of shakepeare simply because it is an international language.
     
  30. Alex IE

    Alex IE Member

    Joined:
    Mar 25, 2019
    Posts:
    14
    I appreciate all the responses, but I think we've gotten off track a little bit. Certainly, it is interesting to look up other people who had the same problems as you, but I am interested in understanding the "why," not the "how." I want to get away from copying code from other people who already have it figured out; because I am simply not at the level where that explanation would make a lick of sense! To me it's like browsing around the philosophy section of wikipedia, noticing that something isn't there,wanting to learn about it, and then attending an advanced lecture on the topic full of people who know quite a bit (at least from my perspective). There I'd probably hear plenty of answers, but they would not be in a language I can even remotely understand! To sum up, it frequently appears like steps are missing between literally starting out in GMS and to what everyone else seems to refer as "beginner," but from where I am seem like absolute geniuses. As I mentioned, even the game maker manual is somewhat deficient in this regard, it skips ahead to telling me how to use something before I know what I'm looking at!

    What I was hoping for was something a bit more carefully curated (again) for a "beginner," not someone seeking to suss out an annoying block of code who is already far more grounded than myself. Things more along the explanation IndianaBones posted, in other words. Simply looking stuff up might not always be helpful for someone on my level simply because not everyone can explain things equally well, or perhaps (as I mentioned) the target audience for that original discussion was way above me in terms of ability. Again, I don't want to annoy the guys who've been at this for ages, but clearly I'm not the only one with this issue. I will look at anything you care to throw my way, and be most grateful to have received it. :)
     
  31. curato

    curato Member

    Joined:
    Jun 30, 2016
    Posts:
    431
    I was googling around. This series looks like it is super basic. I didn't watch all of everything, but it looks like it is talking core program concepts not how to make a certain game type.
     
  32. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    7,350
  33. AdventurousDrake

    AdventurousDrake Member

    Joined:
    Sep 11, 2016
    Posts:
    15
    I was exactly in your situation, and still is to a certain extent but I am finally evolving. The solution for me was this book https://nostarch.com/pythonforkids, I got it on a humble bundle but I think it's worth the full price (at least for me). It actually explains how things work behind the code and teaches you the basic principles of programming. I've tried all kinds of other books and video tutorials and failed every time.

    I've come realize that all these "beginner friendly, no coding experience needed" only explains how the Game Engine works, but gloss over the fact that you most likely don't know the basic principles of programming and that he/she needs to explain the what, how and why, as you pointed out.

    For Youtube videos, I can recommend Heartbeast, I feel his explanations are the easiest to understand as he actually tries to explain the "why" visually. I know not everybody likes him and the code can be buggy, but from my perspective as long as you don't understand the basics of programming he is the easiest to follow. Once you know though, all others like Shaun, Friendly Cosmonaut etc are going to be really good tutorial resources.

    I hope this helps a little bit at least.

    EDIT: Forgot to add that the book is covering the Python language, which I think is probably one of the easiest languages to get started with.
     
    Last edited: Aug 18, 2019
  34. Alex IE

    Alex IE Member

    Joined:
    Mar 25, 2019
    Posts:
    14
    Hi all, sorry to revive an old thread, but beginning to get desperate.

    I've been watching the videos some people here recommended, and attempted to begin to learn python with the "python for kids" book. Long story short, I seem to be getting nowhere, and I have no idea why. I can understand the basic concepts and functions to a superficial degree(while doing the recommended exercises to the best of my ability), but when it comes to putting everything together to make something approximating a program or a game I quickly get in over my head. The explanations are simply not cutting it, and this being a book for kids, I don't know how much simpler it could get anyway. "Python for babies?" "Python for Embryos?"

    I understand that practice makes perfect with these things, but it always just seems to get to the point where I'm mindlessly copying code. I can't even explain why my tutorial code works, let alone use this knowledge to even make the most basic games on my own, which was why I started learning in the first place.

    Again, I'm not trying to complain, or attack anyone, just honestly looking for help. It seems like I've been going in circles with little or no progress for about a year now. I really don't want to quit, making a game has always been a dream of mine, and I think I have at least average intelligence and problem solving skills. Just don't know what else to do.
     
  35. Toque

    Toque Member

    Joined:
    May 25, 2017
    Posts:
    1,175
    Because programming is complicated and can be difficult. GM is not a toy.

    I’m a year into GM. So I can relate. I can make little jam games. Just simple stuff. But I’m kind like you. Thought I would be better than I am today.

    everybody is different. I wish I was young again and doing this......

    Doing the jam games was good. You can accomplish and finish something. Focus on what you know not what you don’t. You have to actually apply the knowledge before it makes sense. Watching a tutorial is only 20% of the full learning value.


    I’m talking really simple games. I bet you know more than I do.

    I find you have to make a game and put it all together to learn. Apply the skill.

    I like your staying power!!!


    PM you.
     
    Last edited: Jan 1, 2020
    devKathy likes this.
  36. devKathy

    devKathy Member

    Joined:
    Dec 31, 2019
    Posts:
    19
    @Alex IE

    I'm currently trying to improve as a teacher. I've also been using Game Maker, Python, C++, C#, etc for a good chunk of time now.

    EDIT: Forgot Prolog. Can't leave that one out ^_^

    If you have time you can keep me appraised of how you're doing and can PM me from time to time. Maybe you can let me know where things are less clear when I explain, etc. I'm quite busy with my class but I'd be happy to help as time allows. :)
     
    Last edited: Jan 1, 2020
    MaxLos and Toque like this.
  37. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    2,187
    This was one of the posts that inspired me to start doing tutorials. Here's my (newly started) attempt for more basic programming courses using GML: https://forum.yoyogames.com/index.php?threads/coding-fundamentals-in-gml-tutorial-series.70417/.

    Programming is a lot like lifting weights, in one sense it isn't hard, pretty much anyone can do it, but in another sense it is very hard and there are no short cuts. It just takes consistent practice over time. So getting it at a superficial degree is fine. As long as you keep at it, you'll get there. Making any type of complex game is one of the harder programming tasks you can attempt, and draws on a lot of different areas - and I don't just meant art, music, programming, but within programming you have things like coding UI, inventories, movement, AI, and so on all of which are very different and require a different skill set.

    And while this advice is probably obvious, don't compare yourself to others too much, you don't know their backgrounds or what they come to programming with. Maybe they have prior experience, maybe they have a strong foundation in other subjects like math or logic. Maybe they have more time, less stress, and so on.
     
  38. Snugglefry

    Snugglefry Member

    Joined:
    Nov 14, 2019
    Posts:
    11
    You just have to follow along at first. There are plenty of things you will not understand even if someone does explain every little detail. I suggest picking 2 complete start to finish make a game tutorials. Follow along from start to finish on one. Then do the exact same thing on the other.

    Then go back to the first one and make an effort to tweak and change anything you can. Then do the same thing with the other series.

    Now go back to the first one, and go ham. Then the second one. And Boom you will not need tutorial training wheels nearly as much.

    Month 1 - Follow along series 1.
    Month 2 - Follow along series 2.
    Month 3 - Tweak and change a redo of series 1.
    Month 4 - Tweak and change a redo of series 2.
    Month 5 - Go all out on making series 1 your own thing while having the tutorial series as your frame of reference.
    Month 6 - Do the same thing for series 2.
    Month 7 - Your skills will be noticeably different.
    I always watch a tutorial video more than once before I even start to implement the code. Game Dev tutorials are my Netflix.

    Oh, and READ THE MANUAL!!
     
  39. Desert Dog

    Desert Dog Member

    Joined:
    Jul 30, 2019
    Posts:
    66
    Programming is first and foremost just a type of problem solving. You need/want to achieve something, and you use programming to achieve that goal. No need for the code to be pretty. It just needs to do the job. You can learn about engineering nice software once you're able to use basic programming to achieve simple solutions.

    Curious, but have you started, and finished any game/demo with GM?

    The process that most (non-programmers) take with GM is they decide on a game they want to make. Say: Let's say you want to make a breakout/arkanoid game.
    You search the official website, and you find a good looking tutorial that's close to the game you want to make. You try 3-4 tutorials, and poke around a bit.

    You follow one of the tutorials through to create your base game engine. (Question: Are you able to follow a tutorial through to create your base game engine?)

    Once you've got your base engine, you can pen/paper a few game design ideas to extend your game. Then you figure out how to code these new features. This code could be done by:
    • Checking the other breakout tutorials for features that the tutorial you followed didn't have: But you want.
    • Checking other (non-breakout related) tutorials that contain features which you're looking for.
    Say for instance, you want to have a brick that spins slowly. You're not really sure how to code that, and none of the breakout tutorials have that code. Do you have a good idea how you'd go about finding out how to code that?

    Also, copy and pasting isn't that bad. It might feel like you're not learning something, but it's better to *do* than not to do. No need to be so stubborn to not copy/paste code, and then end up with nothing.
    (Although, don't literally copy/paste it; Type it out yourself so as to trigger those brain neurons)
     
  40. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    7,350
    Maybe I'm old-fashioned, but I'm actually opposed to copy-pasting. Grab a notebook and WRITE the code out by hand. I hated taking notes in school -- even in college, I rarely took notes; when I did, they were usually illegible -- but as I got older, I found myself looking for any kind of writable surface and a pen to jot things down. At work, I'll jot down a list of things I need to grab from the back either on my hand or a piece of cardboard; when I get to the backroom, I rarely look at my list because the act of writing it down helped me memorize it. Do the same thing with code -- write it down on paper. I've even done this at work during breaks and then I hardly look at the code I jotted down at work when I get home and finally put it in GM. I mean, sure, you're going to be typing code into GM, so it would make sense that you'd want to type code as you learn, but I think what you learn from typing code and what you learn from writing code are two different things.

    Hear the code. (opt.)
    See the code.
    Write the code.
    Type the code.

    You use a different part of your brain with each of those. The more neurons you dedicate to that code, the better it will stick.
     
    Desert Dog and devKathy like this.
  41. Desert Dog

    Desert Dog Member

    Joined:
    Jul 30, 2019
    Posts:
    66
    Yeah, that's pretty old-school, but good advice. To clarify, copy/paste in this context would mean using someone else's code that they've written, not you. I don't think the OP should feel bad about reusing someone else's code for their game engine: It's just a part of learning. (You don't know, what you don't know!)

    But definitely should at least type the code. (Hand writing the code is a little bit hard-core, but could definitely help if someone is really serious about learning)
     
  42. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,794
    Have you ever traced a piece of code? Given that you "can't even explain how your piece of code works", you probably haven't. Yet knowing how to do this is the top predictor of success in programming, and it's been backed by reports like this one and years of research in computer science education.

    You are NOT done with a tutorial when you have a product. You are done with a tutorial when you know how every part of the product works, and that means tracing it. So why are you writing off tutorials when you aren't even done with them? You can't count on others explaining everything for you. That's not what being a grown-up entails, and programming is for grown-ups.

    Take the last tutorial you gave up on for being "useless" and trace through every piece of code it contains. Go through this process with each piece:
    • Propose several possible starting states
    • Predict the expected resulting state from each starting state
    • Perform a trace on paper or mentally from each starting state
    • Compare each trace result to your predictions
    A common example is this:
    Code:
    var dx = keyboard_check(vk_right)-keyboard_check(vk_left);
    x += 5*dx;
    
    • The starting state could be neither key pressed, left pressed, right pressed, or both left and right pressed.
    • The expected result is a horizontal movement of 0, -5, 5, 0 respectively.
    • Trace:
      • First line gives a dx of 0-0=0, 0-1=-1, 1-0=1, 1-1=0 respectively.
      • Second line gives a horizontal movement of 5*0=0, 5*-1=-5, 5*1=5, 5*0=0 respectively.
    • The traced result is the same as the expected result.

    If you actually have at least average intelligence and deserve to be in this line of work, you must learn to trace both code you receive from others and code you write yourself. Copy-and-paste coding should be condemned not for being fast, but for not involving tracing and genuine understanding.
     
  43. Alex IE

    Alex IE Member

    Joined:
    Mar 25, 2019
    Posts:
    14
    Thanks guys, I appreciate the support and the resources.

    I have done this to some extent; the problem that I noticed while troubleshooting the errors on my modified tutorial projects was that I couldn't understand a lot of the jargon in the manual, or on sites like stackoverflow. Rather than learning to code just to make "my dream game" or whatever, I instead have attempted to try to learn the "right way" so that my knowledge could in theory be transferable to any type of game I'd like to make in the future. Could you suggest something that might help?

    I have made a basic game heavily based on tutorial code. There were one or two other such projects I started, but then gave up once it became clear that I didn't understand the tutorial code well enough to expand on any of those ideas in a meaningful way. My success with adding in others' code to my own is also very limited, as I've said before, because I can't seem to get a grasp on programming logic, syntax and the "language behind the language" so to speak, so it seems next to impossible to suss out problems when they crop up. I thought it would be more beneficial for me in the long run to learn without copying, starting at the most basic level. That's pretty much where I am at the moment.

    Putting aside the somewhat condescending tone and the question of my own intelligence, maturity and what I do and do not "deserve," I would like to better understand what you mean by "tracing" code. Does it mean to simply write it out first? I've never come across that terminology yet in the tutorials, videos, and textbooks I've tried. Thanks in advance.
     
  44. Daniel Mallett

    Daniel Mallett Member

    Joined:
    Aug 24, 2017
    Posts:
    175
    There is nothing like being able to have a direct conversation with someone about issues you find confusing or need clarification. I like to think of myself as a fairly competent programmer/logistician. I do however lack creativity. Let me know if you would like to work together. I need a creativity injection and would be willing to help with your programming on a one to one basis. Let me know if you'd like to hook up as it were.
     
  45. TheSly

    TheSly Member

    Joined:
    Jan 16, 2017
    Posts:
    1,015
    That's just FrostyCat being helpful. He likes to belittle people, and then help them. It's weird, but he means well, and offers good advice if you can look past that.
     
  46. Alex IE

    Alex IE Member

    Joined:
    Mar 25, 2019
    Posts:
    14
    I may be reaching out to a few of you guys at some point from the looks of things, once some IRL things calm down a bit. I really appreciate all the offers of help! :)

    I suppose the username should have been a giveaway then? :D It's all good, I've learned to check my ego at the door on such occasions.
     
  47. chamaeleon

    chamaeleon Member

    Joined:
    Jun 21, 2016
    Posts:
    1,063
    Tracing the code means that you take on the role of being the computer. Your memory is the ram, and your thinking ability the processor. You set up scenarios (variable content and program state) in your mind (or on paper or in a text editor if needed) and you simulate the running of a part of code by looking at the code and and imagining what happens with your variables and program state, perhaps in conjunction with pretending that particular inputs where given like key presses.

    What @FrostyCat is trying to get you to do is to understand the code by understanding what happens step by step and how it influences the execution of later code. At some point during your programming adventures, if you spend enough time doing it, it will become second nature. But you need to start doing it. And by having small projects in the beginning you keep it manageable.

    If people did more of that, there would be a distinct drop in certain types of questions around here, but rather than doing this exercise some people tend to just have someone else do that work by asking "why doesn't this code work?".
     
  48. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,794
    I think I have a pretty good handle on why things aren't working out for you: You need to work on your reading comprehension.

    One thing that frequently riles me up in the Q&A is people blatantly missing instructions laid out in the open. If you don't know what I mean by tracing code, it means you haven't read either of these from my previous post that clearly demonstrate what tracing code is:
    chameleon and I don't look eye-to-eye on a lot of things, but even he got my point.

    If you could miss both the external link teaching you how to trace and the example of a trace in my previous post, how many of the main points would you miss in something the length of an average tutorial or book? How many blatant problems in your code can hide in plain sight?
     
  49. Desert Dog

    Desert Dog Member

    Joined:
    Jul 30, 2019
    Posts:
    66
    Hmm, ok. Are you comfortable with Drag and Drop coding, or do you just use whatever is in the tutorials? Honestly, you may just need to use Drag and Drop for a bit until you're comfortable using GM to make simple games.

    Let's put it this way: With learning there are two aspects we could look at: Learning pure programming, and learning to use GM (or learning Game Design).

    When you're making a game in GM, you're not just writing a simple code that stands alone: you're actually just adding a piece to an existing game engine: The GM 'game engine' is underneath your game: You've got pre-built Rooms, Objects, Sprites, and other such objects, with built-in functionality. When you create a new Object, you're creating a new piece of an existing engine: And that Object doesn't exist by itself. It has to live in a Room, it has to have a Sprite set to it. That Room itself has a framerate set (30 or 60 frames per second), so you have to make sure that the Object moves well within that, and Sprites can have different attributes, too.. Angles, and Animation Speed.

    So: For purely learning 'programming'.. loops, arrays, variables: This is actually kind of a messy environment to try learn in, which makes it not ideal for learning pure programming. Because you might just want to test how an Array looks, but you've got to have Objects, and Rooms, and Events set up just to get a bit of code to look at an Array.

    But for learning Game Design: It's great! Just by doing the basics, you are already learning about the process of designing a simple game. Create a Game Room, Creating a few objects in the room, add some Events (clicking/keyboard) so the player can interact with them, etc. These are all common elements in just about every Game Engine.

    Creating games with Drag n Drop is fairly easy. Because it's intuitive: Sure, you can make mistakes, but you don't have to sit reading a manual, and make sure you spell everything exactly right: You can just use your mouse, check, drop, run the game to see, try again, etc. You don't really need to know what a block does before trying it. So 1 hour development is you actually playing around in GM learning, rather than 1 hour staring at a Youtube video. You'll develop a better understanding of the Events for Objects, and about setting up. When you're fairly comfortable in the GM environment, and you think you've got a fair idea of how all the pieces tie together, you might find transitioning to a pure code-based development easier.


    Note: Don't be put off Dragn'Drop and think you can't make some nice designs with it because it's simple.
     
  50. Toque

    Toque Member

    Joined:
    May 25, 2017
    Posts:
    1,175
    The difficulty with learning is that everyone is different. What works for one person doesn't universally work for everyone.

    I find tutorials introduce too much new material at once. The more you learn the less this happens though.

    Repetition is your friend.

    I find doing is the best learning. You have a problem. You figure out a solution. You learn something. People here have 2,3,5,10 years working with code and GM. They make it look easy. They put in the time and effort and it shows.

    You haven't failed until you stop trying.
     
    MaxLos likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice