AAA combat interactions for your Godot game

Поделиться
HTML-код
  • Опубликовано: 2 июн 2024
  • In the fourth and probably the last episode we are building bridges between our well encapsulated character controller and the rest of the game world. Godot has powerful events routing system called signals, and at first it seems that collision with an enemies sword is exactly the case for using them. But in a big game, we'll either have zero signals or like 50, and a system that has its logic built with 50 events is hardly ever can be debugged and/or scaled properly. Today we'll find a way to design things without unnecessary events. Our test mechanics of choice will be melee hit, of course, reaction to it in a form of damage and stagger (and poise, of course, auto-done). Then we'll touch two-way reaction processing in the form of parrying, to lay ground to any possible two-entity interactions like grabs, complex blocks and what have you. And then we'll polish it all with another layer of logic containing character resources like hit-points and stamina, to add stakes to our hits and parries. The result is a small combat system that is built not to demonstrate the results and discard them, but to be prepared for future growth. And of course it's built almost with a GDscript, without fancy visual stuff, with an exception of one mind-blowing animations trick).
    00:00 What we achieve
    00:30 How to interact properly?
    02:18 How to deal with parameters?
    04:36 Weapon hit implementation
    07:13 From theory to examples
    08:02 Character resources
    11:43 Debts: stagger "combo node"
    12:26 BUGS, IGNORE THE CHAPTER AND READ COMMENTS PLEASE
    14:27 How to scale
    15:05 basic riposte
    renewed transition table: docs.google.com/spreadsheets/...
    code available): github.com/Gab-ani/Godot_Univ...

Комментарии • 16

  • @PointDown
    @PointDown  29 дней назад +3

    CRINGE ALERT, PEOPLE! I have a delusional bug infected root motion showed in the end of the video, that behaves nothing like it's described, and I haven't noticed it. Currently, the problem is fixed in the according branch of the repository. So, new viewers, skip the root motion segment, old viewers, sorry, you were bamboozled with me by Godots silent erroneous code ignoring instead of throwing. Github now has working code with a better animation for slash_1 that demonstrates a proper work with root motion, and I also am furiously making a video about a nuclear solution to any custom root motion troubles for all eternity.

  • @crispyghoul
    @crispyghoul 13 дней назад +3

    I stumbled across your channel today and I am awestruck by the quality of the topics that you are covering for godot. You are answering a lot of questions that I have had for a long time but could not find good tutorials for. Making the player movement feel very AAA has always been a concern of mine, so again thank you for making these videos and hope you make more. Today I will try your root motion tutorial.
    PS - If its not too much trouble, can you make a tutorial on how to make the player tilt slightly/ shift their weight sideways when making a turn while running, like you see in many AAA third person games?

    • @PointDown
      @PointDown  13 дней назад +1

      Thanks for feedback!) Considering tilting, I'll write the idea down, but probably not earlier than September, as I set for myself at least two more series goals. Fast answer for selfresearch - modify your movement Moves to distinct behaviour between turning and running straight (probably by remembering small amount of recent delta-velocities). Then make your torso tilt a littlebit. This will make your legs bahave awkwardly, so you'll need to replicate what industry does - inverse kinematics for legs. Godot has some guides in that field, here's, for example:
      ruclips.net/video/G_seJ2Yg1GA/видео.html . With a little bit of tinkering it is compatible with my skeleton-skin dividing beliefs.
      P.S I am making the last controller cycle video and my github has code for 5th branch already. There is a small node called DEV_ROOTFORGE, its an unpolished dev layer instrument for auto-baking root position tracks. Can be hard without commentary, but you can read it and research functions with docs. The issue it helps to eliminate is that animation player can't have a position track, so we are baking skeleton's position track into "value track" on backend animation that happens to be a Vector3 value track.

  • @PointDown
    @PointDown  Месяц назад +7

    Currently I'm not certain if the series needs more episodes. Instead let's try this: under this post you can challenge me with some complex mechanics you want to throw at this character base and I'll answer how'd I implement them. The channel is small so leaving a comment is essentially dming me.

    • @ink_nightjar
      @ink_nightjar Месяц назад +3

      I'll bite, soulslike blocking with stamina and guardbreaks!

    • @Galmir_
      @Galmir_ Месяц назад +1

      Ok I am curious, how would you go to implement a 3-hit combo moveset with this controller? I checked some of your other videos and it looks like you haven't covered it yet(?)

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

      @@ink_nightjar Block family consists of 5 Move-s: block_idle, block_run/walk, block_sprint, block_react and block_broken. Shield lifting and lowering aren't states, they are just slower-side blendings. Blocks override react_on_hit method. First they solve an easy geometry problem to decide if hit was from the back. If it was, method just calls default react_on_hit and stops. If the hit was faced properly, then character loses [some formula] stamina. If it's stamina is still positive, it goes into block_react, a very short state for about 0.3 seconds, when the game "presses your character with a shield impact". It is a separacte state, because it actually locks your inputs and only queues them, you can check in a ds game, you are unable to act shortely after a blocked hit. If stamina is less than zero, it tries to queue forced move block_broken (tries because your resources can, for example, already be queing forced move death, because you paid with health for missing stamina). If your character has not a static shield, but an inventory system where you can block with a shield or with all your weapons, don't be baited into spamming instantiation of block family states. Instead embrace another logic layer as inventory, that understands you have an offhand, and if block inputed, it's paramaters like animations and formulas are taken from your offhand.

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

      @@Galmir_ I could have misunderstood you, but I think a 3-hit combo is already a result of the 3d episode. You can download it and press attack input during the second strike - it will activate the 3rd hit. Or did you mean something else?

    • @SharkPivo
      @SharkPivo Месяц назад +1

      How about adding a bit more movement?
      I would like to see how this guy hangs onto an edge and climbs on it. Its more of a dragons dogma thing, but demon souls had that, kinda.
      Also, can this guy do a guard break? A kick would be cool.

  • @SharkPivo
    @SharkPivo Месяц назад +1

    Спасибо за тутор, особенно в рамках Godot.
    Замечу только что слово "персонаж" говорится как "кэрэктэр", не "черэктэр".
    Удачи в творчестве и упортства в практике!