Leafy Games masterfully demonstrates how traditional A* logic can be evolved through surface-aware raycasting to create truly organic, non-humanoid navigation. It is a sophisticated masterclass in translating complex spatial geometry into fluid predatory behavior.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Idols of Ash - How we taught it to huntAdded:
This is a video about how we created the centipede in Idols of Ash. More specifically about how we developed its pathfinding system that allows it to navigate a large, complex 3D environment.
We like our centipede monster to find an efficient path from where it currently is to its target, often the player.
A path is a series of connected nodes that it can easily follow to reach its destination. They should be relatively close to each other and nothing should be in between them.
It doesn't need to be the most efficient, but it also shouldn't waste time with really long routes when they're not required.
Before our next example, there's one topic to cover to understand the next steps in our journey, the raycast.
Each raycast starts at an origin point [music] and faces a direction of our choosing.
We can then ask the physics system what, if anything, intersects this line. And if so, exactly where that intersection occurs.
This is the core tool we'll use to find information about the world.
In this example, our pathfinder is making steps and checking that there's nothing in its way. The yellow arrows you see are the rays it's casting.
Looks like it's hit an obstacle and therefore can no longer move toward its goal.
It only knows about the side facing it and therefore it just doesn't have enough information to get over the obstacle.
Rather than a single raycast from where we are to where we'd like to be, we use a hook or a series of raycasts [music] that can provide much more useful information.
Now you can see that it's able to use its hook to find a position on top of the obstacle and due to the shape of the hook, it can also find a way down, too.
So, that's working pretty well.
Let's try making the obstacle taller and see what happens.
Although this hook is pretty good at overcoming small obstacles, it's not nearly flexible enough for our purposes.
In this case, it's unable to reach the goal as its final ray can't reach any surface for it to continue making its path towards the goal. So, it's stuck here.
Next, we're going to try to improve the shape of the hook since we'd like it to reach around and end towards us so it doesn't get stuck when we reach a ledge.
You'll see it still fails to get over the obstacles, so did this really help at all?
You'll see. Its capability will be much higher when combined with our next step using normals.
So, what is a normal?
A normal is a direction.
Specifically, it's the direction perpendicular to a point on a surface.
Luckily, this can be easily found using the ray cast we're already doing.
So, from now on we'll show the normal for each node with a small arrow.
By combining our more angular hook and using the normal of the last node we've reached, it can now get over the obstacle and reach the goal.
So, what other challenges will our centipede need to overcome?
Well, the goal is for it to be able to use any surface, so let's test it by placing the goal underneath the floor.
In this example, we can clearly see how using the normals of the last node will assist it in navigating ledges and even going upside down.
So, we're done?
Uh not quite. We've been using simple 2D examples so far, but even then there are many situations that this version could not solve.
In this example, we've set up a situation where the goal is to the right of the starting position, but it won't ever be able to reach it by going right. It actually needs to turn left away from the goal for a while to get to the right surface to [music] reach its goal.
It will endlessly keep trying to reach the goal, but may never reach it in this case.
So, how do we make our monster smart enough to reach the goal?
We'll combine our existing system of using raycast hooks with a pathfinding algorithm called A*.
So, the full details of how A* works is beyond the scope of this video, but we'll include some details on screen for those interested.
So, A* starts by kind of scanning the environment.
You can imagine it sends out copies of itself that send information back about where it can go.
Each time it finds a possible new node, it adds it to a sorted list.
It scores each node higher if they are close to the goal and lower as they get further from the starting position.
It repeats this process, picking the best node that hasn't yet been considered and adding any possible neighbors to the sorted list.
Eventually, the search should reach the goal and then it can construct a path there by following the node connections back toward the start.
Yay! A path has been found. And due to the A* algorithm, it should be fairly short and efficient, too.
You'll see how it kind of explores various areas and makes its way through the level. The lines, or the raycast hooks, and the green spheres are the nodes it's currently analyzing.
Then the path is shown as white spheres.
We think it looks pretty neat.
You may have noticed there's a lot of noise and chaos with the way the 3D version makes its way through the level.
And for us, this is really a feature, not a bug. It's something we were actively trying to design for, which we feel makes the creature feel a little bit more alive and unpredictable, which is exactly what we were going for.
So, here's some footage of an early version of the game that we wanted to show you.
It's kind of a fun fact about it in that we started to work on our enemy pathfinding before we knew the type of monster we even wanted to make.
When we saw the way the spheres were traveling across the walls, it made us think of a centipede and that actually led us to the monster design in the game today.
Well, we hope you found that interesting and we had a lot of fun making this game and making this video. Thanks so much for watching. Till next time. Bye.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 viewsβ’2026-05-28
How agent o11y differs from traditional o11y β Phil Hetzel, Braintrust
aiDotEngineer
450 viewsβ’2026-05-28
Re: π£οΈπthepropheduπ2026 GST 103 CLASS (E-EXAM REVISION)
theprophedu
636 viewsβ’2026-06-04
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanationπ―β
LearnwithSahera
1K viewsβ’2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 viewsβ’2026-05-29
Search Algorithms Explained in 60 Seconds! π€π¨
samarthtuliofficial
218 viewsβ’2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 viewsβ’2026-05-30
Instagram accounts got PWNed
EricParker
13K viewsβ’2026-06-03











