Video Thumbnail

Sign up for a plan to instantly unlock all premium lessons.

UNLOCK LESSON

Premium Features

Download Video

Pathfinding

Published 2 years ago

Pathfinding is the process of moving an object from point A to point B. There are a couple pathfinding algorithms we could use to move objects, but the easiest and most efficient one (which we'll be using) consists of waypoints—ordered points strewn throughout our map in which our enemies will travel to.

We'll learn how to draw these waypoints using Tiled, how to import them into our game, then write the necessary code to get enemies moving to each point.

  • 0:00 Pathfinding methods

  • 2:50 Create waypoints in Tiled

  • 6:06 Export and import waypoint data into code

  • 9:32 Create an enemy

  • 16:13 Create enemy class

  • 21:31 Go to first waypoint

  • 28:28 Proceed to next waypoint

  • 33:39 Center enemy

  • 36:34 Create multiple enemies with loop

Comments

Want to participate?

Create a free Chris Courses account to begin

Login

No comments yet, be the first to add one

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.