ee

Mostly game development, sometimes other things. I work in GameMaker Studio, and occasionally play with Roblox.

Blog Archive

Wednesday, June 25, 2025

Noobs beware! older GameMaker tutorials don't work.

As per my last blog post, I was trying to refresh my skills. I was partially following the old Matharoo tutorial and the Peyton Burnham rpg tutorial, when I kept running into walls. 

It's been hours and I've gone nowhere! 

All the code I had written in my TXT file was trash. Literally none of it worked even though it was a near 1 to 1 copy of the tutorial with some names adjusted for clarity. (moveSpeed instead of move_speed) I thought I understood the math, so adjusting some names and cross referencing both of the tutorials should've worked. 

NOPE, nothing. It wouldn't even take the inputs. It was like it had no code.

So I recreated each of the old tutorials band for band and I still get nowhere. With my limited knowledge, the only way I could make that work was by copying the 8-way movement from the GML manual. It seemed like it was working, and I was happy even if it was a little stretched out. I tinkered around with the x and y values for speed and thought I was doing alright.

Now I'm trying to avoid using too many variables because I assumed that's where the problem was. I move onto collision, and I cannot get the math to function without custom variables. What the manual gave me was a giant If, Else monster, but it worked and was easy to read. Easy to read doesn't equal easy to work with, and I learned this the hard way when I had to scrap my previous work because I couldn't work around it.

The modified manual code was something like this, but without the "moveSpeed".

//controls and movement speed
if keyboard_check(vk_left) or keyboard_check(ord("A"))
{
    x += - 1 - moveSpeed;
}
if keyboard_check(vk_right) or keyboard_check(ord("D"))
{
    x += + 1 + moveSpeed;
}
if keyboard_check(vk_up) or keyboard_check(ord("W"))
{
    y += - 1 - moveSpeed;
}
if keyboard_check(vk_down) or keyboard_check(ord("S"))
{
    y += + 1 + moveSpeed;
}
if keyboard_check(vk_shift)
{
    moveSpeed = moveSpeed * 1.1;
}

I  had added the movespeed thing on (with the variable defined as 1) so I could add in that last Shift to Sprint thing in. Trying to do that was a huge headache too because I had to keep tweaking the math equations so that the player wouldn't fly off screen at mach Jesus. Almost none of this mattered, because it all had to go anyways.

So you might be wondering... Why didn't you just follow the new tutorials???

Simply put, I don't like them that much. They aren't as simple to follow, and require you jump between videos too much. It feels like the videos are just a source of revenue and feature showcasing. And that's no shade to Matharoo, because yoyogames made him scrap his og video project, which smells like corporate meddling to me. 
This isn't to say they aren't useful. The collision code in the first part of the new rpg tutorial is what saved me, but it's annoying how many places I had to look just to find the collision that worked with the newest version. They have a dedicated collision tutorial also posted on their YT and linked on the site, but its not cleanly formatted and it didn't help with what I had issues with.

OK back to the grind, see yall.

post edit: I forgot to mention that I can't get the dual controls to work. It just ceases to function when I put the "or" in the keyboard checks. If somebody knows how to fix this, HELLLLPPPPPP

No comments:

Post a Comment

Noobs beware! older GameMaker tutorials don't work.

As per my last blog post, I was trying to refresh my skills. I was partially following the old Matharoo tutorial and the Peyton Burnham rpg ...