Anyone Wrapped Recast and Detour?

BlitzMax Forums/BlitzMax Programming/Anyone Wrapped Recast and Detour?

Gabriel(Posted 2009) [#1]
Just wondered if anyone had wrapped Recast and Detour before I contemplate doing it myself. It seems fairly small, and well written from a brief look.

http://code.google.com/p/recastnavigation/ (Because I know someone will ask if I don't volunteer)


plash(Posted 2009) [#2]
I've not noticed any wrappers for this, but it certainly looks interesting.


Gabriel(Posted 2009) [#3]
Yeah, it does look interesting and the author works/worked as an AI programmer for Crytek so I would imagine his code is pretty robust.


JoshK(Posted 2009) [#4]
One of our programmers is using this with our engine in C++:
http://www.youtube.com/watch?v=6EX3e8Q_GV0

I am interested in a BlitzMax module for this as well.


Chris(Posted 2009) [#5]
Hi,

I've used this library with Leadwerks and it works very well and is very fast. It's the sort of quality you'd expect in a tripple AAA title game but it's free!

I was using Blitzmax with LW and tried to get this working/called from Blitz but due to my limited experience/skills I failed. I'm sure someone here must have the skills to get it up and running. I found I could get it all working easy in C++ so moved my project over as LW works great with C++ as well.

I'll try and post as much help on this forum as I can.


Chris(Posted 2009) [#6]
Here is one attempt:-


Import "recastnavigation/sdl/include/*.h"

Import "recastnavigation/RecastDemo/include/*.h"
Import "recastnavigation/RecastDemo/contrib/*.h"
Import "recastnavigation/Detour/include/*.h"

'Recast part
Import "recastnavigation/recast/include/*.h"
Import "recastnavigation/recast/source/Recast.cpp"
Import "recastnavigation/recast/source/RecastContour.cpp"
Import "recastnavigation/recast/source/RecastDebugDraw.cpp"
Import "recastnavigation/recast/source/RecastFilter.cpp"
Import "recastnavigation/recast/source/RecastLog.cpp"
Import "recastnavigation/recast/source/RecastMesh.cpp"
Import "recastnavigation/recast/source/RecastMeshDetail.cpp"
Import "recastnavigation/recast/source/RecastRasterization.cpp"
Import "recastnavigation/recast/source/RecastRegion.cpp"
Import "recastnavigation/recast/source/RecastTimer.cpp"


Import "recastnavigation\sdl\lib\SDL.lib"

'Detour
Import "recastnavigation\Detour\source\DetourCommon.cpp"
Import "recastnavigation\Detour\source\DetourDebugDraw.cpp"
Import "recastnavigation\Detour\source\DetourNode.cpp"
Import "recastnavigation\Detour\source\DetourStatnavMesh.cpp"
Import "recastnavigation\Detour\source\DetourStatNavMeshBuilder.cpp"
Import "recastnavigation\Detour\source\DetourTileNavMeshBuilder.cpp"
Import "recastnavigation\Detour\source\DetourTileNavMesh.cpp"


Import "recastnavigation/RecastDemo/source/ChunkyTriMesh.cpp"
Import "recastnavigation/RecastDemo/source/MeshLoaderObj.cpp"
Import "recastnavigation/RecastDemo/source/Sample.cpp"
Import "recastnavigation/RecastDemo/source/Sample_StatMesh.cpp"
Import "recastnavigation/RecastDemo/source/Sample_StatMeshSimple.cpp"
Import "recastnavigation/RecastDemo/source/Sample_StatMeshTiled.cpp"
Import "recastnavigation/RecastDemo/source/Sample_TileMesh.cpp"
Import "recastnavigation/RecastDemo/source/imgui.cpp"
Import "recastnavigation/RecastDemo/source/imguiRenderGL.cpp"
Import "recastnavigation/RecastDemo/source/main.cpp"
'Import "recastnavigation/RecastDemo/source/SDLMain.cpp"

Extern
	Function callMain()
End Extern

callMain()




You may have to make some small/easy changes to the C code to get it to compile with the miniGW compiler.


Chris(Posted 2009) [#7]
I've post stuff on my blog about this.

See

http://leadwerks.com/werkspace/index.php?/blog/19/entry-54-further-work-on-path-finding/