Finally a step to make GMLmore like a usable language. This is moving in a direction that I thought it should the first time I saw GameMaker and GML. I'm hoping to see function arguments (ok that came later in the video) soon too and perhaps strongly typed variables and function overloading.
Thanks for this easy to understand explanation. It makes sense now why they made this change. Like, if you have an RPG with 20 unique items- you used to have to write 20 individual scripts. Now you can have one script that holds 20 functions. Plus, I like how quick and easy it is to declare arguments now, especially for writing long complicated functions where you used to have to keep track of what argument represented what.
@@froge721 I still don't have a clue on what the difference between scripts and functions is... But - so far - it hasn't mattered. I just type the scripts Shaun teaches between the two function brackets... Make sure you name the script when you create it... Then DON'T CHANGE THE NAME inside the function header. This has worked for me through the entire Platformer tutorial and is still going strong on Video 10 of the RPG. Hang in there.
Thanks so much for this timely update. I was going through your ARPG tutorial, and the script wasnt working. it may be worth updating the description on those videos with this update referencing this vid. GG
I was screaming at the top of my lungs trying to figure how the feck you do scripts now. I did eventually get it but it's so much more complicated than it was previously.
does 2.3 allow ignoring inherited functions? For instance, the parent has a script with a bunch of functions including function foo. When the child inherits the functions, can i write a local foo that does something different?
I am hoping GM eventually incorporates true delta to game time so it doesn't need to be engineered by the developer akin to how it is in contemporary engines and dips in FPS don't cause slowing of in-game time. I think they are besides the architecture not doing this because GM's focus on 2D leaves the case of FPS dips an incredible rarity for any competent dev.
this was an extremely frustrating update I have no idea how or why I see so many comments saying this is easier now. my scripts only work when I write the arguments above the function in the old way and then write the code I want inside the brackets of the function. whenever I put my arguments in the parenthesis, the script does not run correctly (or not as I would expect it to run) but it will actually show my arguments in the bottom tool tip. this was made even more confusing when I would write my arguments the old way and see them work correctly when I run the game, but in my code I would get a warning saying I have 0 arguments even though when I run the game it works as expected so I have just learned to ignore those warnings. and the gap between figuring out that my code was actually running correctly with the old arguments was not fun to figure out. maybe Im still doing something wrong but idk because now my code is working the way I want.
My game wont launch, it just says "[Run] Run game Options: Z:/Bellend_F2F4E2D7\MainOptions.json X://windows/Runner.exe -game "Y:/Bellend_4AFCAC2_VM\Bellend.win" Attempting to set gamepadcount to 12 DirectX11: Using hardware device Collision Event time(microsecs)=2 " and doesn't launch. Please help.
is this everything that has changed from the coding gm 2 ? Im really happy that you explained it to us. Im following your action rig tutorial for a longer time now (always waiting for the new episodes :3) and after the change from 2.2 to 2.3, my game closes itself after a few seconds or if i go to the right, i don't know why, but i think i have a problem with my camera. Sadly i don't know what i have to change to make it better :c im still a very beginner :3 also, your tutorials are so amazing, its literally one of the tutorials or more like THE tutorial which i have ever seen and still work on, l don't know why, but l really appreciate how you always explain everything, its like im actually learning something :3 thank you for those
I am following along with your video, but ran into a problem GML does recognize this line "localFrame -= totalFrames;" how would I go about fixing this?
nasicallu function created in scripts are global function. But what about variables, var variable is local no matter where ok. but variable declared without var is global internally inside an obj that created, but what about scripts and this relation?
Thank you for the tutorial! What would be a reason to declare functions inside objects? Is the performance boost really that high if only one of the objects can use it?
You forgot to say that now scripts are initialized immediately and do not need to be called in code. For example, you can register all the necessary global variables in one script, not in a function, but in a script, and they will work.
can't wait for pokey poke to come out... today ive tried the demo and its cool but u should add like some bomb where you can land or some different background
I'm going to try this with one of your tutorials. It feels like the script name is now almost a folder for a collection of similar functions, and in the scripts you set up/program the functions. Then you call them in an object with that script_execute(); bit. Hoping I got that right. I like the var func variation too.
Fun fact everytime we place object on room and start the game, it's only show background, am try this on demo and tutorial it has same think.. and am try previous build it doin fine everything seems normal, is that bug on newest version?
can you make a video with new tips and tricks for many of the new features for GM2.3? Like best scenarios to use the new data structures like actual multi dimensional arrays, structs, the try and catch? is it better to work gml now like a roided javascript?
Just make sure you NEVER rename your script after you start working with it. It will erase the entire script to put in a new blank function with the new name.
@@ActivelyVacant He's right. If you changed the name of a script and it erased its contents that's a pretty severe bug you might want to report if you can reproduce it.
Coming from the second episode, I've been having this issue where my game crashes after a few seconds of running correctly (movement, animation) with just this - "FAILED: Run Program Complete For the details of why this build failed, please review the whole log above and also see your Compile Errors window." There's no compile errors however. I'm unsure if this is an issue with the update, as changing the runtime doesn't seem to help. I do literally have the same PlayerAnimateSprite script as instructed in the video, just wrapped into the function{}. Consider that it works fine before crashing (which can be within a second, 10, or when going into fullscreen/moving the window) I'm unsure of where I'd go hunting the issue. Thanks in advance for any advice!
@@SaraSpalding Sadly not :( In your Action RPG tutorial I'm at the second video and the animation does not work now. I'm now trying to figure out how to fix it and found this video. Hopefully I will be a little wiser in the end edit: forget it. Found the error. I'm stupid
@@bernibrandner9064 my error was my own fault. I had a typo in a variable name. If you write every script inside the prewritten function xxx{...} it should work fine
Thanks for all the hard work ! I'm writing this comment to seek some help, since moving on to 2.3, my game crashes every time I loop my facing right running animation. I'm guessing that localFrame -= _totalFrames; ends up being equal to 0 and crashes the game, however, I can't seem to find a way to solve this without ruining the rest of the code (Although I checked, my PlayerAnimateSprite script is identical to Shaun's one). I have been tinkering with it for days, but no luck. It's frustrating because I want to continue following the tutorial, but it will be hard when I can't even go right properly. Can someone would be kind enough to help me ? Thanks !!
absolute beginner here, starting from Ep1 of the platformer tutorial and running into issues. I know I've got the discord and the subreddit to go to, and I probably will, but it's damn discouraging. :(======= It's not your job to supply the "total newb" with a list of potential landmines in laments terms, and I wouldn't hold you to it. It'd be nice if GMS did; and if they did, and I missed it, I'd love to read it.
I still tend to have a script for macros and stuff yeah, you can even expand this type of thing now and use it to declare globals etc since the script will be called at the start of the game.
if that is game maker studio 2 desk top Where it had pass words. I refunded the game. It was my fault for writing pass word on paper where it can get lost but now i have a code book for all passwords and dates i put them on sorry to say i have no money to rebuy game but i will when i do. mean while went back game studio 1.4 i did finish 1st level asteroids using images but worked great.
And thats how we wind up with apps filled with poorly optimised and spaghetti code. Try to look at revision as a chance for you to see how much youve learned since past you wrote the code. Its also a chance to go back and make sure its commented properly. Future you will thank you for this.