Nesi
Nesi
  • Видео 27
  • Просмотров 269 409
USE COMPOSITION trust me.
I'm not saying you should never use Inheritance, just be careful and use Composition where necessary.
I mean State Machine when I say "Behaviour Tree".
These are actually two different terms I didn't realise.
Composition, Message Bus, State Machine Patterns.
Consider this a code overview of my current project, It's a break down of the Behavior Tree in my game.
Tired of spaghetti code? Join me as I refactor my 2-year-old game project using State Machine, Message Bus & Composition! This video is your guide to cleaner, more maintainable code.
Editor - ytjobs.co/talent/profile/121942?r=286&
#gamedev #refactoring #codingpatterns
Просмотров: 102 075

Видео

I Remade My Dream Game After Two Years
Просмотров 8813 месяца назад
Sub? So It's been two years since I uploaded a dev-log, I've been super pre-occupied and for a while I hadn't figured out my work, school, game dev balance. I'm getting the hang of it and I'm back to putting out videos. Thanks for watching.
Where I've Been.
Просмотров 6933 месяца назад
I'm doing pretty ok, I don't want the main takeaway from this video to be that I'm in a bad place [financially too]. I'll be trying my hardest to make videos again! I'm so sorry, I've just been so preoccupied with work and school, I haven't been able to fully plan out a schedule because of how hectic the situation I'm in can be. I'm trying new techniques to ensure that I can still deliver, look...
I LOST MY MIND MAKING THIS GODOT GAME
Просмотров 2,3 тыс.Год назад
After participating in the GMTK game jam 2022 I found myself feeling a bit defeated when being faced with the outcome of my attempt. Despite that, I decided to make a video showcasing the entire experience in a way I've never done before. I hope you enjoy.
IMPROVED THE GRAPHICS To Help With My Anxiety | Infinite Sky Devlog #5
Просмотров 3,7 тыс.2 года назад
Thanks for watching what ever this is Lodhi by Pali Gap soundcloud.com/pali_gap Creative Commons - Attribution 3.0 Unported - CC BY 3.0 Free Download / Stream: bit.ly/lodhi-pali-gap Music promoted by Audio Library ruclips.net/video/NgrCrLtRqV4/видео.html Spaceship by Lesion X soundcloud.com/lesionxbeats Creative Commons - Attribution 3.0 Unported - CC BY 3.0 Free Download / Stream: bit.ly/lesio...
Landing a Plane in My Game?! | Infinite Sky Devlog #4
Просмотров 1 тыс.2 года назад
Sorry for the wait. Devlog #5 is coming next week so subscribe for that. Music in video: OKAY by 13ounce soundcloud.com/13ounce Creative Commons - Attribution-ShareAlike 3.0 Unported - CC BY-SA 3.0 Free Download / Stream: bit.ly/2BA9Npw Music promoted by Audio Library ruclips.net/video/qkrpMJP4E-8/видео.html Ohayo by Smith The Mister smiththemister.bandcamp.com Smith The Mister bit.ly/Smith-The...
My Experience YouTubing | My Advice...
Просмотров 8082 года назад
It's been a year now (1k subscribers later) and I just wanted to share with you the what I plan for the channel going into the new year. I feel like the best way to make videos is to have that freedom to create videos I genuinely like making. The future of this channel will be focused on make videos that I enjoy creating. (Devlogs, Video essays...). More entertaining and experimental, something...
Indie Game Moist Cr1tikal
Просмотров 19 тыс.2 года назад
I made a moist cr1tikal skin in my game, I guess this is the first Easter egg lol. Please subscribe! ❤️ The future of this channel ruclips.net/video/1j9fpGhvcuU/видео.html #moistverse #moistcr1tikal #Moistverse
How to Make The Smoothest Pixel Art Camera in Godot
Просмотров 11 тыс.2 года назад
How to fix the viewport camera jitters, How to snap the viewport camera to the resolution of your screen. Devlog 3 The future of this channel ruclips.net/video/1j9fpGhvcuU/видео.html The project: github.com/NesiAwesomeneess/ViewportPlus PlugWorld's video: ruclips.net/video/-thErjVmDiE/видео.html I had no idea picster had made a very similar video two weeks before this one here's a link to his v...
How to Make Parallax Backgrounds in Godot.
Просмотров 49 тыс.3 года назад
This is how to use the ParallaxBackground and ParallaxLayer nodes in the Godot engine. Buy me a coffee? paypal.me/nesiawesomeness?locale.x=en_US #godotenginetutorials #godottutorials #godotengine
Adding Randomly Generated House using Images in Godot.
Просмотров 1,5 тыс.3 года назад
Infinite Sky Devlog #2, Thanks for watching Join my discord - discord.gg/c5FEkM2 Follow me on twitter - NesiAwesomeness Music in video: the funny song from www.bensound.com Lipsia by Sapajou soundcloud.com/sapajoubeats Creative Commons - Attribution 3.0 Unported - CC BY 3.0 Free Download / Stream: bit.ly/-lipsia Music promoted by Audio Library ruclips.net/video/Q9UEf6ZRdZ8/видео.htm...
Making a Dog Fight Game...again.
Просмотров 1,6 тыс.3 года назад
Thanks for watching Join my discord - discord.gg/c5FEkM2 Follow me on twitter - NesiAwesomeness music in the video Ohayo by Smith The Mister smiththemister.bandcamp.com​ Smith The Mister bit.ly/Smith-The-Mister-YT​ Free Download / Stream: bit.ly/_ohayo​ Music promoted by Audio Library ruclips.net/video/bzCw4RyFqHo/видео.html​ Lie 2 You (ft. Dylan Emmet) by Leonell Cassio soundcloud....
A Simple Chunk Handling System in Godot (C# and GDscripts).
Просмотров 16 тыс.3 года назад
A Simple Chunk Handling System in Godot (C# and GDscripts).
Making a Game Before Unity Starts Up Again!?
Просмотров 1,3 тыс.3 года назад
Making a Game Before Unity Starts Up Again!?
How to Make "Jet lancer" Jets in Godot.
Просмотров 2,1 тыс.3 года назад
How to Make "Jet lancer" Jets in Godot.
I Made a Dog Fight Game For The Godot Wild Jam.
Просмотров 3,4 тыс.3 года назад
I Made a Dog Fight Game For The Godot Wild Jam.
One Month of Progress on My game...I guess.
Просмотров 5453 года назад
One Month of Progress on My game...I guess.
How to Get Smooth Fonts in Viewport (Godot).
Просмотров 10 тыс.3 года назад
How to Get Smooth Fonts in Viewport (Godot).
I Made a Game in The Time it Takes Unity to Set Up on My PC.
Просмотров 2,7 тыс.3 года назад
I Made a Game in The Time it Takes Unity to Set Up on My PC.
Understanding signals in Godot (A QUICK GUIDE).
Просмотров 2,6 тыс.3 года назад
Understanding signals in Godot (A QUICK GUIDE).
(English) Tweaked by Nesi
Просмотров 30 тыс.3 года назад
(English) Tweaked by Nesi
A Dungeon Crawler Where You Make The Dungeon ??!
Просмотров 7943 года назад
A Dungeon Crawler Where You Make The Dungeon ??!
Adding Weapons And Enemies To My Game | TimeShadow Devlog #2
Просмотров 8934 года назад
Adding Weapons And Enemies To My Game | TimeShadow Devlog #2
Brackeys 2020.2 Gam Jam | The Making of Time Shadow (In 7 Days)
Просмотров 4364 года назад
Brackeys 2020.2 Gam Jam | The Making of Time Shadow (In 7 Days)

Комментарии

  • @UltimatePerfection
    @UltimatePerfection 20 часов назад

    Can't wait to debug why my character is running, jumping, falling and being idle at the same time.

  • @JustinDuijn
    @JustinDuijn День назад

    @1:39 Make the randomize an optional Boolean passed to BaseTitan that is true by default?

  • @felipejhony6039
    @felipejhony6039 2 дня назад

    Great video, cool ideas. Beatiful game design. Be well!

  • @felipejhony6039
    @felipejhony6039 2 дня назад

    0:29 LOL - The three legendary pillars of software development. Good Code is optional.

  • @Kinos141
    @Kinos141 2 дня назад

    Behavior trees are NOT state machines. They are decision trees that flows down to leaf nodes based on parameters, mostly booleans and enums, to make a choice at a specific time under specific conditions. It can quite robust. The difference between this and state machines is that a state machine needs enter and exit condition to switch between states. A behavior tree reruns from top to bottom, re-evaluating the it's conditions.

  • @Kinos141
    @Kinos141 2 дня назад

    In Unreal Engine, composition is called actor components. This method is kinda the same as composition, where you can add and remove components.

  • @USP45Master
    @USP45Master 3 дня назад

    this is why i hate unity and godot. To many tools with zero best practices taught by the dev's. In unreal this is nothing more than u importing the gameplay ability system and writing a spawner ... wasted so much time rewriting the clock because unity and godot dont have a clock they have sun dials

    • @NesiAwesomeness
      @NesiAwesomeness 3 дня назад

      @@USP45Master this comment is like if someone told chatGPT to come up with the most rage bait uneducated take about game engines. I can't even begin to understand and respond to this. Please tell me if you have any actual experience using either Unity or Godot.

    • @USP45Master
      @USP45Master 3 дня назад

      ​@@NesiAwesomeness Yes I spent my first years using unity, and tried godot recently with the brackeys hype. I've been programming since 97 and I can see no way that those engine hold a candle to unreal. In unity unless you want to spend 10K on plugins it wont have half the features of unreal. And even if you add every unity plugin you can find it will still fall flat of the features. Unreal literally has built in infrastructure to the engine. For instance the gamemode, game instance, player state, player controller and hud classes are already there you just inherit from them and write your own code ... nothing like that exists in unity and godot and if it did it would be a plugin on the market released by a third party. Those engines do nothing better only make things harder for devs who dont realize half the systems there writing from scratch have been written 1000s over. Using those engines over unreal is almost like writing your own engine over those 3 ... I dont understand why anyone would ever use them over unreal period.

    • @USP45Master
      @USP45Master 3 дня назад

      Yes I spent my first years using unity, and tried godot recently with the brackeys hype. I've been programming since 97 and I can see no way that those engine hold a candle to unreal. In unity unless you want to spend 10K on plugins it wont have half the features of unreal. And even if you add every unity plugin you can find it will still fall flat of the features. Unreal literally has built in infrastructure to the engine. For instance the gamemode, game instance, player state and player controller and hud class's are already there you just inherit from them and write your own code ... nothing like that exists in unity and godot and if it did it would be a plugin on the market released by a third party. Those engines do nothing better only make things harder for devs who dont realize half the systems there writing from scratch have been written 1000s over. Using those engines over unreal is almost like writing your own engine over those 3 ... I dont understand why anyone who ever use them over unreal period.

    • @NesiAwesomeness
      @NesiAwesomeness 3 дня назад

      @@USP45Master with that logic you might as well ask a large language model to make your game. Or just build your site with Squarespace. Unreal just has more templates. And you're still just talking about incredibly basic concepts like a Player controller? You can get a player controller on the internet for literally every engine but if you want your player to do more things in Unreal that the player control they provide you're going to have to use Blueprints. An what's wrong with making your own engine?

    • @USP45Master
      @USP45Master 3 дня назад

      ​@@NesiAwesomeness Your not understanding my point I guess. In unity and godot they say heres a blank slate make everything yourself. In unreal theres a clear path laid out by epic using best coding practices and paradigms. All of which those engines will make you implement and learn on your own otherwise. Also there is a lot wrong with making your own engine. If you cant see that youll be my age by the time you realize you wasted your life writing something someone 30 years ago wrote better than you could have ever. Trust me if you want to play around and never finish a game use those engines or make you own sure. If you want to finish and release multiple games use unreal its pretty simple.

  • @eXquisiteBuddy
    @eXquisiteBuddy 5 дней назад

    Not to be annoying but just the demo looks pretty fun, when are you releasing more?

  • @GratissTVofficial
    @GratissTVofficial 5 дней назад

    Mhh ok i know my question is very dumn, but i started approaching game dev and coding very recently, so let me ask this. Fkr my first game im making a very simple project, theres just a player, different types of trees, and different tools to cut trees. The difference they have is the visuals (all), the health (trees), damage and speed(tools). I was thinking that making something like a base_tree and base_tool to store the variables for those stats and run the basic functions while having a different yet simple and clear scene for each tree inherithing from the base_tree would be the best approach. Would you suggest bot to use inheritance, and switching to this design? So if have a node for healt, one for sprites and animations, one for health, exc..? Im sorry if rhis is dumb but again its the first game im working on by myself so i apologize😅

  • @idontwanttopickone
    @idontwanttopickone 7 дней назад

    Why wouldn't you just have different behaviour trees for each situation? I mean you aren't going to be using the idle or run movements when you are in the plane. So just have it all swap out when you get in and out of a vehicle. Land vehicles are going to be very different behaviours to planes or walking.... And if you want to ride a motorbike or a horse, well that's going to be very different too. So just swap in a new behaviour tree and save yourself a bunch of bugs. Then you can go over to your player movement and simply slap in a line of code that checks if they are failing (if not ground for X amount of time and they are moving downwards, falling = true) and gives them some very slight falling movement controls - you could make these speed up over time or with certain items you could move left and right faster. Don't have the plane move towards the player, allow the player to move around so they can decide if they want to move towards the plane as they fall. If you have the plane move towards the player, I can almost guarantee you'll end up with a weird bug where the plane sees it's as falling and trys to move towards the player. Possibly when the player is controlling it or trying to get in/out of it. Better to just give your player agency and allow them to learn to get back into the plane. Also... Wing suits and parachutes.

  • @OverBlackSands
    @OverBlackSands 7 дней назад

    Bro... in a video that isnt exactly about OOP, it taught me how OOP classes work better than 99% of other things I've seen over the years. Holy crap this was fantastic, and your editing is top notch. Instant sub

  • @MillerOkonma-ur8bi
    @MillerOkonma-ur8bi 7 дней назад

    0:05 game?

  • @siljamickeify
    @siljamickeify 8 дней назад

    In another video of yours, I noticed your beautiful use of colors! Interesting to hear you explain it's a core feature of your games! Fantastic work!

  • @silwerfoxx4212
    @silwerfoxx4212 8 дней назад

    This is a valid approach in many regards, my issue however is with separating behaviours into nodes. If you want to expand upon a project and have a large scale scene with many behaviours, there will be a significant performance cost with the huge amount of nodes. In conclusion, this is perfect for small scenes with few nodes, but not advisable if you want to craft a large game that is also performant.

  • @b0gie
    @b0gie 9 дней назад

  • @diegovillafane6313
    @diegovillafane6313 9 дней назад

    Titans

  • @sharifcorbic5026
    @sharifcorbic5026 13 дней назад

    Composition is great sure but I'm not sure this is the best example. I feel the randomize function should never be in the class. This example should probably use a factory instead

  • @federicotamburini
    @federicotamburini 14 дней назад

    But this pattern wasnt called "Finite state machine"?

  • @Wyvernnnn
    @Wyvernnnn 14 дней назад

    Message busses are dicey to debug, they turn straightforward bugs ("loop -> npcs -> ai -> lookForEnemy -> stealthSpot -> segfault) into hard to debug asynchronous call chains (loop -> npc -> messageRead -> segFault) that require you to have good observability and look through logs to understand unreliably who wrote what and why things got buggy. If I make a message bus now, what I do is add a "synchronous mode" where each Publication into the bus immediately follows with a function call to wake up each and every subscriber to that call. It keeps the call stack in a single monolith which is great! And it will shine a light on unwanted infinite loops

  • @Wyvernnnn
    @Wyvernnnn 14 дней назад

    You didn't need inheritance making BehaviorTree inherit Behavior, just have Behavior and BehaviorTree implement an IBehavior interface and have them be passed as arguments and be composed into things rather than inherited. Inheritance can always be skipped entirely, and it is always a bad idea inherit. Newer OOP languages like Rust skip it entirely. They don't have inheritance. Are their programmers unhappy about it? Nope! It just requires re-learning that side of OOP

  • @angulinhiduje6093
    @angulinhiduje6093 14 дней назад

    youre dumb lol.

  • @MyManJohnny
    @MyManJohnny 14 дней назад

    The main issue is not inheritance. It's bad design. Titan shouldn't randomize it's own stats. Ideally, that should be a work for some titan factory if you have a lot of types. Im also not saying everything has to be done using inheritence, in case you want to add a special trait like armor, hair, goofy lip.. composition makes sense, it also makes the code more readable and design less complex.

  • @meziembamara4004
    @meziembamara4004 14 дней назад

    I am also a developer. With 1 title on my belt 😂. Pls, how can we buy your game?

  • @indycinema
    @indycinema 15 дней назад

    you got a good style of video

  • @mkaks22gamerserise16
    @mkaks22gamerserise16 16 дней назад

    Support you bro,i will be always there for you😊😊

  • @KrakonosovoBabka
    @KrakonosovoBabka 16 дней назад

    I like how you use strings instead of enums xd.

  • @toonmiley1195
    @toonmiley1195 17 дней назад

    I don't get it....u have godot experience....why cant u make ur own games....what's the point if we all know how to make games

  • @Pygex
    @Pygex 18 дней назад

    Inheritance is for interfacing. Otherwise one should compose. Change my mind.

  • @buagseitei
    @buagseitei 19 дней назад

    Inheritance as well as composition have their place and often a mix is the most useful approach imo. you can have a titan that inherits from a titan base class, if there is commonly shared code between them, lets say they all have eyes and blink with them. that does not mean everything has to be shared and the different titans then even can all have their own components. Just don't overdo it with inheritance, since it becomes very confusing very quickly. Use it, if you expect to save a lot of time when changing something in the future, since you only need to change the base class(for example blink twice as fast or whatever). If you have hundrets of titans, it may save you a lot of time. If you only have 3 titans i would not bother anyway. Also in my opinion i would define the behaviour tree in your example more of a state machine - A component would be for example a damage area, that an enemy can have or not have to do damage, imo. But that beeing said, very nice to watch video, i really liked it! Good and clean presentation 👍

  • @londanomala1734
    @londanomala1734 21 день назад

    I get everything you said Nesi, nice video. I still need to understand what exactly is the function "set_behaviour" doing. Like how does it actually change the behavior to one of the child nodes listed in the behaviour tree?

  • @oracleoftroy
    @oracleoftroy 22 дня назад

    I think you err too far when you reduce OOP to just inheritance. The OP mantra has always been to prefer composition of objects over inheritance. Second, inheritance should be used at the point of variance. I don't think you have different titans, they are all the same class of thing. Instead you have titans composed of different properties. If you want titans to look different, you can use the same geometry and slightly vary things like the texture, shader, scaling, etc. Those can just be property changes. If i was to solve the behavior issue in an OO way, I would make behavior an interface, not the titan. That way you could have a behavior that has normal titan behavior, another one that is random, or even one whose behavior is controlled by the player. The variance happens when constructing a titan with a different instance of behavior. In pattern terms, the behavior is the various strategies you want titans to exhibit. Mind, I'm not sure that would be the _best_ approach, its just how i would look at it in an OO way. It could end up just being a callback function once the point of variance is reduced to the essentials. In reality, you might end up punting to a scripting engine, making the titan just composed of the script to run for its behavior. All of that can be done within OO.

  • @chiubaca
    @chiubaca 23 дня назад

    Is your behaviour tree ,also what people also call a state machine ?

  • @temari2860
    @temari2860 24 дня назад

    I was taught OOP as *the* way to program at uni for years, but when I got to my gamedev spec and was given freedom to build my own project any way I see fit - I realized how easier and more maintainable things are when you use composition instead. I wasn't even looking for any alternative paradigm or anything, I was just trying to solve problems and logic always led me to structure my projects with composition.

  • @codewithade7054
    @codewithade7054 25 дней назад

    Waited for 2 years man I quit game making also … welcome back

    • @NesiAwesomeness
      @NesiAwesomeness 25 дней назад

      @@codewithade7054 you quit? That was almost me, dude keep going, I literally came back and my channel exploded

  • @pawegorka8589
    @pawegorka8589 25 дней назад

    I found myself cerrin on if my code is clear and well writen more than if it's usefull and working and this stop me from coding too long befor i actually start to make it right

  • @Iridium.
    @Iridium. 26 дней назад

    Glad I’m on the right track . I name them “actions” and are basically containerized behaviors. I got priorities setup as well as additive capability which I can either have the next action be the current behaviour or an addition to the current .

  • @JamesKelly89
    @JamesKelly89 27 дней назад

    I'm an experienced software engineer and what you've created is called an HFSM: Hierarchical Finite State Machine. When you say behavior tree, especially in the context of game dev, it usually refers to a form of AI that's similar to an HFSM but is more specialized and centric around execution over time. There are lots of videos and information on it.

  • @xlerb2286
    @xlerb2286 27 дней назад

    Some of the best advice I've ever heard was "Favor composition over inheritance". In 30+ years of software development there have been very few times when I've found non-trivial inheritance to be of use. But I'm constantly finding composition to be useful.

  • @glewfw7989
    @glewfw7989 28 дней назад

    oop have composition you just didnt knew how.. this whole debate about functional vs oop its really on hating oop because its hard to learn.. guys dont fall for it

  • @bonquaviusdingle5720
    @bonquaviusdingle5720 28 дней назад

    Your randomization method is in the wrong place - you should have a spawner class which handles generating random values and instantiating titans. Data inheritance is usually stable, but logic inheritance usually indicates you’re trying to do too much in your class.

    • @whit9172
      @whit9172 8 дней назад

      You don't even need an additional spawner class. You just need to create unique constructors for them, idk why he made it complicated for himself

  • @davidsolair7879
    @davidsolair7879 28 дней назад

    Loved this video. I've seen other explanations of behavior trees and state machines for game development that seemed to overcomplicate the communication between nodes. This was a great video!❤

  • @ahmede92
    @ahmede92 28 дней назад

    Everyone else: trying to understand the video and point out mistakes Me: mmm.... *Juicy montage*

  • @Galeboy
    @Galeboy Месяц назад

    How do I find my games resolution? I set the resolution to 1920 x 1080 Fullscreen and set the transform values and i set it to 960 and 540 and its not working

    • @crunchyoghurt
      @crunchyoghurt 2 дня назад

      Have you figured it out yet, i'm still struggling with that problem

  • @mgan59
    @mgan59 Месяц назад

    Loved the video especially the end product with the attached debugger to see state displays on the entities

  • @majdbitar1891
    @majdbitar1891 Месяц назад

    Great video, keep up the good work man!

  • @timothyn4699
    @timothyn4699 Месяц назад

    so is every behavior just a node with a script attached to it? Looks great when it all comes together, like the labels showing the behavior

  • @maarmanrodger
    @maarmanrodger Месяц назад

    Discord link is invalid and twitter account does not exist. I need more my man!

    • @NesiAwesomeness
      @NesiAwesomeness Месяц назад

      @@maarmanrodger more soon, I'm just in college and working things out