Pathfinding #2 - Better one liner [Game Maker Studio 2 | Basics]

Pathfinding #2 - Better one liner [Game Maker Studio 2 | Basics]

Channel:
Subscribers:
9,770
Published on ● Video Link: https://www.youtube.com/watch?v=UZhLV13HAno



Category:
Tutorial
Duration: 7:31
6,968 views
201


This basics video tutorial shows you how to create a very simple "follow" a target Ai/pathfinding in one line of code for GameMaker Studio 2.

These potential functions you can find under motion planning in the GameMaker manual. By using mp_potential_step, mp_potential_step_object, mp_potential_path or mp_potential_path_object in the step event of the instance in question it tries to get to the target point assigned plus avoid solid instances/the instance to check. And that is pretty much it.

This method is very easy and powerful in levels that have no difficult terrain like rocks or tree where the potential function is good enough to guide the enemy instance around it. Mazes or more complex level structures will be a challenge to impossible to guide through.

In part Pathfinding #3 we will discuss a more versatile function the, mp_potential_step which can be used to avoid collision and actually go around instances blocking the path. This is of course a bit limited if you have maze like structures which require a bit more complex approaches. This will be solved in Pathfinding #3.

// previous video:
https://youtu.be/RmOqnp5d33Q

// General video on paths in GameMaker:
https://youtu.be/2xpqQ9rqFLI

πŸ‘‘ Support me and get fresh game art and game maker projects every month:
https://www.patreon.com/1upindie

Follow me on:
πŸ“Έ Instangram: https://www.instagram.com/1upindie
🐦 Twitter: https://twitter.com/1upIndie
πŸ’¬ Discord: https://discord.gg/gvr98nb
πŸ“œ Udemy: https://www.udemy.com/course/become-a-video-game-developer-with-gms-23/ (See youtube about page for discount)

0:00 Introduction to the pathfinding series part 2
1:20 Subscribe
1:33 Recap and concept of potential motion planning explained
3:17 mp potential settings roughly explained
4:10 Bonus content - using a path with mp_potentail_path/mp_potential_path_object







Tags:
game maker pathfinding
game maker 2 pathfinding
gamemaker studio 2 ai pathfinding
game maker motion planning
gamemaker studio motion planning
mp potential step
mp potential step object
gamemaker easy pathfinding
game maker studio mp_potential step
mp potential step gml
mp_potential_step object gml
mp potential settings
mp_potential_settings
mp potential tutorial
gameamker potential tutorial