Dude, I've been coding for 20+ years, but never did it cross my mind to use the MVC pattern (or those in the enterprise) in a game. You, sir, are cherished. Please keep doing these videos!
I come from SE, and you literally answered all my questions as to how to handle animations, states, and having the right patterns to make everything scalable. This channel is a true GEM, thank you for your work this is AMAZING !
Large scale, large scale, what you gonna do? Your channel is perfect for people who want to implement souls mechanics, I will eventually, goated and sunpilled
Yup. GDscript is ok, but I still like C# much more. This channel could very well be a Unity channel. Better language, better existing content, has their nice DOTS to exercise the brain. But the fucking editor casually consumes 3.5 gb memory plus has a memory leak on top if you activate ECS stuff. And VS on top of that. Yeah... And here we have Godot, that is still a bit raw at times and crushes regularly once a week. Well, guess what, to close crashed Godot editor and reopen it again takes about 15 seconds :D. My heart forever with it at this point.
This is amazing, I really hope you are planning on expanding this combat system, and implement more advanced and complex mechanics with some AI and enemies
Yep, I plan). There are complex mechanics on the way, and some generalization including turning humanoid model into a pluggable scene. And then as our input is stateless, it'll come out that at least humanoid enemies can be created in 0.01 second by copying the model, and adding a script that provides inputs for it, but as an AI😎.
Great video man. Very informative. I just subbed. I will soon be reviving my dying channel and post some Godot experiments. Keep up the great work! 😉👌🏾
I have trouble understanding the term. Quick google session showed some batman games, but I haven't played any. Do you have some concrete attributes to list? This way I'll be able to tell.
@@PointDown the main attribute of it is that player's melee attacks have light aim assist, as if they were pulled by a magnetic invisible force towards the enemy. Like you know how locking mechanism works on many melee combat systems? In that systems all attacks are directed towards a target enemy and you circle around that target. But in freeflow combat system you can move around, rotate, run, jump in any direction, but when attacking an enemy, the system will use a raycast to check if there's a target in the direction you are pointing and direct the attack towards that target. If you are surrounded by 4 targets, if you direct your attack towards one of them, the raycast will detect it and play the attack animation towards that specific target. Other games that use it are Assassins creed series. Here's a link to a video that explains it with more technicality ruclips.net/video/Y63C3wxnFwo/видео.html
@@edzu2771 Aah, I see. Witchers have a similar system also. Neat idea, one video, eazy mechanic to implement, nice title to release, I am definitely writing it down. I'm now busy with enemies series for at least a month and several videos more, but after it ends I plan to release some singles, inverse kinematics, maybe camera, maybe your idea. I believe the transition to be smooth, as in latter videos of enemies series there will be an episode dedicated to crowd combat and the whole mechanic of "standing around dangerously but not killing the player".
@@PointDown Yeah, Witcher as well as Shadow of Mordor have the same combat system. Honestly, I do like it, it feels more modern than the locking system. If you decide to eventually tackle it, I found a free resource that implements it in Unity; might be useful. ruclips.net/video/p7uqAH6PrW0/видео.html
There is one thing I am not sure to understand tho. In the part 2 , you seem to use a trick with progress tracking and value interpolation to get constant results from the animation player function calls. So why you don't use this here for the jump animations timing instead of hardcoding them ?
There are two answers, first is concrete example of ease of use. Jump timing information is a "one border" event, like one frame impulse addition. How do you code this in backend animation? Put a bool in "should_jump" track, then do if should_jump -> jump, else nay? Still the same level of use comfort, but with another track, meh. Plus Move API litters a bit. How do we access that value? We'd call move database for it, aren't we? So now it has the getter method that only jumping actions use, meh. By no means that's a big no-no, like, we have such methods, for example, attack parameters. But attacks at least are scenefied and cloned left and right, we can have tens of them, so having a part of API about attacks even in the base Move is more justifiable. This is a concrete example of jumping actions, sometimes tho, I really use a hardcoded timing in places where backend animation will do nicely, for example in said attack moves I even left a TODO comment reminding me to shove it there. Also the 5th episode evolution has some more functional transitioned to backed animations and transition logic cycle rewritten a bit.
@@PointDown Thanks for the answer ! Just saw the video after and yeah I get your point, it's pretty clean this way. Using this thread for another question I had, which is about input priority and why you don't let the input gatherer chose the input for the current process iteration (with a priority system of its own) ? Because as is, it feel weird to me to have a list of inputs I need to sort, and I feel like I lack a keypoint of understanding.
@@mathieutammaro6128 I prefer input gathering process to be the stupidest I can make it. Every part of the system does it's job. Input gatherer gathers information about inputed actions, model and combat system think on how to interpret it. Otherwise when there is no definitive "wall" between processors, their roles start to blend in and situation becomes dirty quickly. Like, we have our default actions, we have combat system that interprets inputs and maps them with weapon, we have Combo framework (which is a rather simple class, but extremely powerfull tech, you can see in this not so popular vid: ruclips.net/video/OLPJdg6Y9Yo/видео.html). Already many things in the model interpret inputs and they might use whatever they want from an input package. Now imagine you installed some logic in the input node. Do you have a guarantee that what you filter there does not and will not forever got in the way of any combo, any of your combat system rules? And what happens if it does when you implement some new feature? Now you either need to refactor your code of input logic into model logic, OR you need to work with your old pre-processed input and process input in the Move/Combat/Combo as well. So, idk how to do it without a nice example and I can't imagine one for now. But my position from experience is when you "steal" functional from one part of a system into a wrong place, it often bites you in the ass in the form of a need to "steal back" a part of the second system into the first one, intertwining them and sphagettifying your life.
@@mathieutammaro6128 On the other hand, it's always easier to talk with examples, so you can hit me with your best example of what preprocessing you want to do in the input Node, and I'll try to "debate" it by telling you why I don't think that's a good idea.
I like your approach for handling the animation and state together. however just a bit stuck on how you would handle 8 directional movement for diagonal and strafing? I don't think normally a souls like controller supports this behavior, however i did find myself in a little bit of a pickle if one wanted to achieve something like this without using an AnimationTree/Blendspace. I'm still playing around with it to see if i can pull it off. however what are your thoughts? how would you approach this problem? currently i'm trying to put all this logic in one 'move' state for right now to see if i can achieve it. but i have mixed results. nothing concrete.
Souls have that strafing behaviour when camera is locked, so, supports, just isn't implemented by me :D. Your problem is in fact two problems in a trenchcoat: how to get to having 8 animations for movement and how to have a state with dynamic animation parameter. Aaaand... Let me be clear, the first problem I personally would solve with having 8 animations done for you. No matter what I tried, every time I experimented with blendspace2D to mix W and A movement animation into a WA strafing, I got a gibberish poopwalk of some sort. It seems theoretically it can work, but only if your animations aren't anim-stock-stolen, as mine, but carefully crafted together, synchronized and thought out for blending in advance. Which, if you can afford, I don't see why can't you afford another 4 animations for authentic diagonals to eliminate a need for blending altogether. If you, however, insist on using blendspace to synthesize your diagonal movements, the latter evolutionary stages of this controller have access to animation_tree technologies. We quickly dip a fingertip in there in a video about animation pipelines. I grew to hate this technology, but hey, it's blendspace compatible, so you might find it useful. Vid : ruclips.net/video/Fsa2wxyQvzM/видео.html. Now with that out of the way, I assume we have an access to 8 animations. The second problem is actually easy AF, just refactor your animator calls a bit. Instead of direct call of animation_player.play("smth"), create a dedicated call in the animator - something like react_on_changes(). This method will be called when some piece of logic understands that the animation needs to be changed, but doesn't want to take the responsibility to change it (and that's right because it's the animator system's responsibility). Then just just call this method from your run state whenever input vector "changes type". One thing I'd also advise you to do in that case is to divide the input vector into two per-axis inputs, one for A-D and one for W-S. This will make your strafe type defining routine cleaner and you'll get an access to ellipse-type strafing family some rare games use, where your diagonal strafes don't have exact 45` angles between them, can be usefull for some mecha games etc. Then if you'll choose blenspace - think of something yourself, if you'll choose having 8 animations, I'd have a Dictionary of string:string pairs and entries like "W : run_forward", "WA : run_wa_strafe" - ie translated diagonal codes into animations names. Hope that helps ^_^.
man, i need something like this. been theorizing how to make something like platinum games's stylish action games, and i keep thinking about that one GDC on nier automata where every animation had 64 flags. something like your architecture looks scalable like that :] next problem for me would be if i would like to set flags in my animation software, because it'd be easier to think about that while making the animations, how would those flags be set and exported to godot?
I want to highlight, that my experience in animation field is nothing like my experience in software field. Maybe blender has some kind of addon, idk, or maybe you can invent a hackish technique using shape keys (godot supports them in import), leaving your forms unchanged, but then just using the value of the parameter. Needs testing tho. But. I also want to highlight that using animation flags directly in the animation flags is a trap. I know your lazy ass wants to play those booleans. You can watch ep2 chapter "animations and how to not use them" for a nice little illustration what happens if you try to "play booleans animated"in godot. Then in the 4th episode I show a trick on how to really do that, how to install booleans into an animation. But that way you'd probably not want to even do outside of godot at the first place.
@@PointDown the hackish technique i always thought of was using a specially named bone to store the custom properties, then hijacking the Blender GLTF 2.0 exporter to write to the extras section, then using Godot's GLTF classes to add functions calls in the animations in an EditorImportPlugin script. And nah, I wasn't gonna use bools, I just wanted function calls that would drive shader parameters. I usually am able to preview the shaders in Blender where it's easy and quick to iterate shader parameters, hence why I'd like to author the animation flags outside Godot.
@@gonderage Ah so truly presentation flags only. Yes, of course their place is to be in animations if your could bake them there. Then my mind drifts to some completely custom importer on the godot side, yes. Maybe ignore the bones that have something in their name, like, starting from the parameter etc. In the end, Godot can automatically loop the animation, if in has "-loop" in the blender as a name. The only thing that bothers me is that for that to work properly, your assets provider needs to be tightly coupled with a person who writes the presentation layer of the game. Imagine you have your custom importer that sets up a sexy method call track only for someone later to decide it'll be a cool idea to rename one of the shader methods in code, or to move it.
yeah, thanks! ill keep a look out for that as both the presentation layer guy and the asset provider. man, i never thought that architectures i learned from writing django apps is completely transferrable to game development :]
Is it alright if you teach us how you made the res animations? I'm trying to get rokoko mocap animations, and import them to godot, and I'm confused on how to get passed "Some Animation Libraries were invalid" (I've imported an FBX skinless armature as a animation library, but now it isn't apart of [Global])
@@davitdon2963 I never had such a problem, so I can't help you). Anyways, there is a discord channel of mine, with a better chat and ability to send picrures, I believe we can help you troubleshoot that. Another resource is my video about combos I believe, it's in the failed mechanics museum series, there I describe and show my pipeline for working with animations. Another thing that can help you is the recent video about splitting torso animations from legs animations, there I discuss methods to procedurally modify .res animations and doing it with import scripts. But still, that's all on the godot side, if you did something in 3d software that made your file "indigestible" by godot, I wouldn't be able to help. Only one extra advice with "power down and power up" vibes - try to use glb instead of fbx and see what will happen, maybe it's the godot's screwed up fbx importer.
Not sure if i fully understand the seperation between Mesh and Skeleton. The Skeleton is used as model, it has all the hitboxes it moves to do the actual gameplay, it is triggered by the AnimationPlayer to move. Ok Why not just slap the mesh next to it the same scene? The only advantage i can think of is to swap the mesh for another mesh, but that requires both meshes to be compatible with the same skeleton. So if you have a lot of humans i guess thats an advantage. But even then why not simply swap the MeshInstance in the Mesh Node, within the Model Scene.
Well, for now this is an over preparation but on scale it will save you some sanity. Our project is a demo demonstrating the backend, our code base is 90% controller's logic. But in a real game a lot of things are happening in the presentation layer. The whole business about FX and sound managing, for example, if I suddenly generated 10 FX into the world and 10 sound effects, I'd want some system to direct those, maybe dim them or regulate effect to escape epilepsy. Many games with sheathing change their swords models to just handles to prevent the blade from clipping through sheath on micro hips movements. Something needs to manage that. Many games have all sorts of skins, not only for people, but for weapons also, and some weapons have a purely visual logic attached, maybe they emit one FX when sheathed and another when wielded. Going further, a lot of games have equipment slots, that might be even some complex clothes with skeletal animations or cloth sim or shader. That's potentially a whole simulation level but it has n o t i n g to do with your actual game's core and must be stored in the presentation layer, because, well, of course you can have it in the model but at that time the model would have 1000 lines about model and 2000 lines about presentation. Which will piss you off if your prototype flops on a test group and investors will ask you to provide "this one but with realism, also try out this one but with fortnine graphics" to pitch again. Also if the model is stripped from visuals, it can ease out opening it to multiplayer, even to an asymmetrical model with dedicated graphics-less server. You'll suddenly find out that if your model is the purest form of your game without any presentation details attached, you can almost "copy drag and drop the folder" into the server project and setup some bridges. While in the model+presentation you'll face a process of carving out visual staff from the model, which will be painful because in one scene it will all diffuse one into another with time.
@@electratix You are in it my friend :D. I just stopped to use the words "episode №" for video titles. Here they are, organized into a playlist by the time of issuing: ruclips.net/p/PLzia-gCwY2G2AXn2hvAjKzLH2_rCvVQFQ&si=sUERI_JyzCViGZ1o
I came across an issue in your project, I tried adding set_blend_time("slash_1", "idle", 1.0) but no matter how long I set it to, it still teleports the arm from left to right instantly and then just transitions the right arm from slightly forward to a bit more back. It's almost as if there is an extra 1 frame at the end of slash_1 with the arm on the right side, but I can't see why this is happening. Edit: I found the issue, "Idle" state never returns the string "okay" so it constantly switches from idle to idle every single frame which messes up animation blending. I added if input.actions[0] == "idle": return "okay" and so it no longer switches from idle to idle every frame
Cringe. I literally have this code in my idle now, it seems I added it as a microfix and forgot to commit in the final 4ep branch, thanks for pointing out! Anyhow, it seems that I actually now need a 4.5 ep branch, becaaaauseee... As I said, I'm bad at godot, and my root motion code is straight up bullshit that does nothing, but is silently compiling without warning, because fuck me I suppose. If you are interested in nicer hits transitions and mechanics, I will commit in the 4 ep branch again closer to todays evening and then throw together a sorry video about root motion.
Я сделал так, чтобы нажимая на shift перс бежал - добавил var running, который false, когда Input.is_action_pressed("run") не нажат. Но когда я нажимаю сначала shift, а потом w - анимация бега не срабатывает. Брат, почему?
Ну, слушай, я так телепатически проблемы не решаю). Скорее всего, у тебя где-то ошибка в дереве if-ов на считывании инпута, что твой спринт не обрабатывается, если перед этим не нажали что-то из WASD.
I love your videos, but as a beginner its hard to follow when you skip showing how you made some things. For example: How did you made the root bone node ?
Well, they are kinda not for beginners but for people who struggled with some problems firsthand, to then find the better solution. What you call root bone node I believe is an BoneAttachment3D that uses external skeleton and is attached to its root bone.
I should have probably watched your AnimationTrees video before commenting, but I don't get the point of handling transitions manually. Otherwise, great vid, and I love your approach to architecture.
AnimationTree video is more "general sense" arguments, but there is another good illustration in the end of the second episode. There I demonstrate, how using playable animations ruins determinism and should probably not used in the logic if can be avoided.
@@PointDown Odd because i remade a similar test and had no inconsistency issues whatsoever in function calling in the animation player. Saw no mention of it anywhere either, i mean surely someone else would have noticed? I wonder if this is really as bad as you make it seem...Could it depend on performance? Or perhaps it got fixed since then?
@@antoineberkani9747 It depends on a frequency of calls, I took 30 ms and I have inconsistencies almost every run, but if you take an interval of 50ms - one in 4 runs maybe, and the lower frequency you take the less notiseable it gets. Which is kinda cursed, imo. Imagine you took once a second interval and the mistake randomly appears once in like an hour. You most probably won't notice that untill production or mass test and then you'll get insane before you'll find out where from one broken game tick comes from, once a several hours... Now, I ask the same question again, will you create a game with a competitive vibe knowing your game internals are dependent on a random abstract millisecond the game decided to update animation?
@@antoineberkani9747 Even if they fixed it (I'll be able to check later this day), there is still a case two. Putting calls and signals issuing from animation tracks is something that seems a very neat idea and is supported by editor's interface. But it's such a bait, having your logic be invoked by signals from animation runs quickly turns your code into a sphagettified horror.
Nah, I just loved the music piece and didn't even knew where was it from :D. Thanks for direction tho. I doubt I'd find time for gaming, but now I'm obliged to check the full ost in search of potential good ambience pieces for future videos / for dnd dming.
Im sure this tutorial is goated but it’s hard to pay attention to with all the random edits and respectfully your accent it’s just a lot going on wish it was more to the point when talking about the topic of the video
Ajaja. Well, here's some perspective for you as from creator. Something really really odd happens with engagement. "Algorithm shmalgorith" - that's all bs, youtube promotes a video more if people spend more time looking into it, click on preview faster/more often and/or subscribe during the viewing process. So to create a successful vid you need as much of these metrics: banger thumbnail, longer average viewing time and some sub bait inside, preferably all of these. And here's where devil sits: whomever I asked, in personal messaging, and in comments, and in real life acquaintances, and in polls, every single one of respondents tells me they like slower videos more. Ted talks, more metaphors, more examples, less cuts. Like literally everyone. I was even baited to make a whole enemy series slow after some youtube polling, you can find that post in my community tab. However, when it comes to actual videos, slow videos suck ass. People straight up don't watch them. They don't subscribe, they click away faster etc, so if a slow vid has a banger thumbnail it has a liiiittle bit of potential, but it's pretty much disabled from the start. So, either, that's some democracy paradox, people are full of bullshit and don't know what they want for real. Ooor, there is a fundamental division between engaged audience and not, so the engaged minority answers polling and gives feedback, and wants slower vids, but a silent majority doesn't poll, doesn't give feedback, and doesn't watch slow videos. For me with all the stats access the difference is mega-obvious. After the enemy series that I promised to make slow, I returned to dense vids, I made four of them, and they all are literally x2-x5 times better. The 35 min vid about skeleton modifiers is not slow, it's also fast and dense, it's just not 40min theme compressed into 15, it's 2h theme compressed into 35 min. And people watch them and want more. I honestly, understand you, I pretty much hate the genre of educational video alltogether, I'm a text guide human being and I mourn the death of text guides genre with crocodile tears. But since this is the platform I use and this is the audience I have, cuts and speed are going to stay(. Considering accent, well, it will get better over the years somehow. For the latter videos I started to make subtitles and I plan to add them further, maybe they will help.
Потому что мне кажется, что потенциальная аудитория больше, а также потому что процесс создания видео делает лучше еще и меня. Типично для не носителя, у меня хорошие reading и listening, но сносный writing и отвратильный speaking. А за месяц создания этих видео я наговорил больше, чем за несколько лет, это интересно и я чувствую, как это помогает мне.
Dude, I've been coding for 20+ years, but never did it cross my mind to use the MVC pattern (or those in the enterprise) in a game. You, sir, are cherished. Please keep doing these videos!
When I heard the term "dependency injection" in the last video I thought I was back at work doing PHP lol
I come from SE, and you literally answered all my questions as to how to handle animations, states, and having the right patterns to make everything scalable. This channel is a true GEM, thank you for your work this is AMAZING !
Large scale, large scale, what you gonna do?
Your channel is perfect for people who want to implement souls mechanics, I will eventually, goated and sunpilled
It still amazes me that this engine's size is in MBs
Yup. GDscript is ok, but I still like C# much more. This channel could very well be a Unity channel. Better language, better existing content, has their nice DOTS to exercise the brain. But the fucking editor casually consumes 3.5 gb memory plus has a memory leak on top if you activate ECS stuff. And VS on top of that. Yeah... And here we have Godot, that is still a bit raw at times and crushes regularly once a week. Well, guess what, to close crashed Godot editor and reopen it again takes about 15 seconds :D. My heart forever with it at this point.
This is amazing, I really hope you are planning on expanding this combat system, and implement more advanced and complex mechanics with some AI and enemies
Yep, I plan). There are complex mechanics on the way, and some generalization including turning humanoid model into a pluggable scene. And then as our input is stateless, it'll come out that at least humanoid enemies can be created in 0.01 second by copying the model, and adding a script that provides inputs for it, but as an AI😎.
@@PointDown awesome, you just made my day
Great video man. Very informative. I just subbed. I will soon be reviving my dying channel and post some Godot experiments. Keep up the great work! 😉👌🏾
nie [чарактер], a [кэракчер], spasiba za vnimaniye and good luck in future projects! :-)
Im still laughing over 'ass sphere'
Do you think you'll tackle freeflow combat system eventually?
I have trouble understanding the term. Quick google session showed some batman games, but I haven't played any. Do you have some concrete attributes to list? This way I'll be able to tell.
@@PointDown the main attribute of it is that player's melee attacks have light aim assist, as if they were pulled by a magnetic invisible force towards the enemy.
Like you know how locking mechanism works on many melee combat systems? In that systems all attacks are directed towards a target enemy and you circle around that target.
But in freeflow combat system you can move around, rotate, run, jump in any direction, but when attacking an enemy, the system will use a raycast to check if there's a target in the direction you are pointing and direct the attack towards that target.
If you are surrounded by 4 targets, if you direct your attack towards one of them, the raycast will detect it and play the attack animation towards that specific target.
Other games that use it are Assassins creed series.
Here's a link to a video that explains it with more technicality ruclips.net/video/Y63C3wxnFwo/видео.html
@@edzu2771 Aah, I see. Witchers have a similar system also. Neat idea, one video, eazy mechanic to implement, nice title to release, I am definitely writing it down. I'm now busy with enemies series for at least a month and several videos more, but after it ends I plan to release some singles, inverse kinematics, maybe camera, maybe your idea. I believe the transition to be smooth, as in latter videos of enemies series there will be an episode dedicated to crowd combat and the whole mechanic of "standing around dangerously but not killing the player".
@@PointDown Yeah, Witcher as well as Shadow of Mordor have the same combat system. Honestly, I do like it, it feels more modern than the locking system.
If you decide to eventually tackle it, I found a free resource that implements it in Unity; might be useful.
ruclips.net/video/p7uqAH6PrW0/видео.html
There is one thing I am not sure to understand tho. In the part 2 , you seem to use a trick with progress tracking and value interpolation to get constant results from the animation player function calls. So why you don't use this here for the jump animations timing instead of hardcoding them ?
There are two answers, first is concrete example of ease of use. Jump timing information is a "one border" event, like one frame impulse addition. How do you code this in backend animation? Put a bool in "should_jump" track, then do if should_jump -> jump, else nay? Still the same level of use comfort, but with another track, meh. Plus Move API litters a bit. How do we access that value? We'd call move database for it, aren't we? So now it has the getter method that only jumping actions use, meh. By no means that's a big no-no, like, we have such methods, for example, attack parameters. But attacks at least are scenefied and cloned left and right, we can have tens of them, so having a part of API about attacks even in the base Move is more justifiable.
This is a concrete example of jumping actions, sometimes tho, I really use a hardcoded timing in places where backend animation will do nicely, for example in said attack moves I even left a TODO comment reminding me to shove it there. Also the 5th episode evolution has some more functional transitioned to backed animations and transition logic cycle rewritten a bit.
@@PointDown Thanks for the answer ! Just saw the video after and yeah I get your point, it's pretty clean this way.
Using this thread for another question I had, which is about input priority and why you don't let the input gatherer chose the input for the current process iteration (with a priority system of its own) ?
Because as is, it feel weird to me to have a list of inputs I need to sort, and I feel like I lack a keypoint of understanding.
@@mathieutammaro6128 I prefer input gathering process to be the stupidest I can make it. Every part of the system does it's job. Input gatherer gathers information about inputed actions, model and combat system think on how to interpret it. Otherwise when there is no definitive "wall" between processors, their roles start to blend in and situation becomes dirty quickly. Like, we have our default actions, we have combat system that interprets inputs and maps them with weapon, we have Combo framework (which is a rather simple class, but extremely powerfull tech, you can see in this not so popular vid: ruclips.net/video/OLPJdg6Y9Yo/видео.html). Already many things in the model interpret inputs and they might use whatever they want from an input package. Now imagine you installed some logic in the input node. Do you have a guarantee that what you filter there does not and will not forever got in the way of any combo, any of your combat system rules? And what happens if it does when you implement some new feature? Now you either need to refactor your code of input logic into model logic, OR you need to work with your old pre-processed input and process input in the Move/Combat/Combo as well. So, idk how to do it without a nice example and I can't imagine one for now. But my position from experience is when you "steal" functional from one part of a system into a wrong place, it often bites you in the ass in the form of a need to "steal back" a part of the second system into the first one, intertwining them and sphagettifying your life.
@@mathieutammaro6128 On the other hand, it's always easier to talk with examples, so you can hit me with your best example of what preprocessing you want to do in the input Node, and I'll try to "debate" it by telling you why I don't think that's a good idea.
I like your approach for handling the animation and state together. however just a bit stuck on how you would handle 8 directional movement for diagonal and strafing? I don't think normally a souls like controller supports this behavior, however i did find myself in a little bit of a pickle if one wanted to achieve something like this without using an AnimationTree/Blendspace. I'm still playing around with it to see if i can pull it off. however what are your thoughts? how would you approach this problem? currently i'm trying to put all this logic in one 'move' state for right now to see if i can achieve it. but i have mixed results. nothing concrete.
Souls have that strafing behaviour when camera is locked, so, supports, just isn't implemented by me :D.
Your problem is in fact two problems in a trenchcoat: how to get to having 8 animations for movement and how to have a state with dynamic animation parameter.
Aaaand... Let me be clear, the first problem I personally would solve with having 8 animations done for you. No matter what I tried, every time I experimented with blendspace2D to mix W and A movement animation into a WA strafing, I got a gibberish poopwalk of some sort. It seems theoretically it can work, but only if your animations aren't anim-stock-stolen, as mine, but carefully crafted together, synchronized and thought out for blending in advance. Which, if you can afford, I don't see why can't you afford another 4 animations for authentic diagonals to eliminate a need for blending altogether. If you, however, insist on using blendspace to synthesize your diagonal movements, the latter evolutionary stages of this controller have access to animation_tree technologies. We quickly dip a fingertip in there in a video about animation pipelines. I grew to hate this technology, but hey, it's blendspace compatible, so you might find it useful. Vid : ruclips.net/video/Fsa2wxyQvzM/видео.html.
Now with that out of the way, I assume we have an access to 8 animations. The second problem is actually easy AF, just refactor your animator calls a bit. Instead of direct call of animation_player.play("smth"), create a dedicated call in the animator - something like react_on_changes(). This method will be called when some piece of logic understands that the animation needs to be changed, but doesn't want to take the responsibility to change it (and that's right because it's the animator system's responsibility). Then just just call this method from your run state whenever input vector "changes type". One thing I'd also advise you to do in that case is to divide the input vector into two per-axis inputs, one for A-D and one for W-S. This will make your strafe type defining routine cleaner and you'll get an access to ellipse-type strafing family some rare games use, where your diagonal strafes don't have exact 45` angles between them, can be usefull for some mecha games etc. Then if you'll choose blenspace - think of something yourself, if you'll choose having 8 animations, I'd have a Dictionary of string:string pairs and entries like "W : run_forward", "WA : run_wa_strafe" - ie translated diagonal codes into animations names.
Hope that helps ^_^.
man, i need something like this. been theorizing how to make something like platinum games's stylish action games, and i keep thinking about that one GDC on nier automata where every animation had 64 flags. something like your architecture looks scalable like that :]
next problem for me would be if i would like to set flags in my animation software, because it'd be easier to think about that while making the animations, how would those flags be set and exported to godot?
I want to highlight, that my experience in animation field is nothing like my experience in software field. Maybe blender has some kind of addon, idk, or maybe you can invent a hackish technique using shape keys (godot supports them in import), leaving your forms unchanged, but then just using the value of the parameter. Needs testing tho. But. I also want to highlight that using animation flags directly in the animation flags is a trap. I know your lazy ass wants to play those booleans. You can watch ep2 chapter "animations and how to not use them" for a nice little illustration what happens if you try to "play booleans animated"in godot. Then in the 4th episode I show a trick on how to really do that, how to install booleans into an animation. But that way you'd probably not want to even do outside of godot at the first place.
@@PointDown the hackish technique i always thought of was using a specially named bone to store the custom properties, then hijacking the Blender GLTF 2.0 exporter to write to the extras section, then using Godot's GLTF classes to add functions calls in the animations in an EditorImportPlugin script.
And nah, I wasn't gonna use bools, I just wanted function calls that would drive shader parameters. I usually am able to preview the shaders in Blender where it's easy and quick to iterate shader parameters, hence why I'd like to author the animation flags outside Godot.
@@gonderage Ah so truly presentation flags only. Yes, of course their place is to be in animations if your could bake them there. Then my mind drifts to some completely custom importer on the godot side, yes. Maybe ignore the bones that have something in their name, like, starting from the parameter etc. In the end, Godot can automatically loop the animation, if in has "-loop" in the blender as a name. The only thing that bothers me is that for that to work properly, your assets provider needs to be tightly coupled with a person who writes the presentation layer of the game. Imagine you have your custom importer that sets up a sexy method call track only for someone later to decide it'll be a cool idea to rename one of the shader methods in code, or to move it.
yeah, thanks! ill keep a look out for that as both the presentation layer guy and the asset provider.
man, i never thought that architectures i learned from writing django apps is completely transferrable to game development :]
@@gonderage "Wait, it's all patterns?" Insert always has been astronauts template :D
Hi! Thanks for all the amazing tutorials, Im learning so much from you. I would like a tutorial for weapon switching, im struggling with it
@@ElGabroVero One day but not too soon. It's definitely on the list, but in a "when I run out of ideas" cathegory.
@@PointDown You are so kind man! Thx for the answer!
Is it alright if you teach us how you made the res animations? I'm trying to get rokoko mocap animations, and import them to godot, and I'm confused on how to get passed
"Some Animation Libraries were invalid" (I've imported an FBX skinless armature as a animation library, but now it isn't apart of [Global])
@@davitdon2963 I never had such a problem, so I can't help you). Anyways, there is a discord channel of mine, with a better chat and ability to send picrures, I believe we can help you troubleshoot that.
Another resource is my video about combos I believe, it's in the failed mechanics museum series, there I describe and show my pipeline for working with animations.
Another thing that can help you is the recent video about splitting torso animations from legs animations, there I discuss methods to procedurally modify .res animations and doing it with import scripts.
But still, that's all on the godot side, if you did something in 3d software that made your file "indigestible" by godot, I wouldn't be able to help.
Only one extra advice with "power down and power up" vibes - try to use glb instead of fbx and see what will happen, maybe it's the godot's screwed up fbx importer.
Not sure if i fully understand the seperation between Mesh and Skeleton. The Skeleton is used as model, it has all the hitboxes it moves to do the actual gameplay, it is triggered by the AnimationPlayer to move. Ok Why not just slap the mesh next to it the same scene?
The only advantage i can think of is to swap the mesh for another mesh, but that requires both meshes to be compatible with the same skeleton. So if you have a lot of humans i guess thats an advantage. But even then why not simply swap the MeshInstance in the Mesh Node, within the Model Scene.
Well, for now this is an over preparation but on scale it will save you some sanity. Our project is a demo demonstrating the backend, our code base is 90% controller's logic. But in a real game a lot of things are happening in the presentation layer. The whole business about FX and sound managing, for example, if I suddenly generated 10 FX into the world and 10 sound effects, I'd want some system to direct those, maybe dim them or regulate effect to escape epilepsy. Many games with sheathing change their swords models to just handles to prevent the blade from clipping through sheath on micro hips movements. Something needs to manage that. Many games have all sorts of skins, not only for people, but for weapons also, and some weapons have a purely visual logic attached, maybe they emit one FX when sheathed and another when wielded. Going further, a lot of games have equipment slots, that might be even some complex clothes with skeletal animations or cloth sim or shader. That's potentially a whole simulation level but it has n o t i n g to do with your actual game's core and must be stored in the presentation layer, because, well, of course you can have it in the model but at that time the model would have 1000 lines about model and 2000 lines about presentation. Which will piss you off if your prototype flops on a test group and investors will ask you to provide "this one but with realism, also try out this one but with fortnine graphics" to pitch again. Also if the model is stripped from visuals, it can ease out opening it to multiplayer, even to an asymmetrical model with dedicated graphics-less server. You'll suddenly find out that if your model is the purest form of your game without any presentation details attached, you can almost "copy drag and drop the folder" into the server project and setup some bridges. While in the model+presentation you'll face a process of carving out visual staff from the model, which will be painful because in one scene it will all diffuse one into another with time.
@@PointDown well thats a solid explanation, thanks
Nice Video, can u do a Tutorial Like ForHonor Combat system? 👍
That's part 3 of the tutorial and I'll add complex interactions like parrying, blocks, poise and grabs in the 4th part in about a week.
@@PointDown Did PT3 ever get released? Struggling to find it
@@electratix You are in it my friend :D. I just stopped to use the words "episode №" for video titles. Here they are, organized into a playlist by the time of issuing: ruclips.net/p/PLzia-gCwY2G2AXn2hvAjKzLH2_rCvVQFQ&si=sUERI_JyzCViGZ1o
I came across an issue in your project, I tried adding set_blend_time("slash_1", "idle", 1.0) but no matter how long I set it to, it still teleports the arm from left to right instantly and then just transitions the right arm from slightly forward to a bit more back. It's almost as if there is an extra 1 frame at the end of slash_1 with the arm on the right side, but I can't see why this is happening.
Edit: I found the issue, "Idle" state never returns the string "okay" so it constantly switches from idle to idle every single frame which messes up animation blending. I added
if input.actions[0] == "idle":
return "okay"
and so it no longer switches from idle to idle every frame
Cringe. I literally have this code in my idle now, it seems I added it as a microfix and forgot to commit in the final 4ep branch, thanks for pointing out! Anyhow, it seems that I actually now need a 4.5 ep branch, becaaaauseee... As I said, I'm bad at godot, and my root motion code is straight up bullshit that does nothing, but is silently compiling without warning, because fuck me I suppose. If you are interested in nicer hits transitions and mechanics, I will commit in the 4 ep branch again closer to todays evening and then throw together a sorry video about root motion.
Я сделал так, чтобы нажимая на shift перс бежал - добавил var running, который false, когда Input.is_action_pressed("run") не нажат. Но когда я нажимаю сначала shift, а потом w - анимация бега не срабатывает. Брат, почему?
Ну, слушай, я так телепатически проблемы не решаю).
Скорее всего, у тебя где-то ошибка в дереве if-ов на считывании инпута, что твой спринт не обрабатывается, если перед этим не нажали что-то из WASD.
I love your videos, but as a beginner its hard to follow when you skip showing how you made some things. For example:
How did you made the root bone node ?
Well, they are kinda not for beginners but for people who struggled with some problems firsthand, to then find the better solution. What you call root bone node I believe is an BoneAttachment3D that uses external skeleton and is attached to its root bone.
I should have probably watched your AnimationTrees video before commenting, but I don't get the point of handling transitions manually. Otherwise, great vid, and I love your approach to architecture.
AnimationTree video is more "general sense" arguments, but there is another good illustration in the end of the second episode. There I demonstrate, how using playable animations ruins determinism and should probably not used in the logic if can be avoided.
@@PointDown Odd because i remade a similar test and had no inconsistency issues whatsoever in function calling in the animation player. Saw no mention of it anywhere either, i mean surely someone else would have noticed? I wonder if this is really as bad as you make it seem...Could it depend on performance? Or perhaps it got fixed since then?
@@antoineberkani9747 It depends on a frequency of calls, I took 30 ms and I have inconsistencies almost every run, but if you take an interval of 50ms - one in 4 runs maybe, and the lower frequency you take the less notiseable it gets. Which is kinda cursed, imo. Imagine you took once a second interval and the mistake randomly appears once in like an hour. You most probably won't notice that untill production or mass test and then you'll get insane before you'll find out where from one broken game tick comes from, once a several hours... Now, I ask the same question again, will you create a game with a competitive vibe knowing your game internals are dependent on a random abstract millisecond the game decided to update animation?
@@antoineberkani9747 Even if they fixed it (I'll be able to check later this day), there is still a case two. Putting calls and signals issuing from animation tracks is something that seems a very neat idea and is supported by editor's interface. But it's such a bait, having your logic be invoked by signals from animation runs quickly turns your code into a sphagettified horror.
Dude, are you a Hunt Showdown player? I noticed the music, thought the game was opened, realized it was your video! :D
Nah, I just loved the music piece and didn't even knew where was it from :D. Thanks for direction tho. I doubt I'd find time for gaming, but now I'm obliged to check the full ost in search of potential good ambience pieces for future videos / for dnd dming.
0:49
Im sure this tutorial is goated but it’s hard to pay attention to with all the random edits and respectfully your accent it’s just a lot going on wish it was more to the point when talking about the topic of the video
Ajaja. Well, here's some perspective for you as from creator. Something really really odd happens with engagement. "Algorithm shmalgorith" - that's all bs, youtube promotes a video more if people spend more time looking into it, click on preview faster/more often and/or subscribe during the viewing process. So to create a successful vid you need as much of these metrics: banger thumbnail, longer average viewing time and some sub bait inside, preferably all of these.
And here's where devil sits: whomever I asked, in personal messaging, and in comments, and in real life acquaintances, and in polls, every single one of respondents tells me they like slower videos more. Ted talks, more metaphors, more examples, less cuts. Like literally everyone.
I was even baited to make a whole enemy series slow after some youtube polling, you can find that post in my community tab.
However, when it comes to actual videos, slow videos suck ass. People straight up don't watch them. They don't subscribe, they click away faster etc, so if a slow vid has a banger thumbnail it has a liiiittle bit of potential, but it's pretty much disabled from the start.
So, either, that's some democracy paradox, people are full of bullshit and don't know what they want for real. Ooor, there is a fundamental division between engaged audience and not, so the engaged minority answers polling and gives feedback, and wants slower vids, but a silent majority doesn't poll, doesn't give feedback, and doesn't watch slow videos.
For me with all the stats access the difference is mega-obvious. After the enemy series that I promised to make slow, I returned to dense vids, I made four of them, and they all are literally x2-x5 times better. The 35 min vid about skeleton modifiers is not slow, it's also fast and dense, it's just not 40min theme compressed into 15, it's 2h theme compressed into 35 min. And people watch them and want more.
I honestly, understand you, I pretty much hate the genre of educational video alltogether, I'm a text guide human being and I mourn the death of text guides genre with crocodile tears.
But since this is the platform I use and this is the audience I have, cuts and speed are going to stay(.
Considering accent, well, it will get better over the years somehow. For the latter videos I started to make subtitles and I plan to add them further, maybe they will help.
Yaru ya neeee
акцент больно слушать
обычный ирландский акцент чего ты придираешься
Почему уроки на английском, хотя твой родной язык русский.
Потому что мне кажется, что потенциальная аудитория больше, а также потому что процесс создания видео делает лучше еще и меня. Типично для не носителя, у меня хорошие reading и listening, но сносный writing и отвратильный speaking. А за месяц создания этих видео я наговорил больше, чем за несколько лет, это интересно и я чувствую, как это помогает мне.
@@PointDown I see your point
@@PointDownа ещё у тебя очень приятный voice❤
@@PointDown больше не только потенциальная аудитория, но и конкуренция. Но круто, что ты работаешь над собой 💪