Godot Scripts I add to Every Game

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ม.ค. 2025

ความคิดเห็น • 174

  • @Aarimous
    @Aarimous  4 หลายเดือนก่อน +20

    Let me know if there are any of the scripts you want specific video about! Please checkout my upcoming game Hexagod: store.steampowered.com/app/3059390/Hexagod/

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

      The audio manager would be nice. I kept having issues with coin-collection sounds overlapping, not playing enough, or erroring out because it can't play the sound on the destroyed object. This would be nice!

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

      very interested in anyone of these subjects or just managing a a scale-able game( management of a game) so probably do more in depth on any of these codes would be great, helpful what you have already shared.

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

      For calculating the size, if I understand what you mentioned in the video about the "math"... Get the sprites size with my_sprite.texture.get_height() and my_sprite.texture.get_width(), also make sure you get the scale (it's a Vector2) with my_sprite.scale, then multiply height and width by my_sprite.scale.x and my_sprite.scale.y. Keep in mind that if the sprite is rotated the height and width could be on a different axis, like x might be height and y might be width if rotated 90 degrees, and this is only a concern if your sprite isn't square (height and width the same on all sides).

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

      for animated sprites it is a little different
      my_animated_sprite.sprite_frames.get_frame_texture("idle",0).get_height()
      "idle" is the animation name for this example
      but you probably wouldn't need to do this programmatically since you have to know your frame size when you configure the animation.

  • @YawningCatGames
    @YawningCatGames 4 หลายเดือนก่อน +84

    FYI for anyone not seeing the "Globals" tab under Project Settings, in some versions of Godot it is just called "Autoload".

  • @Kio_Kurashi
    @Kio_Kurashi 4 หลายเดือนก่อน +179

    "We're not a cult."
    Sounds like something a cult leader would say.

    • @tldmbruno
      @tldmbruno 4 หลายเดือนก่อน +4

      I love the irony of this way of thinking. "We're not X!" "Sounds like something a X would say."

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

      @@tldmbruno Right? Especially when it's something that would be controversial because then it's also just something any normal person would be likely to say. XD

    • @ebanfa
      @ebanfa 3 หลายเดือนก่อน +2

      With the current controversy it seems Godot is actually a cult

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

      @@ebanfa Only the foundation, not its users.

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

      As long as I don't see propaganda like in the godot socials I'm fine with it

  • @CopperheadGameStudios
    @CopperheadGameStudios 4 หลายเดือนก่อน +36

    Great content. Thanks! I'm working on a game now and just beginning to learn about autoloads. I made the game for Brackey's game jam and after submitting it realized I wanted to develop it beyond the jam so now I'm going back and refactoring everything and trying to organize everything into global autoloads to make expanding things easier and this is HUGELY helpful. Keep up the great work!

    • @Aarimous
      @Aarimous  4 หลายเดือนก่อน +3

      Congrats! That is one of the reason I love to do game jams. Time constraints can lead to interesting ideas which can then become full projects. Good luck!

  • @mattlocke
    @mattlocke 4 หลายเดือนก่อน +13

    Love to see more about your card manager and audio manager. Audio is definitely something I've not really tried to tackle yet.
    Also, added this video to my playlist of "Godot videos I wanna keep track of, cuz they seem to have super useful stuff in them" (Love the idea of a resource to keep track of colours/textures/etc that is then paired with a global ENUM)

  • @JohnnyMayHymn
    @JohnnyMayHymn 4 หลายเดือนก่อน +173

    Godot is not a cult, I could quit at any time.

    • @jamesodonnell4771
      @jamesodonnell4771 หลายเดือนก่อน +6

      I mean it's not even like it's super intuitive or anything..

  • @eruhlinteractive2817
    @eruhlinteractive2817 17 วันที่ผ่านมา +2

    Great video! I've found a way to use enums globally without using a single auto-load (more of a personal preference, but can become a bit unwieldy in larger projects) that I use quite a bit. If you use the class_name annotation for a script, you can access the enums by class name without needing an instance of it. For example if you had a class named Resource that you wanted to get the Type enum for, you can use Resource.Type. to access the enum.
    You could combine this with the static keyword in Godot 4.x to add instance-agnostic helper functions (e.g to convert and enum color name to a Color value with static func toColor(enum_val) )

  • @magnetomage
    @magnetomage 4 หลายเดือนก่อน +169

    Lol, I have been a member of the cult of enum for a decade... Can we please stop stringly typing things when enums are safer and cleaner

    • @Aarimous
      @Aarimous  4 หลายเดือนก่อน +19

      One of Use ;)

    • @fenilli
      @fenilli 4 หลายเดือนก่อน +10

      This totally depends on the enum implementation of the language, some are good, some are bad, some don't even have it.
      If they are integer constants, its good, if they have strings not good, better to have a global file with constand integers for that instead.

    • @CebGIN
      @CebGIN 4 หลายเดือนก่อน +5

      ​@@fenilli In Godot they are Integers

    • @KeegansLife
      @KeegansLife 3 หลายเดือนก่อน +2

      @@fenilliput the constants in a namespace and it functions similar to an enumerator

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

      Wait until you learn about value objects

  • @theaveragegoob
    @theaveragegoob 2 หลายเดือนก่อน +3

    This is SUPER helpful. Just understanding globals and loading them into the project is HUGE. Thanks for sharing this :) I'm working on my first commercial project and this might all be handy in developing better systems.

  • @ClockworkGearhead
    @ClockworkGearhead 3 หลายเดือนก่อน +6

    A useful tip you can use: in the script editor window, you can select all the text and hit ctrl + alt + T, and it will automatically delete all the trailing whitespace and clear spaces and tabs out of empty lines. Can also be found under Edit -> Trim Trailing Whitespace.

  • @rubylightful
    @rubylightful 4 หลายเดือนก่อน +2

    Really cool to see what you use in your projects. I feel like this isn’t often showed and newer devs often have to just work it out as they go.
    Would love to see a video about your audio manager!

  • @fantomas1770
    @fantomas1770 4 หลายเดือนก่อน +3

    great vid, i personally struggle the most with project architecture so more in-depth and overall more vids on related topics would be highly appreciated. definitely looking forward to one about your audio manager. thank you very much for all the content you make, keep it up!

  • @level12lobster8
    @level12lobster8 3 หลายเดือนก่อน +5

    Here is a great video idea I always wish there was more of.
    Folder structure to keep your project organized from the start, rather then trying to restructure it as the project grows.
    A method for making a template folder structure to start a project with so, for example, you don't start by just shoving ever script into a single folder as a "later me can solve" problem.

  • @RemotelyHuman666
    @RemotelyHuman666 3 หลายเดือนก่อน +2

    That audio manager script sounds like something my current project could really benefit from. Liked and subbed. Hope you get around to making that video!

  • @time_travelling_pirate
    @time_travelling_pirate 4 หลายเดือนก่อน +21

    I'd love a deeper dive video into the card manager and the sound manager scripts!

    • @Aarimous
      @Aarimous  4 หลายเดือนก่อน +5

      Noted!

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

      Thats something I'll also love to see

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

      Agreed

  • @Eaode
    @Eaode 3 หลายเดือนก่อน +4

    great content! Love the straightforward honest approach.
    one thing I noticed that could simplify something I saw in your Refs script: You could use a Dictionary for storing item colors by type. You can use the item type enum values as the keys for the dictionary, and store the colors as the values. This would turn your get_item_color_by_type() function into one line of code:
    return item_col_by_type[type]
    instead of a long if-else chain that accesses single variables like food_color
    anyway just thought I'd return the favor after all the knowledge coming the other way thru the screen

  • @TW-eh3vo
    @TW-eh3vo 4 หลายเดือนก่อน +1

    Thank you very much for this. Just last week I was thinking I needed to start building something like this. Particularly for fast starting Game Jam projects. I’m glad I stumbled upon this video.

  • @Mrme-cn9je
    @Mrme-cn9je 2 หลายเดือนก่อน +1

    Very good video. Gives an overall insight, which there arent a lot of videos about out there.

  • @untitledgamestudios
    @untitledgamestudios 3 หลายเดือนก่อน +1

    Gotta say been loving these. I'm the junior dev in our group and just got started on godot and these videos and to support of my buds is really helping to programmer panic not set in lol.

  • @lowirq
    @lowirq 3 หลายเดือนก่อน +2

    Nice overview, especially good for beginners and inexperienced & overwhelmed devs/users. Also, you went straight to the it, instead of stretching it to a 45 minutes information lackluster. Keep up the good work, thanks for sharing! 🤗
    P.S.: Also, I totally forgot about implementing a signal bus globally being a basic yet totally valid option to track/subscribe to any kind of global game state changes. So, I probably should recall KISS & YAGN principles at least once a day to prevent any over-engineering on my side. Thanks again! 😄

  • @auseawesome9112
    @auseawesome9112 หลายเดือนก่อน +4

    Very interesting video, as for your Refs class with lookup functions, I tend to personally use dictionaries, to me it looks cleaner and I believe it's more efficient, also making functions static that don't need to be dynamic should also help with performance due to caching optimisations!

  • @julianlomba
    @julianlomba 2 หลายเดือนก่อน +1

    Putting all enums in a single utils class seems like madness to me XD still better than not using enums though
    For example, I see three enums there that begin with "CARD_": instead, you could just put them inside the "Card" class that you probably have somewhere and they will become much more easily manageable. Then you can just call "Card.Rarity.NORMAL" from anywhere instead of "Util.CARD_RARITY.NORMAL", and you can just use "Rarity.NORMAL" inside Card scripts. Same with Villager.State instead of Util.VILLAGER_STATES, etc. (also, not really important but the name of an enum is recommended by the style guide to be PascalCase and singular, since you can use it as a type).

  • @AndersSvensson-oc1dy
    @AndersSvensson-oc1dy 4 หลายเดือนก่อน +7

    spawnning_state_changed :D Probably not going to be an issue with autocomplete, but thought I'd mention it. Really impressive to be able to code so well with dyslexia. Interesting to see you've named your enums in plural form - pretty unusual!
    Love the channel and the videos, keep up the great work!

    • @Aarimous
      @Aarimous  4 หลายเดือนก่อน +8

      I can be wrong as long as I'm consistently wrong ;)

    • @drumkid3D
      @drumkid3D 4 หลายเดือนก่อน +3

      I personally love the time_chaneged signal

  • @erik-sandberg
    @erik-sandberg 4 หลายเดือนก่อน +5

    Yes please to the video about your audio manager! I have been thinking/struggling with this recently too. Have found some things that works sort of okay, but not sure how it's *supposed* to function

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

    that Hexagonal Grid page is SUPER useful! I made a vehicle equipment grid and UI from scratch following it :D

  • @level12lobster8
    @level12lobster8 3 หลายเดือนก่อน +2

    In order of relevance, would like a video about these: Utility, Signal Bus and References.
    I love me some enums. I put enums on par with first learning about modulus operator, which is also a great tool for cycling through enums.

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

    honestly i didn't think this video would be THAT USEFULL. damn i don't know how i haven't thought about those scripts for my games, i remember spending so much time passing references to signals between scenes... it was so dumb i know i see it now

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

    This video was actually pretty helpful! Thank you so much!

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

    Thanks Aarimous! Loved this video and it was definitely helpful. I'm less experienced with coding, but even so I also look at enums as undervalued and underused! I would really love to see the video on your AudioManager global.

  • @pablodonoso779
    @pablodonoso779 4 หลายเดือนก่อน +5

    I also add a "logger" script that has configurable log levels and writes to console/file

  • @AntiJcup
    @AntiJcup 4 หลายเดือนก่อน +1

    Super informative thanks dude! Cult of enums for liiiiife!

  • @mudcatztv
    @mudcatztv 12 วันที่ผ่านมา

    I learned that re-using my scripts was so crucial to helping me retain my information as well as the convivence lol.

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

    I've been implementing most of these things in my projects as well, thats quite funny :D

  • @0xDEADBAAD
    @0xDEADBAAD 4 หลายเดือนก่อน

    New to Godot. Loving your material so far. Definitely in for the AudioManager video :)

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

    Great video! I learned a lot about best practices when working in Godot. Hopefully, I'll see more videos like this-I'm looking for tips and tricks when working with 2D/3D views.

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

    Nice just picked up a copy of Chess Survivors, thanks for the tips! Hadn't heard of or scene signal buses before.

  • @MattWyndham
    @MattWyndham 4 หลายเดือนก่อน +1

    Woah this is great advice!!! Thank you!!!

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

    The hexagod demo is so fun! Can't wait for the full game.

  • @Melonposting
    @Melonposting 3 หลายเดือนก่อน +1

    “Are y’all with the cult?”
    _Enums let everyone each the same food, be the same color, have the same texture-_
    “Yeah, this is it”

  • @visclo4782
    @visclo4782 4 หลายเดือนก่อน +1

    For audio, you can use a compressor/limiter on an audiobus to prevent the DBS to go past a threshold without removing the satisfaction of a sound that should have played

    • @Aarimous
      @Aarimous  4 หลายเดือนก่อน +1

      You can but I think it still sounds bad. I'm not audio engineer so there are likely better ways to do this.. but my solution to simply limit the number of current sound effects has worked very nicely.

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

      @@Aarimous (If I understood this correctly) I think it would make more sense to apply FIFO rather than suppress the latest sounds. Say you are limiting to 5 sounds ABCDE, as soon as F comes you stop A and remove it so you are now going BCDEF. The player gets the sound of his latest interaction.
      In any case I like your video. I have tried a few different ways to handle colours/palettes (including a couple of plug-ins) but it never occurred to me to just use exported variables. Thanks.

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

    Awesome video, I am new to godot and didnt know about autoloads!

  • @NoOne-fe3gc
    @NoOne-fe3gc หลายเดือนก่อน

    1:48 That's called dependency kids. And if you have Script A depending on B and B depending on A, you got a circular dependency, and the universe implodes.

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

    your work is great! thanks for sharing!

  • @vacantknight
    @vacantknight 3 หลายเดือนก่อน +1

    well i now know what i need to do with my audio so it does not blow my ear drums out for my bullet hell game, thank you

  • @_gamma.
    @_gamma. 4 หลายเดือนก่อน +3

    The cult of enum is already here 😤

    • @Aarimous
      @Aarimous  4 หลายเดือนก่อน +2

      One of us!!!

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

    very cool! my global scripts for Axe Ghost look very similar. Signaller and SoundManager are OP.

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

    The hexagon stuff looks neat. And they are the second best agon 😂

  • @360dom360
    @360dom360 หลายเดือนก่อน +1

    I'd love if you could dive deeper into your utility script. I'm all in on the enum train but I use them at the local level. For example, I'll have an enum for type in my actual resource script. Can you show examples of how you'd use the enum without needed to use the resource script anyways?

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

    I would definitely like to hear more about that AudioManager script. Im managing my audio in a similar but simpler manner but you have some extra steps there that look interesting.

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

    Great advice! I'll be augmenting my global script set :)

  • @jRsqILVOY
    @jRsqILVOY 4 หลายเดือนก่อน +2

    Regarding the cult of the enum, I wish GDScript had algebraic data types like Rust so enums could hold data too and do type comparisons (rather than just being wrappers around ints).

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

    Thanks for sharing your wisdom. This is really useful

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

    One tip about enums... if you have enums describing elements that all inherit a custom class (say, food and building materials are all SurvivalResources), you can add the enum in the parent class.
    In this example, food inherits SurvivalResource, and in the parent script you have an enum TYPE, and each children has an export "type" of that enum
    then any code can call resource.type == SurvivalResource.TYPE.FOOD to check if it's a food.

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

    Good stuff! Thank you

  • @compasscrafting1147
    @compasscrafting1147 15 วันที่ผ่านมา +1

    Your AudioManager script is interesting. Have you investigated the AudioBus node to attach to your Main scene (or level scenes, if that's how you do it)?

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

    i just went on a 20 minute rant about how i feltlike you justified me having a 3000 line enum file because i found a person that did the same thing. (i don't have many ppl to bounce programming logic off of)

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

    Super useful video, most of these are things I had implemented in my GMS2 game - but I was interested in their godot implementation, since I'm quite new to it and the engine is a bit confusing at times.

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

    The structure is okay if you work solo, but for a team it would be hell. Everything has the access to everything, so easy to eff up...

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

    Requesting in-depth video on the Audio Manager.
    I'm trying to avoid globals, but I'm very interested on your Utils filled with enums and methods.
    The Signal Bus is a topic that nobody is covering, so you'll have lots of interest if you elaborate on how to use it.

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

      th-cam.com/video/Egf2jgET3nQ/w-d-xo.html

  • @Lumii-official
    @Lumii-official 3 หลายเดือนก่อน

    my favorite part of this video was the cat in the background ❤

  • @NullCyan
    @NullCyan 3 หลายเดือนก่อน +1

    Could you make a video about file structure and organisation?

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

    great video, started my game dev and programing journey 4 month ago and videos like this expose me to what I don't know I can do. an in-depth tutorial on enums would be great. what is it, how is it used and how it can not be used. thanks for the video

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

      Great idea! I'll add it to the list :)

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

    A video on the Audio Manager would be very much appreciated!!

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

    that was GREAT, thank you

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

    This was an excellent video. I've been a professional developer for over 30 years, though never a game dev (yet!). This stuff really resonated with me. I have a library of useful code that I include in most of my projects, honed from my experience. And the advice to just try something and learn from it is spot on. Dev is something you learn by doing, so when it doubt, write some code and learn from it.
    Also - Hexagod looks l like fun, but I only see a Windows version of the demo. Do you have plans for Mac support?

  • @JJ-ds2get-her
    @JJ-ds2get-her 3 หลายเดือนก่อน

    I think the enum class doesn’t need to be autoloaded. It can be used directly as is. And you can change its class name to Type instead of Util to make it exclusively for enum types.

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

    Great video, thank you!

    • @Aarimous
      @Aarimous  4 หลายเดือนก่อน +1

      Glad you liked it!

  • @TinyTakinTeller
    @TinyTakinTeller 3 หลายเดือนก่อน +1

    Very nice and useful video!
    Question; Why do you make HexUtil a Resource?
    Usually, I make my utility classes have a class name and use "static" keyword for all functions in there. (So I can call them from anywhere.)

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

    You have a programmer brain bro! Learned a lot!💪

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

    Oh i thought I misunderstood the video, as someone who is really into Godot Script templates I assumed you are going into script templating (the custom base of whenever you are attaching a script to any scene). Nevertheless, teaching about code singletons is important as well. Much appreciated

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

    The cult of enum now has a new disciple!
    😜

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

    Hexagons are the Bestagons, and Amit of Red Blob Games is the best.

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

    Thanks bro!

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

    Thanks for sharing!

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

    couldn't take my eyes off from the cat

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

    I am very interested in a video on the audio manager script. Subscribed.

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

      th-cam.com/video/Egf2jgET3nQ/w-d-xo.htmlsi=XHCUCghqdJrC8Vk2

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

    I can't stop watching the cat.

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

    I think instead of a function get_resource_color_by_type() I would probably just make a dictionary with the color ENUM types as the keys.

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

    just wow, thanks!

  • @Rick-mf3gh
    @Rick-mf3gh หลายเดือนก่อน +1

    Be aware of the god object anti-pattern when using globals.

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

    Great vid! I'd love to see the video about your audio manager script! Also, wouldn't it be good to include that script in a global scene that persists between other scenes, so that sounds like music will carry over when swapping levels et al? Or is there a better way? Would love to see about that!

    • @Aarimous
      @Aarimous  4 หลายเดือนก่อน +1

      Having a music scene is a great use case for a global/autoload script. In fact I did this for my first game Chess Survivors and it worked out very nicely.

  • @HueStudios-i5e
    @HueStudios-i5e 3 หลายเดือนก่อน

    Have you done any multiplayer? I noticed RPC doesn't handle custom classes at all, I wonder if you run into this problem. Haven't tried Resource/RefCounted yet though.

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

    I would be interested in a video on the sound manager.

  • @MoogieSRO
    @MoogieSRO 3 หลายเดือนก่อน +2

    Everyone always says "Don't use global scripts, it's bad practice!" so I've been trying to work my project without them, but then I come across this video and it's like... _why_ am I supposed to be avoiding global scripts...? This looks SO MUCH MORE CONVENIENT than avoiding them! I don't understand the logic. Should I just ignore that advice? Why do people say it so often? There must be a good reason, right??

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

      They say don't, when what they mean is "use Singletons sparingly.. and only after you actually understand concepts like Single Responsibility and Composition" but because they're all making tutorials they just say "Don't"
      Why? Mostly readability and reusability. NOT using them keeps systems independently functional so they don't rely on your Global implementations.

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

      You have to have SOME global functionality. The key is understanding what should and should not be a global responsibility.

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

    Hey, great video!
    I'm newbie to Godot and GDScript andI have question about params in your Signal Bus. I've seen that you have types/classes/"whatever that is" like EntitySpawnEventData, VillagerEventData. How and where do you define those?
    I'd assume those are "custom types" that hold data for specific events and I really like the idea but I have no idea how to define them in GDScript.

    • @Aarimous
      @Aarimous  3 หลายเดือนก่อน +1

      Hey there! You can use the keywork "class_name NameHere" in a script and you don't need to attach scripts to nodes. So for these signals I am creating small scripts that are named "EntitySpawnEventData" and then only have a few variables defined. I call these sort of scripts data wrappers and it just helps keep things organized when you are connecting the signal. Then when I emit the signal I need to create a new instance of the script by saying something like "var data = EntitySpawnEventData.new()" and then assigning variable values and finally passing that when I actually emit the signal. Hope this helps! If you need to I can make a more granular video about this.

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

      @@Aarimous Oh, great to know that I don't have to attach those scripts to nodes. Thanks for answer!

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

      Also, I understand the concept since I have experience with events in other programming languages but more granular video could be useful for people not familiar with programming and good patterns!

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

    great vid

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

    Sorry, once the cat showed up I heard nothing after that...

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

    I also had to make something to manage lots of sounds playing at once. Do you use the limiter or compressor audio bus effects? Because I tried them and got some odd clipping noises. Instead went for a script like yours that lowers volume or refuses to play sounds when the limit is close/reached.

    • @Aarimous
      @Aarimous  4 หลายเดือนก่อน +1

      I first found this issue in my first commercial game Chess Survivors and I tried to fix it with a compressor but I also had clipping issues. This solution has been far better to simply say I can only have so many copies of a sound at once. I'll make another specific video about this soon so let me know if you have any questions about how I do it. Cheers!

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

    Why is, e.g., the TileManager a property of Global? Why is the SignalBus a separate autoload? I’m just wondering why different choices were made for them.

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

    I ALSO LOVE HEXAGONS

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

    I've got good art skills, good programming skills, good music production skills, but game engines feel so convoluted. I quit Godot for almost a year last time because I couldn't wrap my head around the way singletons/autoload, signals, scenes, and nodes work. Nothing was accessible when I called it, spent a whole weekend trying to figure it out. It sucks knowing exactly what I want to make, having the assets made, but the game engine feels itself feels like indecipherable. Well that's my rant
    This video was very informative though, thanks!

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

    Fork I wanted to join the enum cult lmao

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

    I'm going to remove all enums from all my projects now

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

    is it true that using scripts can be dangerous (like collecting data)? then maybe they should check and collect the verified safe ones in a single website

  • @QuanNguyen-cr7
    @QuanNguyen-cr7 3 หลายเดือนก่อน +1

    Hello can you make a video about the environment like rain, sun, snow?

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

    how did you learn about hexagonal gri-- OHHHH

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

    That's exactly what a cult leader would say..

  • @NoOne-fe3gc
    @NoOne-fe3gc หลายเดือนก่อน

    6:25 Indi devs when they discover OOP

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

    Why do you not have 1 million subs?

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

    Can we start a Hexagon cult instead?