Pathfinding #1 - Một đường thẳng [Game Maker Studio 2 | Cơ bản]

Tác giả: 1up Indie
Ngày xuất bản: 2021-08-28T00:00:00
Length: 08:55

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 linear functions you can find under motion planning in the GameMaker manual. By using mp_linear_step, mp_linear_step_object, mp_linear_path or mp_linear_path_object in the step event the instance in question tries to get to the target point assigned. And that is pretty much it. If a direct path isn't possible (because some instances are flagged as solid and you set checkall as true) it will get stuck if it collides.

In part Pathfinding #2 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.

// 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

1:00 Subscribe

1:16 Concept of motion planning explained

3:32 Using the mp linear functions for homing

6:37 Bonus content - using a path with mp_linear_path/mp_linear_path_object

8:25 Game shown: Narita Boy

Dịch Vào Lúc: 2025-03-02T04:03:06Z

Yêu cầu dịch (Một bản dịch khoảng 5 phút)

Phiên bản 3 (ổn định)

Tối ưu hóa cho một người nói. Phù hợp cho video chia sẻ kiến thức hoặc giảng dạy.

Video Đề Xuất