Sign in to follow this  

Pathfinding in a 3D RTS or MOBA

This topic is 1264 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Edited by Alundra

Share this post


Link to post
Share on other sites

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.

Edited by snacktime

Share this post


Link to post
Share on other sites
Sign in to follow this