The Shaggy Dev
The Shaggy Dev
  • Видео 50
  • Просмотров 1 059 457
10 small ways to make your life easier in GDScript
Here's a collection of miscellaneous tips when working with GDScript to make your life easier. Improve working with the terminal, organizing your code, and learn a few shortcuts you might find handy.
Text version and code snippets: shaggydev.com/2024/06/19/small-gdscript-tips
Просмотров: 4 462

Видео

Game development in the dying days of Flash
Просмотров 3,9 тыс.Месяц назад
It's been ten years since my first "commercial" game project, so let's take a look back at what game development was like in 2014. Flash was on the way out, HTML5 was up and coming, and Steam hadn't yet opened the floodgates. The business model of web games was quite different back then, so let's dive in! Text version: shaggydev.com/2024/05/15/flash-development Big thanks to Internet Archive fo...
Come join the Discord!
Просмотров 649Месяц назад
Come hang out, get tech support, or tell me why I'm wrong. discord.gg/udafrsSzcy
Making a golfing roguelike in one week
Просмотров 3,3 тыс.2 месяца назад
Here's a look at my entry for The 7DRL Challenge, a mashup of golf game and roguelike, I'll talk about how the levels are generated and some challenges I ran into along the way. Text version: shaggydev.com/2024/04/02/7drl-2024-devlog The game: theshaggydev.itch.io/par-for-the-corpse AStarGrid2D: ruclips.net/video/QRr_P_uqz8w/видео.html 00:00 What I made 01:00 How the levels are made 04:55 How t...
Making a dev console in Godot
Просмотров 7 тыс.5 месяцев назад
Here's a look at how I implemented a simple dev console in my game to speed up development. The core functionality is driven by Godot's Expression class, but I've also added a history and autocomplete system to let me work even more effectively. Text version and code snippets: shaggydev.com/2024/01/09/dev-console The Expression class: docs.godotengine.org/en/stable/classes/class_expression.html...
Advanced state machine techniques in Godot 4
Просмотров 24 тыс.6 месяцев назад
Here's a look at some more advanced techniques you can implement in your state machine when you need something a bit more complex than the starter state machine I showed in the last video. We'll look at three techniques worth understanding for building out the state machine you need and address a few common pain points people run into when programming a state machine. Text version with code sni...
Starter state machines in Godot 4
Просмотров 39 тыс.8 месяцев назад
Here's an updated look at how I like to do state machines in Godot 4. I'm going to go over some simpler, starter techniques today, and in the next video I'll go in-depth about techniques you can use when today's examples don't cut it. Text version: shaggydev.com/2023/10/08/godot-4-state-machines Sample project: github.com/theshaggydev/the-shaggy-dev-projects/tree/main/projects/godot-4/state-mac...
Making tactical units - A devlog
Просмотров 5 тыс.9 месяцев назад
Let's talk about how the data behind units is structured, how artwork is implemented, and how I'm handling unit AI in my tactics game. 00:00 - What I'm making 01:40 - Unit data 04:35 - Artwork 08:33 - Unit AI Text version: shaggydev.com/2023/09/04/tactics-devlog-ii/ The previous devlog: ruclips.net/video/8fLbf7n9I9I/видео.html An introduction to Utility AI: ruclips.net/video/78AcS_0lQSM/видео.h...
Developing a tactics engine in Godot
Просмотров 161 тыс.11 месяцев назад
In this devlog of sorts, we'll look at how I'm structuring the game engine for my future tactics game using Godot. Topics include level structure, unit structure, and action management. Text version: shaggydev.com/2023/07/04/tactics-engine-devlog Elemechs video: ruclips.net/video/GYFnyiwa9iw/видео.html What I'm making: 00:00 Level structure: 01:28 Unit structure: 06:00 Godot 3 vs 4: 08:22 Actio...
Making an atmospheric incremental game in Godot in 9 days
Просмотров 7 тыс.Год назад
For the 57th Godot Wild Jam, I made Flame Forged, an incremental game with a heavy emphasis on lore and atmosphere. Here's a quick mini-devlog containing a few interesting things from my time developing the game. Text post: shaggydev.com/2023/06/05/godot-wild-jam-57 Flame Forged: theshaggydev.itch.io/flame-forged
Creating volume sliders in Godot 4
Просмотров 19 тыс.Год назад
Here's the right way to let the user adjust the volume of different types of audio in your game. Sample project: github.com/theshaggydev/the-shaggy-dev-projects/tree/main/projects/godot-4/volume-sliders Text version: shaggydev.com/2023/05/22/volume-sliders/ Further reading - docs.godotengine.org/en/stable/tutorials/audio/audio_buses.html - docs.godotengine.org/en/stable/classes/class_@globalsco...
An introduction to Utility AI
Просмотров 9 тыс.Год назад
Utility AI is a common technique for creating effective AI across a variety of game genres. By turning data about the current game state into numbers, we can allow our AI to make informed decisions about what it should do next. Decisions are hard: 00:00 Utility AI: 01:13 Scoring actions: 03:04 Refining the process: 06:03 Text post: shaggydev.com/2023/04/19/utility-ai Further reading An Introduc...
5 more changes to GDScript 2 in Godot 4 you'll want to know about
Просмотров 11 тыс.Год назад
From signal and tween updates, to debugging help, here's another grab bag overview of some changes to GDScript in Godot 4 that you may want to know about. Text version and code snippets: shaggydev.com/2023/03/07/gdscript1-to-gdscript2-part2 Part 1: ruclips.net/video/8BgAeN4RRR4/видео.html Signals: docs.godotengine.org/en/latest/classes/class_signal.html Y-sorting: docs.godotengine.org/en/latest...
Godot 4 lambda functions
Просмотров 11 тыс.Год назад
Lambda functions are small, anonymous functions that can be declared inline rather than via full function declaration. Let's take a quick look at how to write them in Godot 4. Text version and code snippets: shaggydev.com/2023/02/02/godot-4-lambda-functions Godot docs: docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_basics.html#lambda-functions Corrections: 01:09 This only ...
A few common code smells to be aware of and how to fix them
Просмотров 12 тыс.Год назад
Code smells are things in a codebase that readily stick out and imply something may be off with how it has been designed. Here's a few common ones you may find in your own codebase, why they can be concerning, and how to fix them. Text version: shaggydev.com/2023/01/16/code-smells Martin Folwer on code smells: martinfowler.com/bliki/CodeSmell.html
Using the AStarGrid2D class in Godot 4
Просмотров 21 тыс.Год назад
Using the AStarGrid2D class in Godot 4
An introduction to graph rewriting for procedural content generation
Просмотров 18 тыс.Год назад
An introduction to graph rewriting for procedural content generation
8 changes to GDScript in Godot 4 you'll want to know about
Просмотров 34 тыс.Год назад
8 changes to GDScript in Godot 4 you'll want to know about
How to use setter and getter functions in Godot 4
Просмотров 23 тыс.Год назад
How to use setter and getter functions in Godot 4
Godot 4 beta + channel update
Просмотров 2,1 тыс.Год назад
Godot 4 beta channel update
How to write more flexible game code
Просмотров 20 тыс.Год назад
How to write more flexible game code
How to make a tactics game in only two weeks
Просмотров 68 тыс.Год назад
How to make a tactics game in only two weeks
Kaiju Klash announcement
Просмотров 1,1 тыс.Год назад
Kaiju Klash announcement
5 more quick GDScript tips
Просмотров 4,1 тыс.Год назад
5 more quick GDScript tips
How to use the microphone in Godot 3
Просмотров 5 тыс.Год назад
How to use the microphone in Godot 3
5 tips for better platformer controls
Просмотров 190 тыс.Год назад
5 tips for better platformer controls
Scene transition effects in Godot 3
Просмотров 50 тыс.2 года назад
Scene transition effects in Godot 3
Communicating between game objects with the observer pattern
Просмотров 7 тыс.2 года назад
Communicating between game objects with the observer pattern
Godot's OS Class
Просмотров 4,3 тыс.2 года назад
Godot's OS Class
11 tips for writing cleaner code
Просмотров 10 тыс.2 года назад
11 tips for writing cleaner code

