Bitlytic
Bitlytic
  • 10
  • 660 959
Finite State Machines in Godot 4 in Under 10 Minutes
In this video we'll walk though the setup and creation of a Finite State Machine (FSM) in Godot 4.
Finite State Machines are incredibly useful for managing simple states and transitioning between them. For this video we will look at an enemy with the states of wandering, following, and attacking. Then, we'll build the wander and follow states together in Godot.
Resources:
Additional State Machine tutorial by GDQuest: www.gdquest.com/tutorial/godot/design-patterns/finite-state-machine/
Sprout Lands (Tilemap and character): cupnooble.itch.io/sprout-lands-asset-pack
Dino (Dino): arks.itch.io/dino-characters
Ending music: th-cam.com/video/44MCworZf78/w-d-xo.html
Chapters:
00:00 Intro
00:27 State Explanation
01:06 Wander State
01:28 Finite State Machine
01:59 Godot Time
02:07 Base State Setup
02:28 State Machine Initial Setup
03:55 Idle State Code
04:40 Testing the Idle State
05:08 Follow State Code
05:40 Testing the Follow State
05:58 Transitioning Between States
06:34 Afterthought
07:03 Cow
มุมมอง: 198 964

วีดีโอ

How You Can Easily Make Your Code Simpler in Godot 4
มุมมอง 308Kปีที่แล้ว
In this video we look at Inheritance vs Composition and a scenario where Composition is preferable in Godot 4. Both Inheritance and Composition have their pros and cons, but Inheritance is for more often taught, despite Composition being very important in Game Development. I recently ran into Composition in my own projects and felt that it was vastly underrated and deserved to be taught. Sprout...
Maximize Your Game Development Potential with Classes in Godot (class_name is OP)
มุมมอง 93Kปีที่แล้ว
A quick video to show you how Godot's class_name can be used to create a custom class that makes it easier to add and change functionality in a game. I'm technically using Godot 4/GDScript 2.0, but that should be irrelevant for this topic. Sprout Lands by Cup Nooble: cupnooble.itch.io/sprout-lands-asset-pack Music used: th-cam.com/video/44MCworZf78/w-d-xo.html It's been a minute, so please leav...
Best of Bitlytic 2022
มุมมอง 1.7Kปีที่แล้ว
We had a good run this past year. Hoping for a 50% increase in content in 2023. Goomba Behavior
SM64 Decomp - Fading, Door, and Instant Warps
มุมมอง 4.5K2 ปีที่แล้ว
In this video we set up three different types of warps: Fading, Door, and Instant. This should be as much as you need to use any other type of warp, with the exception of paintings, which I will cover next video. If warp IDs and nodes are confusing, check out part 3: th-cam.com/video/BuCpjradzgc/w-d-xo.html Resources: Blender - www.blender.org Fast64 - github.com/Fast-64/fast64 Level Template b...
Game Math is easier than you think.
มุมมอง 10K2 ปีที่แล้ว
Linear Algebra is a scary term that is often associated with Game Development, but the reality is that the average game developer will only use simple arithmetic when making their games. My goal in this video is to demystify the math that goes into making a game and show a concrete example of what can be done with extremely simple rules. This was technically for the 3B1B SoME1 (Summer of Math E...
SM64 Decomp Tutorial 4: Basic Object Behaviors
มุมมอง 4.7K2 ปีที่แล้ว
Episode 3: th-cam.com/video/BuCpjradzgc/w-d-xo.html Pastebin with code: pastebin.com/0RWzvQvq We create our first behavior which is a 1-Up that gives us an amount of lives we can specify, it also doubles the lives if Mario is ground pounding. This is the first *real* code episode, and will be followed up with another one implementing more advanced behavior. You can follow along if you don't kno...
SM64 Decomp Tutorial 3: Warps
มุมมอง 6K2 ปีที่แล้ว
Episode 2: th-cam.com/video/gzaOgvZSzCM/w-d-xo.html This episode explains how warps work and how you can add them to a level. I've also created some animations to help in understanding how warps are set up as they can be a bit confusing. Resources: Blender - www.blender.org Fast64 - github.com/Fast-64/fast64 Level Template by someone2639 - cdn.discordapp.com/attachments/701163914775494656/75957...
SM64 Decomp Tutorial 2: Importing Levels and Making Objects With Fast64
มุมมอง 20K2 ปีที่แล้ว
Episode 3: th-cam.com/video/BuCpjradzgc/w-d-xo.html UPDATE: Fast64 has been moved to github, you can go to the new link and download. To do so: 1. Go to github (github.com/Fast-64/fast64) 2. Click on the green "Code" button 3. Download as zip Afterwards, install as normal This episode goes into creating basic levels in Blender using Fast64 and adding objects and textures to that level. Episode ...
SM64 Decomp Tutorial 1: Setting Up and First Code Changes
มุมมอง 15K2 ปีที่แล้ว
This tutorial is aimed to help people get started with Romhacking using SM64 Decomp and Fast64. The first episode goes over basic setup and adds a simple feature to sm64: the ability to ground pound out of a long jump. Next episode will be a beginning to Fast64 use and will release alongside a video explaining how to set up warps. Please leave any feedback that would help make it easier to show...

ความคิดเห็น

  • @patek2385
    @patek2385 ชั่วโมงที่ผ่านมา

    You should make those type of videos more.

  • @cesarlemos1337
    @cesarlemos1337 วันที่ผ่านมา

    For someone whho works with Java, I had my fair share of complaining about the abuse of inheritance and lack of real composition. You managed to explain it in a way that I can just replicate eithout sounding too technical. Thanks!

  • @KlausbergerYT
    @KlausbergerYT วันที่ผ่านมา

    Saw this in my Timeline and although I knew about both concepts, I still watched the full video as it was really spot on.

  • @eldarcfrov8707
    @eldarcfrov8707 วันที่ผ่านมา

    I think you can do a hybrid approach here, and create an Entity Class with required components.

  • @HeraldOD
    @HeraldOD 2 วันที่ผ่านมา

    Awesome video! A neat trick for switching states: using the return value from the state's process function instead of signals. That way, you can have @export variables for each state to define its next potential states, and return them to the state manager that does the switching This also removes the need for a dictionary!

  • @BannisterNicholas
    @BannisterNicholas 4 วันที่ผ่านมา

    So, my 600 line switch is now 1100 lines in 14 files.. How is this better?

  • @richbuilds_com
    @richbuilds_com 4 วันที่ผ่านมา

    Great tutorial. In your Entity example at the start. Entity should extend Node and then it can be attached to anything. Create your player as a CharacterBody and attach the entity script. Your Mobs are RigidBodies and your Trees are StaticBodies. You can have Entity extend PhysicsBody3D to be even more type safe. That way you can only make an entity out of something that must have a hitbox

  • @kmturley1
    @kmturley1 5 วันที่ผ่านมา

    A great explanation of inheritance vs composition. However you jumped from using Classes to Components without explaining the pros and cons of each. Composition pattern can be used for both Classes and Components. You don't have to use a Component for everything?

  • @mmelifluo
    @mmelifluo 5 วันที่ผ่านมา

    bruh I can't make my enemy move, i've seem the video contless times and my slime stays put

  • @shill4773
    @shill4773 5 วันที่ผ่านมา

    easily, just dont use godot

  • @bofa-zi4fj
    @bofa-zi4fj 6 วันที่ผ่านมา

    Idk if the initial example was the best… I mean “entity” is just to broad for a class. It should be “Character” class for player/enemy and a “environment” class for a tree/building etc

  • @TheBoglodite
    @TheBoglodite 8 วันที่ผ่านมา

    Its the same paradigm that React teaches you to use. Kind of an interesting crossover in paradigm. I've always really liked Composition, I'm glad its gaining traction elsewhere.

  • @Snapper-gaming
    @Snapper-gaming 8 วันที่ผ่านมา

    Pretty nice, but isnt this what a resource is supposed to be used for?

  • @eth7928
    @eth7928 8 วันที่ผ่านมา

    If state != current_state == true; I do not quite understand this part. To me it looks like it would allow infinite state change requests instead of parsing one state through at a time. Like running and attacking at the same time. Any suggestions?

  • @Themrsnappyify
    @Themrsnappyify 9 วันที่ผ่านมา

    did everthing perfect twice and still get "Invalid get index global_position(on base nil)"

    • @agusnutt
      @agusnutt 3 วันที่ผ่านมา

      did you solve it?

  • @shyshek_shyshkovic
    @shyshek_shyshkovic 10 วันที่ผ่านมา

    I wanted to get to know FSM better and see some code example, bur at halfway point of the video my mind just started to melt...

  • @stunningcactus978
    @stunningcactus978 11 วันที่ผ่านมา

    The link to the Level Template by someone2639 in the description is broken. Anyone know where I can find the level template elsewhere? :)

  • @DerpyEinstein
    @DerpyEinstein 13 วันที่ผ่านมา

    state is one of the 50 places in the northern America and they all have terrible pizza except for mooses tooth which only has one location

  • @WilliamShinal
    @WilliamShinal 14 วันที่ผ่านมา

    You're a lifesaver! I had to give up on my shmup project in Godot 3 before I saw this.

  • @theorixlux2605
    @theorixlux2605 14 วันที่ผ่านมา

    I found a great hack! If you change the font color to the background color, then your project looks pristine!

  • @joshnjoshgaming
    @joshnjoshgaming 15 วันที่ผ่านมา

    the link to the template is broken. the working link can be found by going to the mega document, ctrl +f search for 'template'

  • @Poyozito
    @Poyozito 15 วันที่ผ่านมา

    The template is unavailable now, its there anyway to do something similiar without the template?

  • @blepomorph419
    @blepomorph419 16 วันที่ผ่านมา

    So for a state machine would I still have to define the variables for say a dash move state or does Godot fill in the blanks if I extend the node? Looks like you still made reference to some things with certain parts of the state machine but I'm not sure how crucial those are.

  • @lowirq
    @lowirq 16 วันที่ผ่านมา

    If I hadn't known Finite State Machines for years beforehand, I would definitely know by now! Your concise concept & excellent explanation makes FSMs - an often over-complicated yet rather basic topic - easily understandable by beginners as well as intermediate developers IMHO. Awesome content quality I have rarely encountered with video tutorials, and especially on TH-cam. Nicely done, keep it up!

  • @jayman1462
    @jayman1462 17 วันที่ผ่านมา

    this is pretty neat and very helpful! there's still one thing that confuses me tho. why is there a hitbox child and the hitbox component child with a collision shape in it? that seems redundant, but both need a hitbox as far as i know

  • @titaniumarrow8357
    @titaniumarrow8357 21 วันที่ผ่านมา

    as that its nearly midnight ill leave this video for later but i will return and thank the youtube god for recomending this video

  • @NoNo-nu1cg
    @NoNo-nu1cg 21 วันที่ผ่านมา

    this video help me alot thank for makeing it :D

  • @Creationkitnz
    @Creationkitnz 22 วันที่ผ่านมา

    Found this video alongside your others as very helpful thank you! Would love to get a use case for Resources as well! 🙏🏾

  • @ArtyMartyD
    @ArtyMartyD 24 วันที่ผ่านมา

    After watching this a number of times now, I've noticed that the exit() function is never actually used, it hasn't got any defined instructions in either of the states.

  • @g4ldin091
    @g4ldin091 25 วันที่ผ่านมา

    actually i think this is a great way of introducing the concept of Object Oriented Programming in general, beyond their use in godot!

  • @maywakeTV
    @maywakeTV 26 วันที่ผ่านมา

    I fell into the exact trap you gave as an example. Looking forward to refactor my game to use more composition and less inheritance!

  • @ArtyMartyD
    @ArtyMartyD 26 วันที่ผ่านมา

    Unashamed to admit I set the speed of the video to 0.75 and rewound the video dozens of times.

  • @ArtyMartyD
    @ArtyMartyD 26 วันที่ผ่านมา

    What I think is great about this tutorial is that you don't need to know about the way each state behaves. I like that this isn't the main focus as each state for each game is different for each game dev. At the same time, each state explained here is also extremely versatile due to it's simplicity so if you wanted to you could still use it and just iterate upon it later. But just to know how states work is quite wonderful.

  • @denizk0461
    @denizk0461 28 วันที่ผ่านมา

    Thank you!! I was meaning to use a more component-oriented approach in my game, but I've struggled with finding out how to implement that properly. This video really helped me understand it better - the code examples were especially helpful!

  • @LeniconDev
    @LeniconDev 28 วันที่ผ่านมา

    Best video ever, and this is not just for Godot 4, this works well for Godot 3 and mainly other types of programming if you get the logic behind it. Perfectly explained and simple. Absolutely brilliant

  • @TheRidiculousR
    @TheRidiculousR หลายเดือนก่อน

    the discord template link does not work anymore

    • @TheRidiculousR
      @TheRidiculousR หลายเดือนก่อน

      copying the link and posting it in discord, and then downloading it fixes it

  • @Cheesypockets
    @Cheesypockets หลายเดือนก่อน

    if using C# interfaces would be a good idea as well. Not only can you extend properties, but you can also have classes take which functions they are going to have (interfaces sort of act like components)

  • @k4gi
    @k4gi หลายเดือนก่อน

    thank ^^

  • @noise_dev
    @noise_dev หลายเดือนก่อน

    thanks for this man! I am using inheritance for my inventory system and now composition will greatly help while implementing enemy nodes

  • @pushtheponds
    @pushtheponds หลายเดือนก่อน

    helped me a lot, thanks

  • @M_SWasUnavailable
    @M_SWasUnavailable หลายเดือนก่อน

    I think you should use Node instead of Node2d for components (for performance purposes)

  • @ksefchik
    @ksefchik หลายเดือนก่อน

    Can you give an example of interacting with components from the outside? I don't see how this is useful outside this specific case -- reason being is that it works so elegantly only because Area happens to be a collision thing, which interacts with other native things in the engine and allowing you to easily get a reference to it from the collision system. If I wanted to bestow an object with special properties using components, there's still not a real good way to interact with those without hard-coupling them that I can see?

  • @celsladroma8048
    @celsladroma8048 หลายเดือนก่อน

    so this is the real programmer work.. omg I'm so ashamed to myself

  • @igorrodriguez9942
    @igorrodriguez9942 หลายเดือนก่อน

    Great stuff, thanks a bunch! Added a signal to hitbox component with the attack position and knockback, now everything can be knocked back if needed :D

  • @bjkloss
    @bjkloss หลายเดือนก่อน

    Watching this i felt like the Kel meme from Good Burger. "Yes I know some of these words". Im far too green at coding for this but saving it for later when hopefully I can understand more than the first 1.5 minutes.

  • @simomine7
    @simomine7 หลายเดือนก่อน

    Keep it up! I really loved this video!

  • @RobertoGongora
    @RobertoGongora หลายเดือนก่อน

    That example blew my mind

  • @Squilllo34
    @Squilllo34 หลายเดือนก่อน

    okay i found out how. btw thank you for making these. there arent that many tutorials that guide in coding in general instead of just specific coding structures