No video

Advanced Enemy Pathfinding in Godot! ● Part 1

  Рет қаралды 17,192

Queble

Queble

Күн бұрын

Hey guys!
Here's the more advanced pathfinding tutorial as promised!
The video did get longer than expected, so I'll probably end up doing a part 2 in order to expand on more related mechanics.
If you have any suggestions for tutorials or other game development concepts you'd like me to cover, feel free to lmk in the comments! :)
Join our discord! : / discord
Thanks for watching!
-----------------------------
If you'd like to support my work, you can follow me on Social Media or buy me a coffee! :)
www.buymeacoff...
Instagram: @queble_game_dev
Twitter: @Queble__Games
KZbin: ... :O
-----------------------------

Пікірлер: 39
@queblegamedevelopment4143
@queblegamedevelopment4143 Жыл бұрын
NOTICE: Some parts of this tutorial might not work as expected due to the release of Godot 4.1. You can find more about this on the documentation :) docs.godotengine.org/en/stable/tutorials/navigation/index.html
@jSnakeChips
@jSnakeChips Жыл бұрын
I was just about to comment that for some reason it isn't working now. I looked through to documentation but can't seem to see what is different. I literally chose the wrong time to finally do this tutorial lol.
@Musicalcode313
@Musicalcode313 Жыл бұрын
@@jSnakeChips i have been stuck on this subject too i feel like there are no video resources explaining this for 4.1
@andreischapov4474
@andreischapov4474 10 ай бұрын
I dunno, everything does work as it should for me in 4.1
@errantalgae
@errantalgae 9 ай бұрын
reading that documentation causes me physical pain, it has to be the least useful documentation I have read for a programming language and my code no work
@Korn1holio
@Korn1holio 9 ай бұрын
@@errantalgae what's causing you problem exactly? I generally found Godot docs to be quite good.
@lagking1
@lagking1 4 ай бұрын
KZbin search feature is so bad that even though i am subscribed to your channel and searching with exact words pathfinding enemy etc it did not show me that you have already made a video on this topic and such an advance toturial as well exactly what i was looking for KZbin algorithm is so bad you deserve more subscriber thank god i was looking at your channel today for relevent or similar video otherwise i would have wasted another day . Your channel cover so many advance topics that no one else in the community does thank you so much
@RhogerAnacleto
@RhogerAnacleto 9 ай бұрын
This is one of the best Godot tutorials I've seen since I started to learn. Concise and clear. Good work!
@amonra8764
@amonra8764 8 ай бұрын
Thanks man, this is one of the best video of the that theme.
@StickssStones
@StickssStones 10 ай бұрын
Great tutorial. At the end I had to change "@export var nav_agent: NavigationAgent2D" in enemy to "@onready var nav_agent = $Navigation/NavigationAgent2D" since the NavAgent2D was being used as a single resource shared between enemies.
@andreischapov4474
@andreischapov4474 10 ай бұрын
nice catch! I did as well instinctively, and it's good to know I did the right thing))
@ToddsDiscGolf
@ToddsDiscGolf Жыл бұрын
Yesss! Thank you so much for this video!!
@timberjustinlake
@timberjustinlake Жыл бұрын
Concise and well presented. Great job. Keep the content coming!
@MH-lr6ue
@MH-lr6ue 5 ай бұрын
I’m excited to do this later. Surprised at how small the video length is. 18mins translates to 36mins to 1hour for me lol
@Komradenter
@Komradenter 3 ай бұрын
This is great, thank you!
@erikje0821
@erikje0821 3 ай бұрын
line 19 and 22 complains about not beeing able to call non static functions on the class navigationagent2d. im on version 4.2.2. Do you have any fix? edit: i had used = instead of : when declaring vaiable "nav_agent"
@JuddGledhill
@JuddGledhill 3 ай бұрын
I have a similar system for the nav, but am struggling with avoidance, I basically want the enemies to stay off the walls and not slide along them so much. It is a TD hobby project, and I have enemies just lining up whenever there is a corner. Is there a way to "spread them out" when you are letting them navigate?
@highscore99999
@highscore99999 Жыл бұрын
YES!! I love the player!
@highscore99999
@highscore99999 Жыл бұрын
Just, hate my game.
@Ritm2
@Ritm2 10 ай бұрын
Great content!
@barrelofbugs
@barrelofbugs 8 ай бұрын
Thanks!
@virtual__
@virtual__ Жыл бұрын
Nice video. Do you have anything on avoiding getting stuck on tilemap edges and corners?
@queblegamedevelopment4143
@queblegamedevelopment4143 Жыл бұрын
Other than what's shown in this series so far, not yet :/ You could always try making an auto tile for the navigation tiles, and then adding an open margin around the edge. This way you could negate any nav calculations near walls
@Dandadan532
@Dandadan532 Жыл бұрын
In the property path_postprocessing, set "Corridorfunnel" to "Edgecentered." It's not a perfect solution but it worked for me :-]
@TheIntelG
@TheIntelG 5 ай бұрын
Dunno if still relevant but for me this worked: 1. Remove the ACCELERATION & FRICTION completely along with the apply_friction & apply_movement 2. Set the func move(): as below: func move(): axis = get_input_axis() velocity = axis * SPEED move_and_slide() So in the end my player control is basically this & it also made the controls feel less being on ice: extends CharacterBody2D @export var SPEED = 600.0 # How fast the player will move (px/s) @onready var axis = Vector2.ZERO func _physics_process(delta): move() func get_input_axis(): axis = Input.get_vector("move_left", "move_right", "move_up", "move_down") axis.x = int(Input.is_action_pressed("move_right")) - int(Input.is_action_pressed("move_left")) axis.y = int(Input.is_action_pressed("move_down")) - int(Input.is_action_pressed("move_up")) return axis.normalized() func move(): axis = get_input_axis() velocity = axis * SPEED move_and_slide()
@jeyko666
@jeyko666 Жыл бұрын
Thanks great tuts
@sharifdarjenkyleabdulhamid8322
@sharifdarjenkyleabdulhamid8322 9 ай бұрын
Thank you my problem is fixed♥️subs
@Everythingzof
@Everythingzof Жыл бұрын
It works fine with 2 enemies, but when you have 4 or more, then they get stuck on one another. So you are in a situation where 2 enemies are attacking you and 5 are stuck behind them and don't know how to path around each other. How would you solve this?
@queblegamedevelopment4143
@queblegamedevelopment4143 Жыл бұрын
Thanks for pointing this out! I'll work on fixing this and make a part 2
@gassarro
@gassarro Жыл бұрын
maybe if we put enemies on a layer and then add that layer for navigation?
@AdamsAGD
@AdamsAGD Жыл бұрын
my enemes walk through trees which have physics layers. my tress are on "tree" layer of terrain and my grass is on "grass" layer. my grass has a navigation layer, but when i add trees, they dont remove the navigation layer. do i have to manually place non navigational grass under my tree?? or is there any other way around this.
@akitaropiquet7580
@akitaropiquet7580 9 ай бұрын
have you tried changing collision layers & masks for your trees & enemies?
@aleksanderkap3792
@aleksanderkap3792 6 ай бұрын
Did u found solution to this? I am wondering how it works with different layers of tilemap
@AdamsAGD
@AdamsAGD 6 ай бұрын
@@aleksanderkap3792 i sadly moved on from that project, pixel art was way too time consuming and i moved onto 3d. made a human model in less than a day, took me almost 4 hours to make one walking animation for my 2d characters :( i dont code anymore either until i have a minimum amount of art assets to work with for my game. but i do remember i found a solution, but with everything you fix, some else seems to break, it wasnt working perfectly the way i wanted but it was decent.
Custom Sorter Tutorial in Godot!
8:53
Queble
Рет қаралды 3,8 М.
Advance Enemy AI in Godot
8:17
Jackie Codes
Рет қаралды 26 М.
Whoa
01:00
Justin Flom
Рет қаралды 54 МЛН
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 6 МЛН
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 40 МЛН
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 16 МЛН
How Games Make VFX (Demonstrated in Godot 4)
5:46
PlayWithFurcifer
Рет қаралды 340 М.
Simplified 2D Grid PATHFINDING in Godot 4.2
16:29
Cashew OldDew
Рет қаралды 12 М.
How to use Classes in Godot! - Intermediate Tutorial
8:46
Using Composition to Make More Scalable Games in Godot
10:13
Firebelley Games
Рет қаралды 224 М.
Do THIS Before You Publish Your Godot Game
3:33
StayAtHomeDev
Рет қаралды 167 М.
The Trick I Used to Make Combat Fun! | Devlog
8:12
Game Endeavor
Рет қаралды 1,6 МЛН
How to use Curves in Godot 4!
3:36
Queble
Рет қаралды 5 М.
Whoa
01:00
Justin Flom
Рет қаралды 54 МЛН