High Definition Standard Definition Theater
Video id : oocsP4hLl7E
ImmersiveAmbientModecolor: #31a2c0 (color 2)
Video Format : (720p) openh264 ( https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz
Audio Format: 140 ( High )
PokeEncryptID: a23a62ab31e599f0383afb40137687da625fb767bbe31e3950d45d3bb834351f1be4f4e7b6d5bde8a0483d5167c73671
Proxy : cal1.iv.ggtyler.dev - refresh the page to change the proxy location
Date : 1733739745079 - unknown on Apple WebKit
Mystery text : b29jc1A0aExsN0UgaSAgbG92ICB1IGNhbDEuaXYuZ2d0eWxlci5kZXY=
143 : true
Trying to Plan Enemy AI in Godot
 60 FPS video
9,251 Views • Oct 2, 2023 • Click to toggle off description
I'm not a game dev, I've never used a game engine before, but there's a first time for everything. I've been having a blast using Godot, so let's see what we can do with it. For this one, I tried my hand at figuring out how to make the enemy AI better in my game. Join me as I continue my journey trying to learn how to make a game.

You can watch the full video here:
   • Non Game Dev Tries To Make Enemy AI  
Metadata And Engagement

Views : 9,251
Genre: Entertainment
License: Standard YouTube License
Uploaded At Oct 2, 2023 ^^


warning: returnyoutubedislikes may not be accurate, this is just an estiment ehe :3
Rating : 4.953 (9/763 LTDR)

98.83% of the users lieked the video!!
1.17% of the users dislieked the video!!
User score: 98.25- Masterpiece Video

RYD date created : 2024-11-17T16:15:58.791787Z
See in json
Connections
Nyo connections found on the description ;_; report an issue lol

36 Comments

Top Comments of this video!! :3

@purplefood1

1 year ago

GJ you officially made better AI than call fo duty zombies

57 |

@kevin_eleven

1 year ago

Another thing u could add is to add a collision box to the enemy so that they can collide with each other
Hope this helps!

29 |

@Vensauno

9 months ago

You can try that at a certain distance away, the enemy will chase another enemy, it may help. I hope it will add randomness..... And they probably won converge after they leave the area

6 |

@Morrisistherealgod

11 months ago

I did not know you could do it like that!

1 |

@kilokoins1336

2 months ago

That's a really good idea, thank you i'm gonna try it!!

|

@NoahTaylor-r5h

2 weeks ago

For anyone wondering how you would actually do this if you are reading this way later, Godot 4.x has built in functions that deal with this type of thing and you'll use a Navigation2D node and the move_and_slide() function. Using these two in conjunction means you really don't have to program your own AI.

func MoveToTarget(delta: float) -> void:
$NavigationAgent2D.target_position = Target.global_position
var direction = $NavigationAgent2D.get_next_path_position() - global_position
direction = direction.normalized()
velocity = velocity.lerp(direction * Speed, Acceleration * delta)
if velocity.x != 0:
$AnimatedSprite2D.flip_h = velocity.x < 0
$AnimatedSprite2D.play("move")
move_and_slide()

Itll end up looking something like this.

1 |

@JackRipper01

1 month ago

excellent idea :0

|

@MonolithproductionsT

2 months ago

I went down a trig rabbit hole and had the AI follow an interception path so they try to overtake you

|

@zenco7936

5 months ago

I just did this wtf 😂 ❤ subbed. That's crazy, where were you yesterday?

|

@thinktanium9789

1 week ago

oh snap- is the navigation2d agent a new node? i just got into godot

|

@braveblade87

4 months ago

I'm new to Godot, but why not just add another collisionshape2D to the enemy, make it slightly bigger and make it only collide to other enemies and not the player?

1 |

@trongthangg1494

7 months ago

You can try to play Asgard's Fall: Origins and see how there enemies collide, I mean if you can do something similar like it, it would be awesome

|

@samsonAsamuel

1 year ago

How did you make the randomness???

1 |

@NicoFye

1 year ago

I'm making a similar game, and I want to figure out AI too. I want enemies to be ships also

|

@EpicChurno

1 year ago

Enemy AI SUCKS

|

Go To Top