Комментарии

  • @TheOpenWastes-in7lm
    @TheOpenWastes-in7lm 23 часа назад

    Thanks so much for this. It took me three days to wrap my head around state machines, but thanks to your videos and downloadable examples, I've got state machines handling characters' actions in the game I'm working on

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

    awesome, thanks! Any directions for the range highlight that "shapes" around the walls?

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

      No special sauce there. I grab every potential tile for an action, filter it as appropriate (line of sight checks, how many tiles to move to it once obstacles are accounted for, etc) and then use an autotiling layer to display the results of whatever is left.

    • @mrussogamedev
      @mrussogamedev 23 часа назад

      @@TheShaggyDev never thought about autotiling. Brilliant, thanks!

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

    Gold stuff

  • @PotatoPiano1
    @PotatoPiano1 4 дня назад

    Thank you!

  • @Kibble_Bites
    @Kibble_Bites 4 дня назад

    Wow, this is actually a very informative video with a bunch of quirks I didn't know about... LIKED!

  • @gonderage
    @gonderage 4 дня назад

    nooo he didnt mention the shortcuts to evaluate an expression(ctrl shift e) and copying or moving lines of code (ctrl alt down/up)(alt down/up)!!! sidenote: these might not work when preferring wayland, since it's broken on my linux laptop

  • @michelcosta76
    @michelcosta76 4 дня назад

    Godot has REGIONS? Oh thanks god for this information. I use them so much on my c# scripts and was missing them on godot (though I also should have checked)

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

    Oh the prints() will save me a lot of time, thanks a lot ❤

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

    Brilliant vid, definitely saving for reference 🙌

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

    Dude thank you so much this is amazing information to have!

  • @ArtyomK-du6pc
    @ArtyomK-du6pc 5 дней назад

    that's great tutorial! thank you!

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

    is there a reason why you are not simply making the animations and state machine variables on your player node exported vars? on one hand you say that not passing the reference would break the code if you change the node structure but on the other hand you hard code the path to your state machine. just trying to understand your reasoning as i‘m currently in the process of switching from unity where i heavily used inspector set paths

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

      You could certainly do that as well*, but I'm ok with the parent knowing its children. It's the child knowing its parent I'm more cautious of. * There was an issue in Godot for a bit where a top-level exported variable would point to the wrong node when multiple instances were in a scene, but I believe that's been fixed now.

  • @iNastyJerk
    @iNastyJerk 6 дней назад

    Last one was worth the free price of admission :p

  • @jasonwilliams8730
    @jasonwilliams8730 6 дней назад

    👍

  • @ahnmichael1484
    @ahnmichael1484 6 дней назад

    A m a z i n g video, thank you!

  • @ferdeboergd256
    @ferdeboergd256 6 дней назад

    Really helpful!

  • @darthnegativehunter8659
    @darthnegativehunter8659 6 дней назад

    use & when possible (StringName). it's more optimized.

  • @hartstorm69
    @hartstorm69 6 дней назад

    Code regions and prints() goated fr

  • @dustingarner4620
    @dustingarner4620 6 дней назад

    Very helpful, thank you!

  • @pacifich
    @pacifich 6 дней назад

    I literally needed Dictionary.get() today, wish I'd knew sooner lol

  • @stefansava
    @stefansava 6 дней назад

    #regions ❤ did not know they existed

  • @joaofelipe2060
    @joaofelipe2060 6 дней назад

    Thanks for the video. it is very informative. by the way, what is the game shown in 3:46?

    • @TheShaggyDev
      @TheShaggyDev 6 дней назад

      Thanks! That's a little game jam game of mine: theshaggydev.itch.io/mech-defense-force

  • @AlienXgamers
    @AlienXgamers 6 дней назад

    The one about dictionaries and prints and print_rich were pretty helpful, thanks for the vid!

  • @joelgomes1994
    @joelgomes1994 6 дней назад

    Cool! Something I really wish they implemented is to view my script's documentation without having to class_name them.

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

      2:15 he mentioned it, upon further watching but to leave the comment here ima just edit this before the comment. There’s a plug-in I use a lot called todos, very useful for noting things to do, things you hacked together, or things you need to fix, can also put custom ones, change the color, also allows you to go to the line by clicking it.

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

    i will watch all your videos

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

    Программировать научись сын сам знаешь кого

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

    Very inspiring video! Some thoughts: 1) I think your progression generator can be nearly effortlessly adapted to random room placement 2) Another kind of locks are locks that require multiple keys. Also you probably can adapt any algorithm to do it because it is reducible to a sequence of simple locks. 3) To generate small keys you can find a path to a generated door from start, flood fill all accessible from this path without unlocking doors rooms and place a small key in this area. I think it should work for one type of small keys, no big keys and no extra keys perfectly. For big keys you can also flood fill from paths to each required key for already checked paths. For multiple types of small keys it should work fine I guess. It ignores some interesting possibilities in both this cases (like locking access to all small keys of one kind behind big key/another kind of small keys). For generating extra small keys you need some other approach. Probably you can check such level (with 1 small key type) for validity by using greedy algorithm (player picks door that unlocks least keys). So I think (lets say for simplicity that each room is locked behind a small key door) for each room you should keep track of the max amount of keys in the room added after it and append to it only rooms with greater amount of small keys in them. And if you make share that amount of small keys player has during such a process is > 0 (except exit, you can let it be 0 there) it will work, I think.

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

    Great Video. Thanks.

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

    What if I wanted to use a Animation Tree to blend the animations?

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

    Hi Shaggy, could you make an update to this topic covering handling multiple substates? (BaseState>MoveState/ActionState/WeaponState)?

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

    Any chance it'll be uploaded to github?

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

      Most likely not. I tend to prefer uploading more specific examples than my random game jam games.

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

    U r fucking genious

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

    How important is it to use the optional static typing here? I couldn't find a reason to do so in the GDScript style guide

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

      I'm assuming it's just preference

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

      It is indeed just preference, but I do recommend it once you're comfortable with general coding. It makes it clearer to future you and others what your code is doing, it makes the code completion hints in Godot more helpful, and there are some small performance improvements from using it. Plus, in the case of this channel, it gives a better idea of what I'm doing without having to explicitly call out every variable. Again, though, totally optional and not something you have to worry about right away.

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

    THANK YOU SO MUCH!!!

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

    can i ask what's the importance of adding the return void to each function? is there a reason for it?

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

      Just to enforce typing. It let's me know later on not to expect anything from a given function, and by explicitly declaring it the editor will also be able to tell me that with its code hints.

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

      @@TheShaggyDev oh okay that makes sense.

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

    Or you can ignore all of that and make jump king

  • @Lunarsicle
    @Lunarsicle 20 дней назад

    What was the 3rd game you showed never seen it

  • @vrakitine
    @vrakitine 20 дней назад

    When I was earning my master's degree, I heard a lot about finite state machines (FSMs), but it was all theory - like clouds in the sky: there's a lot of water, but you can't drink it. I toiled for three months after graduating until I implemented my first FSM in code in 1981. Now, there is a programming methodology based on this concept - v-agent oriented programming (VAOP) - with many examples of its implementation. It's best to start learning about VAOP with this article on Medium: "Bagels and Muffins of Programming or How Easy It Is to Convert a Bagel into a Black Hole". With VAOP, you can implement FSM in any programming language.

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

    That's a pretty good example of what game designers have to come up with in their work, i.e. what game design is all about. People think game design is about large scale ideas, when in fact the things described in this video are the type of stuff game designers need to put tons of time and effort, sweat and tears into figuring out on every game they make.

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

    do you know where I could find a video like this but for defold?

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

    I use rigidbodies and they work great. I used the tip with reducing velocity when releasing jump button. I love it! In my case i only reduce the velocity by 20% but it makes huge difference.

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

    for some reason, on line 10 "value_changed.connect()" is not working for me. It says "not declared in the current Scope".

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

      if the HSlider isn't the root node, then you need to specify the path, right before ".value_changed.connect()"

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

    Oh wise dev. I bow to your wisdom.

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

    On the next to last day of my first game jam. You are my HERO!

  • @2archarry
    @2archarry 28 дней назад

    I realized coding things such as sprite.flip_h = true. Is not a good practice, the best option is to do it from an animator... Maybe this character does not have an animator.

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

    Coyote time sucks if you design jumps to require using it. It really annoys me when games make it so that the only way you can make a jump is to literally fall off the ledge before pressing the jump button. It should be there to catch millisecond mistakes, not a feature of level design

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

    This tutorial is absolutely fantastic, and I've learned a great deal from it. Thank you very much for sharing your knowledge. I have one observation regarding the "move_component". I noticed that while you've declared types for all parameters and variables, the "move_component" was an exception. Would it be possible to encapsulate these functionalities in a class like "MoveController"? This class could include fundamental methods such as "get_move_direction()", "wants_to_jump()",... In "CharacterBody2D", you might then add a node with a new script titled "PlayerMoveController" that inherits from "MoveController" and overrides certain functions. Within "PlayerMoveController", you could manage controller inputs, and in NPCs, automate certain behaviors. Ultimately, this approach would allow for the specific type declaration for "move_component" using "MoveController", enhancing the robustness and readability of the code.

    • @TheShaggyDev
      @TheShaggyDev 29 дней назад

      Yep! You could certainly set this up in such a way as to have typed support all throughout, such as via the method you've mentioned here. I think overall that's a good idea, and it's something I'd normally do. The only reason I didn't do it here is that the move component is so simple, and I find that too much boilerplate can sometimes throw people for a loop.

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

    I have spent all fucking week trying to find a solution and here late at night at 01:23 on friday, with a new Indev releases every Saturday, thank you so much for literally de-stressing my whole week. You just earned a sub, like and a pin on my bookmark bar

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

    Man I made a game in action script around 2013… it’s not even playable anymore since flash has been abandoned

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

      can you try running its .swf file via Flashpoint tho?

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

      @@ArjunTheRageGuy my game is a poorly optimized piece of shit with a ton of particles. It runs at like 2 fps on flashpoint

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

      @@kirestus man, I didn't know that

  • @jo-wx8ng
    @jo-wx8ng Месяц назад

    also if you had a death state how would you do that? would you have a transition from every other state to the death state?

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

      That's one option. For something like death, I usually let the parent entity short-circuit that path, though, since there may be some higher level effects that need to be taken care of as well (game over screen when the player dies, etc)