[Godot Engine] Steering Behaviors collab with GDQuest

  Рет қаралды 15,079

Pigdev

Pigdev

Күн бұрын

Пікірлер: 50
@Gdquest
@Gdquest 7 жыл бұрын
*First!* Even _before_ the video was out :o To add a few notes on top of the video: steering behaviors work well for player-controlled vehicles in top-down games, beyond AI. For AI, if you want a companion that follows the player (i.e. companion), you can use the seek behavior. And you can even make it avoid obstacles with the avoidance behavior, but also steer along the path you get from the A* algorithm so it looks like your character is walking naturally through the world and not on a grid.
@MsKocagoz
@MsKocagoz 6 жыл бұрын
Hi GDquest, I cant move my tank to rotated direction, can you help me, I saw your steering car tutorial but it is based kinematic body, mine is area2d, so I cant implement to my code, your help will be highly appreciated.
@OBalduriano
@OBalduriano 5 жыл бұрын
Does "avoidance behavior" have any video explaining it? Or can you indicate?
@renanstn7659
@renanstn7659 5 жыл бұрын
If you are using Godot 3.1, here's the code with some adaptations i've made: const MAX_SPEED = 300 const MAX_FORCE = 0.02 export (int, "Seek", "Flee") var mode = 0 var velocity : Vector2 var target : Vector2 func _physics_process(delta): target = get_global_mouse_position() velocity = steer(target) move_and_slide(velocity) func steer(target : Vector2) -> Vector2: var helper= (target - get_position()).normalized() * MAX_SPEED var desired_velocity = Vector2(helper.x, helper.y) if mode == 1: # Flee desired_velocity = -desired_velocity var steer = desired_velocity - velocity var target_velocity = velocity + (steer * MAX_FORCE ) return target_velocity
@s.u.h.6548
@s.u.h.6548 4 жыл бұрын
Thank you.
@boerbol9422
@boerbol9422 2 жыл бұрын
thanks for posting, so we can all learn from this!!
@Seffron
@Seffron Жыл бұрын
Don’t suppose anyone has an idea of how to get this to work in Godot 4? 😩
@felixlipski3956
@felixlipski3956 4 жыл бұрын
this tutorial is a godsend if you want to treat your kinematic body as physical object and apply force to it. I used it to implement a grappling hook, a jetpack and gravity.
@pigdev
@pigdev 4 жыл бұрын
That's awesome that you found that kind of application for this technique. Congrats, looking forward to see the game released!
@adhidwipa6027
@adhidwipa6027 7 жыл бұрын
Interesting concept behind of moving naturally or I called it smart moving.
@urchinvalero6529
@urchinvalero6529 7 жыл бұрын
Amazing video, and much thanks! The background music in the video IS a good addition, but its high volume makes it too distracting.
@pigdev
@pigdev 7 жыл бұрын
Thanks! Yeah, I never find a good balance between music and voice volume :/ but I'll keep trying. Thanks for the feedback :D
@cesarfernandez2368
@cesarfernandez2368 5 жыл бұрын
Thanks bro!. this is a very useful and interesting video!
@ВікторГаврилюк-х2ч
@ВікторГаврилюк-х2ч 4 жыл бұрын
Question: we multiply velocity by delta to insure it doesn't depend on framerate. Don't we need to multiply steering by delta too, so that change in velocity remains stable too?
@wolliel
@wolliel 7 жыл бұрын
Thanks, this was interesting and easy to understand.
@jwerlley
@jwerlley 6 жыл бұрын
very nice Piggy!!
@OBalduriano
@OBalduriano 5 жыл бұрын
How to make an object chase the target, but turning around if you already have an ally in front, for example, a hero vs 3 creatures? They will clamp one after the other and need to turn around. How would you do that at Godot?
@pigdev
@pigdev 5 жыл бұрын
Check it out this : gamedevelopment.tutsplus.com/tutorials/understanding-steering-behaviors-queue--gamedev-14365
@froyorex4856
@froyorex4856 5 жыл бұрын
Can you update this please?
@Artfrost
@Artfrost 6 жыл бұрын
on godot 3.0 does not work
@RREDesigns
@RREDesigns 7 жыл бұрын
Would you show us how to create nodes from a script and make them stay permanently in the editor node tree? I tried all the methods suggested in the Q&A page, but it doesn't work.
@pigdev
@pigdev 7 жыл бұрын
RRE Designs Sure, I'll research it and will make a post to my blog or a simple video, deal?
@RREDesigns
@RREDesigns 7 жыл бұрын
That would be super cool. I must warn you that I looked everywhere and did a lot of attempts but no luck. I am working in the 3D editor, though I guess it should work just the same. Also, I am trying to make a little script to spray grass sprites on any mesh, but the MeshDataTool get_vertex_count() method returns the count of tris and not the count of vertices. If you can check into that as well I would appreciate it. I think it is a bug, but I have to be sure before reporting it. I can provide all the assets if you want. Saludos desde Argentina garoto! xD
@pigdev
@pigdev 7 жыл бұрын
RRE Designs well 3D is not my thing for now unfortunatelly, so I can't cover this yet :c
@RREDesigns
@RREDesigns 7 жыл бұрын
I see. Well, forget about the mesh then, but you can still try to add nodes in the 3D editor from a script, it should be the same I think. ;)
@r1c4rd00
@r1c4rd00 7 жыл бұрын
Muito legal. Parabéns! Vai sair uma versão PtBr?
@pigdev
@pigdev 7 жыл бұрын
Non :( no máximo eu vou adicionar legenda. Os vídeos agora só saem em EN :/
@r1c4rd00
@r1c4rd00 7 жыл бұрын
Tudo bem. A legenda já ajuda muito quem não tem o inglês afiado. Muito obrigado. Parabéns pelo trabalho.
@Roule_n_Scratche
@Roule_n_Scratche 2 жыл бұрын
Valeu pelo video
@pigdev
@pigdev 2 жыл бұрын
Obrigado por assistir! 😅💜
@faisalwachid4418
@faisalwachid4418 2 жыл бұрын
Do you have a link to learn math for game programming
@pigdev
@pigdev 2 жыл бұрын
For math...well is a general topic. But here's the one for steering. This site has other, e.g. vectors. gamedevelopment.tutsplus.com/categories/steering-behaviors
@PiggyPigginton
@PiggyPigginton 5 жыл бұрын
I like your channel
@snstarosciak
@snstarosciak 4 жыл бұрын
Hey there, I love the music in the beginning of your video haha would you happen to have a link to that so I can listen to it some more? :)
@pigdev
@pigdev 3 жыл бұрын
Yep, it's on the video's description: incompetech.com/music/royalty-... Artist: incompetech.com/
@rishianands8472
@rishianands8472 5 жыл бұрын
Hai Pigdev ,, can you please make this in 3d where the enemy (kinmaticBody) follows and collide with the player(kinematicBody)
@me2beats313
@me2beats313 5 жыл бұрын
Subsribed
@xlxs1
@xlxs1 5 жыл бұрын
Twitter link in video description is incorrect
@pigdev
@pigdev 5 жыл бұрын
Ohh thanks for the headsup!
@Marvin-t3e
@Marvin-t3e 5 жыл бұрын
I'm sorry but you couldn't break it down enough so a beginner can understand it (since we are coming from a beginners tutorial) this seems like rather advanced stuff to implement. It would have been cool if you could have drawn pictures for better understanding while writing the code and reiterate it after, so we could have something to look at for better understanding. Maybe next time :) teaching something is pretty hard after all, since you have to completely understand it in order to break it down enough for everyone to understand. Cheers!
@sierz.stradtord7883
@sierz.stradtord7883 4 жыл бұрын
I would like to see what each of these lines do, well I know that you can infer what the normalize function does etc. but a more indepth breakdown with running the code and seeing the results after adding each line would be really helpful.
@mauricioyaman570
@mauricioyaman570 7 жыл бұрын
I folow you my frien, i`m Lack of Love
@Draxacon
@Draxacon 7 жыл бұрын
your tutorial was great! keep making more, i will definitely be using this behavior. I am trying to adapt this system to a player movement script, and, I've been having a few issues. I am trying to use it for super smooth movement, giving it a turn-rate. If anyone has any ideas, that'd be great! pastebin.com/8Y6TMvtQ I cant figure out how to get it to stop, once the key(s) are released, so it goes on forever, and only moves diagonally, because target_direction's values don't return to 0. I tried something like this, but that didn't seem to work. I think its because the Transition Vector doesn't stop following the target_directions value if Input.is_action_just_released("move_up"): direction.y = 0 elif Input.is_action_just_released("move_down"): direction.y = 0 Thank you
@pigdev
@pigdev 7 жыл бұрын
Draxacon I think we can solve this with the arrival behavior, sorry for the delay, it is supposed to be recorded and published at the first week of July
@Draxacon
@Draxacon 7 жыл бұрын
ok, thank you so much! ill be sure to check that out!
@pigdev
@pigdev 6 жыл бұрын
6:03 this is not a state machine, NOOB!
@balaportejean7015
@balaportejean7015 5 жыл бұрын
thx bro Jesus loves you Believe in him and repent
@pigdev
@pigdev 5 жыл бұрын
Amen, brother. Jesus loves you too. Thanks for the kindness.
[Godot Engine] Managing Complexity
7:19
Pigdev
Рет қаралды 13 М.
Just Boids | Useless Game Dev
12:10
Useless Game Dev
Рет қаралды 64 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 45 МЛН
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 5 МЛН
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,2 МЛН
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 732 М.
Advance Enemy AI in Godot
8:17
Jackie Codes
Рет қаралды 30 М.
AI Steering Behaviors In Godot : The Basics
6:55
ASamBlur
Рет қаралды 644
6 Tips to Better Organize your Godot Projects
11:39
GDQuest
Рет қаралды 136 М.
The Trick I Used to Make Combat Fun! | Devlog
8:12
Game Endeavor
Рет қаралды 1,7 МЛН
Godot Recipes: Car Steering
20:55
KidsCanCode
Рет қаралды 49 М.
Godot Scripts I add to Every Game
12:34
Aarimous
Рет қаралды 47 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 45 МЛН