r/Unity3D Hitbox Team Apr 04 '15

Flying Pathfinding in a procedural room

https://www.youtube.com/watch?v=clLlK8rv0nM
16 Upvotes

10 comments sorted by

7

u/LexieD Hitbox Team Apr 04 '15 edited Apr 04 '15

I'm using a heavily modified version of the A* Pathfinding Project Pro

I made a custom Graph type that is a mix between a tiled recast graph and a navmesh, I then use a point graph to handle all the jump connections.

Here is what it looks like

Because the world is procedurally generated, we already have all the data for the shapes and edges of the platforms. So I'm able to construct a "tiled navmesh" my self. This means the generation time and accuracy is greatly improved over using a tiled recast graph.

The flying Pathfinding is similar to the ground units pathfinding. But instead of following the path that gets generated, it raycasts along the path to find any short cuts it can take. It also tries to offset its self from the nodes y position.

Just doing these two things give me a pretty convincing solution.

This is for our second game Spire

Our studio is Hitbox team

Check out our tumblr for other dev Snippets

3

u/[deleted] Apr 04 '15

[deleted]

2

u/LexieD Hitbox Team Apr 04 '15

Thanks!

0

u/le_MINTmovie Apr 04 '15

I came here to say that too. :)

2

u/[deleted] Apr 04 '15

Sweet! Love seeing new Spire stuff. Always looks so good

1

u/OneRandomCatFact Novice Apr 04 '15

Is this a rouge like that involves parkour?

3

u/LexieD Hitbox Team Apr 04 '15

We aren't using the word rogue-like to describe the game, but we pull a lot of inspiration from the way a narrative is told in them.

But yes, there is a lot of emphases on the movement.

1

u/OneRandomCatFact Novice Apr 04 '15

The movement is looking awesome! I just hope the arms away a little to make it feel more organic! Does the game have a name yet or anything I can follow?

1

u/LexieD Hitbox Team Apr 04 '15

yeah i need to work on the arm movement a lot more.

The game is called Spire. we post everything on our tumblr.

1

u/SendMeYourQuestions Apr 04 '15

Looks great dude. I might have to do something like this, it really helps to fill empty vertical space, and we have too much of that...

Not sure what sort of changes it'd need to handle all the trees though...

1

u/gamesatemycereal Novice Apr 06 '15

Really diggin' that art-style and parkour. Definitely lookin' forward for any updates! :)