Make Video Games 2018 ►
In this video I we learn how to create path finding AI that can find the player. If you have any questions then be sure to leave a comment or contact me on twitter; realtutsgml. If you learned something then be sure to leave a like, comment, and favorite.
I’m the founder of codingmadesimple.com that hosts high quality, fun to learn and straight to the point course material for game developers. I’d really appreciate it if you’d check out my content.
Twitter ►
Google+ ►
Patreon ►
Have fun learning!
Nguồn: https://rantbit.com
Xem thêm bài viết khác: https://rantbit.com/game/
thanksalot
This is good. However.
To those looking for a more in depth ( and memory leak free ) AI pathfinding tutorial,
A better video would be: https://www.youtube.com/watch?v=LUw78Tk70bM ( Still applicable to GMS2 )
Enemies moving through the walls diagonally is my big problem right now
Yea I like how the enemies slightly go through walls. Looks like shit.
This is AI? are you Kidding?
why is it not working i did everything exactly the enemy goes through the walls
nice one small video and all what i wont
Do you have a tutorial for advanced path finding in physic rooms?
I know this is a pretty old video, but anyway… 🙂 Is there a way to avoid red squares overlapping the corners as they turn? I mean in Gamemaker Studio 1x
how would i make the enemies avoid eachother instead of walking through eachother. if i do the add instance thingy for the enemy the wont move at all.
Wow, this is really cool and simple. I remember writing my own pathfinding algorithm in Flash, it worked but it was a lot of coding. This is much easier. Thanks!
Awesome worked first time with GM2.
Thank you for the tutorial, it worked very well!
I wanted to point out that this only works if the objects doing the pathfinding are the same size or smaller than the grid cells. If your object is larger, it will partially ignore collision detection. For example, if those spr_enemy were 32×48 pixels, they would go through the wall by 16 pixels. I haven't figured out a way to account for it just yet.
I wanted to like the video but it currently has 666 likes and that's awesome, so… I'm putting a comment instead.
Your video really saved my life, thank you for keeping it simple and clear !
Perfect tutorial with clear instructions ! Everything worked, however, is there a way to force my obj_enemy to actually avoid obj_wall ?
This video is so good/useful. Thank you.
Omg thank you <3
Hi, I have a problem, my game runs very slow (some memory issue) after I try out this code (in a test (room is 1980 width and 1080 heith it runs fine ) but in my game room (about 50000 width and 20000 height the game is very slow, is it better to change the step event to a create event ?
My enemy will move towards the player, but will stop when it hits my object obj_wall and not attempt to maneuver around it. Just so you know I am making a top down zombie shooter and my obstacles use obj_wall as its parent, does anyone know what the issue is with my enemy?
And how can I make so the monsters don't overlap?
Spacebar, pls.
Awesome!!! Thank you so much!
I need help! I made an enemy that shoots bullets (when the player is within a certain distance) that hurts the player. The problem is if I'm below the enemy he still shoots cause Im just using the "distance_to_object" script. I want it so if the enemy can see(not through walls) me and im a certain distance from him he will shoot. So this guy on another video said make a line in the direction the enemy is looking that keeps going in that direction untill it hits a wall or the player. If it hits the player and the player is within a certain distance then shoot. I have no idea how to make this line thing. Plz help
Nice, but how do we prevent that object overlapping over the walls??
this doesnt work i followed it
i have like a game with grid movement so how do i make them with a grid
the video length, 4:20 eh?
HEHE
There you have your 10 likes xD
Beautiful, you got a new sub and a like!