Object States | Game Maker Studio 2

preview_player
Показать описание
In this video we discuss the concepts of states and state machine, and how these can be used in our games. We explore different ways to structure our system, before creating a state machine for an enemy type featuring some of the most well-known states in video games: "idle", "wander", "alert", and "attack".

Here I am in other places:

-King & Hooded Dude from "A Platformer in the Forest"
-Tiles & Trees from "The Field of Floating Islands"
Рекомендации по теме
Комментарии
Автор

6 years later and still assisting people in game maker. Thanks!

thepulsex
Автор

I've watched many GM tutorial videos and these are definitely my favorite. The way that you visualize the code you're explaining and break it down into comprehensive steps is so incredibly helpful and I think a lot of people who do these videos could learn a lot from your process. I don't feel as though I'm just copying code over and over until I gradually come to understand it, I feel as though I can use what I've learned in your videos and apply it elsewhere. I love Heartbeast and Shaun Spalding and I've learned a lot from both of them, but your videos go above and beyond. Thank you so much for providing these for free.

spaghettimeatballs
Автор

Just found this video after struggling for weeks to understand states.

This is the best explanation out there.

Thank you so much!!

keithjones
Автор

I'm going to have to watch this 50 times, there's so much great here. This is the kind of stuff that takes a project from demo to game.

darkmatter
Автор

you're very good at explaining things in a logical and sensible way, really great job

sneezingpanda
Автор

I've been working with GMS for about seven years and have employed a variety of ways to maintain states, but for my newest project I'm using the method described in this video. I love the standardize and organizational structure of using enumerators, arrays and scripts. This makes so much sense because once you have finalized a piece of code, you don't ever have to look at it again. I love looking in my STEP event and seeing only one line of code!

realistindenial
Автор

I'm fairly confident with most of this and was just sitting here enjoying the video & the excellent presentation.
Then you went and did this:
Mind blown. So simple! :D

LeigerGaming
Автор

Both the solution and the presentation of the video are very elegantly designed. I especially like how you switch between the visuals to the code just at the right time to help the viewer understand the relationship of what’s happening on the screen and how to write the code. I just started with the Game Maker trial and am feeling pretty confident now, thanks!

audiomuse
Автор

Your code is so clean and simple i love this

Baleur
Автор

This is an absolutely great tutorial! That what really shows how good this video is, is that I didn't want to do anything like an enemy logic. The thing I was looking for was how to make my player character simply switch from walking to idle animation and I was keepable of doing that thanx to information about states from this tutorial!
Thanx a lot!

jashum
Автор

I'm currently working on a bigger project in GoDot and this really helped me organize some things in my code.
Thank you for making this video!

HakanBacon
Автор

Your explanations are so clear and easy to understand! Easily one of the top GM tutorial makers on YouTube. Thank you so much! I learned a lot from this vid.

kwylde
Автор

Usually I dont like a video, but multiple times through this video I felt like I needed to like a few times because of the indepth and well thought out concepts discussed.

distantforest
Автор

Fantastic video! Everything else I watched on state machines were too high-level to be helpful or dove right into the code without connecting it back to the rest of Game Maker. Your video hit the nail on the head; I feel totally equipped to start implementing this now.

WittAllen
Автор

Very clearly explained and I love the clean, manageable code separation. Keep up the great work, your GMS2 tutorials are some of the finest quality tutorials out there.

mallen
Автор

Definitely the most underrated channel I've come accross while coding with GM. You've helped me so much with beginning to code in GM, and have helped me progress. I've been watching the entire farming simulator tutorial for all my interactions and movements and I must say, the amount of detail and compassion you have in the work you do is beyond amazing. keep up the great work!

Niemelan
Автор

There are ten million and one Game Maker tutorials on the internet, and 99.9% of them are just OK or worse. You are the single best tutorial teacher I've found so far! You make sure to explain each step in the right amount of detail and it's incredibly helpful. Thanks for helping me learn Game Maker!

JETwardCentrella
Автор

To skip the section where I explain the behaviour code for the states (starts at 9:48) if you're mostly just interested in the concepts, head over to 17:27.

Also, there's been some interesting discussion about switch statements vs if/else if statements. To be clear, switch statements will be much faster than a chain of if/else ifs. So all else being equal, if you're comfortable with switch statements, opt for those. That said, if you're more comfortable with if/else ifs, then stick with those until you have more experience. They're a very intuitive concept which is why I opted to continue using them in the video, over switch statements that can be a tad more abstract. But once you understand switch statements, you'll see it's super easy to convert if/else if chains like ours to a switch.

FriendlyCosmonaut
Автор

I have to say, the end portion where you compress all the step code into one line is a very effective visual of the power of states.

TheRealZen
Автор

As always great work, I love the ranges and use of visual aids. I knew concept of states already but I think this video was one that makes it much clearer.

FeniksGaming