Pathfinding in a 3D RTS or MOBA

Started by
0 comments, last by snacktime 9 years, 9 months ago

Hi all,

Pathfinding can be done using Recast/Detour library, who works well, but is it better to do the path finding in 2D and not using this lib ?

Since the RTS/MOBA style is always camera top down, is it better to do a ray-plane test, then convert this coord in 2D coord and search the path ?

This coord is used as target and the actual position of the player as start.

Once all point is computed it's only a question of move the player on each target point until the last point is achieved.

Thanks for the help

Advertisement

raycasting can't give you paths for things it can't see, so it's really limited to being useful for local avoidance. You are going to need a combination of pathfinding and steering to make a moba/rts game.

There are actually surprisingly few good open source pathfinding libraries, and TONS of crap written by people learning how to write pathfinding code. My suggestion would be to just go with recastnavigation. It's pathfinding is great. The only part that's a bit dated is the crowd stuff. It works but it's cpu intensive. You can use it for a moba game, but for an RTS game with a lot of objects, it won't work as it just uses too much cpu.

My preference would actually be to just use an engine like Unity or UDK that already has what you need built in. Even though their pathfinding is loosely based on recast, they provide crowd implementations that are far more performant and can handle much larger crowds.

This topic is closed to new replies.

Advertisement