How NES Games Use State Machines For Everything

preview_player
Показать описание
Learn how NES games use State Machines to model logic, animations, and more...

Music:
“Spinning Around” by Samlight
“Sliding” by Evgeny Bardyuzha
“Starspeed” by MILANO
“Midnight Tokyo” by Downtown Binary

Chapters:
0:00 State Machines
1:24 Zelda Title Screen
2:37 The “Game Loop”
4:21 State Machines in SMB3
7:24 Conclusion
Рекомендации по теме
Комментарии
Автор

I was twisting my brain into a knot trying to program without atate machines, and then i finally bit the bullet and learned how to implement them. Completely changed my world and actually made me love programming

atilathenun
Автор

Glad to hear and see that the channel is growing at such a rate. The quality of the videos and the scripts are incredible! Thank you for all the content.

deanrumsby
Автор

I just came across your content, and wow! What an incredible channel! Not only is the content extremely interesting, but the presentation, depth, and delivery are all perfect. As a bonus, the audience has the opportunity to learn a few things. Thank you very much for the effort you invest in this. Keep up the outstanding work. Subbed!

doncapo
Автор

damn I need to revisite my computer math book there where talking about "automate" when it's in fact state machine

alexandreauclair
Автор

I feel like i have to fundamentally disagree on your perspective of what a state machine is. in my experience and terminology, you'd use a state machine for a single object (you can have multiple objects with different state machines, or one object with many state machines, or any mix). for instance, a player character idle, running, jumping (up and falling down, or even just "in air" and allow variables just as the vertical speed to dictate which part of that state you're in. And to me that's the big difference. and idle waterfall doesn't have a state, it's an object or series of objects stitched together and alternates color pallette with a variable that changes over time. the variable is not in itself a state machine, but the variable can tell the object(s) when to change states.

Edit: i guess what i'm trying to say is there's no good reason to need to segment off portions of code on an animated waterfall by using a state machine. maybe a normal animation function and then a different state for the fade, but to me i don't think the video came across in that sense.

YouTrolol
Автор

I'm a CS student in my third year right now, and games are my passion, and someday maybe even my career. As someone who's always thought of the NES hardware as brilliantly concise and who's limits allowed for excellent lessons in video-game design, I've always wanted to show off to friends, family, and employers "hey, look at this thing I made! it's a full-fledged game and it costs less computer storage than a screenshot!" NES games (and all video-games in general) always inspire me to continue learning, and now that I have the resources to actually start making the games that continue to inspire me... I feel more determined than ever
Thank you so much for these absolutley amazing videos! They've given me excellent motivation and passion to continue working on games. Even if this channel doesn't survive for the next decade, just know that your work has inspired people like me to continue their second quest. For that, I thank you!

atreyumclewin
Автор

Man, I have just done an exam at uni about state machines. I did not fin any “useful” application outside of theory, but after this video I understood a lot more of what I have done.
Thansk

massimobaldrighi
Автор

I doubt very much that the doors in Metroid which take 5 missiles are "5 states". Likewise enemies don't have as many states as they have health, states are about behavior. It's more likely that the state only changes once 5 missile hits have been registered.

bahamutdragons
Автор

Hey man, I saw your message about being burned out. Really appreciate the videos you made. They helped me get my basic of NES coding in ASM down. Thank you.

dedgzus
Автор

I'm working on my own game in Godot, and seeing how older devs did things sometimes has modern world implementations. Game Maker for example is almost entirely state machine based.

reaver
Автор

As someone learning assembly language as a hobby (z80 for Master System, but same concepts) and living in Japan, I have to say I love your videos, especially the little Japanese messages thrown in. あなたも日本語を勉強している?

Bofner
Автор

Hey man. Why did you take down the "The code that makes Mario move" video?

nickst
Автор

It was very interesting. It's always amazing when you discover the mechanics inside the code of a game. Thank you!

javirodriguez
Автор

What is the difference between a state machine and a state variable?

wishusknight
Автор

The first concept I learned in computer science. We had to describe a finite state machine for the behavior of an elevator.

Brice
Автор

Oh my! This is pretty great! From the content to the editing. Nice job!

RedMoonArcade
Автор

Did you remove a video? I'm trying to find this video you did on Movement in Super Mario Bros 3, but I can't seem to find it anymore. Was it taken down by youtube? Did it even exist in the first place? Or am I having a false memory? Please help! I've been looking for at least an hour now.

TheRootBeerKing
Автор

I only use an actual state machine class for stuff if the logic has branching paths. for stuff like animations or level completion i just use a number or boolean.

leonard
Автор

The waterfall on Zelda 1's title screen is animated using a group of 16 8x16 sprites. Related fun fact: The middle part of the sword's blade is made out of sprites in order to work around the 4 color limit for BG tiles. Same for some of the leaves on the title screen.

kirbylouise
Автор

The water looks like a set of pixels that move based on a lookup table of sines? maybe? differing speeds? doesnt sound very fast.... maybe alookup into already genned lumps of water? sounds faster

twobob