Game Development Community

Walkabout Navigation Toolkit help thread

by Daniel Buckmaster · in General Add-On Discussion · 11/08/2012 (3:57 pm) · 223 replies

This is the official Walkabout help thread. If you need a hand installing or using Walkabout, please ask away! But before you do, I'd really appreciate if you could follow a couple of guidelines:

  • Re-read the installation instructions! Seriously, I know how often I run into some ridiculous issue, then realise I'd missed a step or misread a line. It helps me and you!
  • If you're reporting an error in compilation, please tell me the errors you get and what files they're in, if you can!
  • If you're reporting a bug, please provide steps I can take to reproduce it!
Feature requests, comments and any other feedback are welcome here as well! If you have questions you'd prefer to keep between you and me, feel free to contact me directly.

Known issues

  • Release 1 Patch 3: no navmeshes appear in the browser list in the nav editor. Fix
  • Engine version > 3.5.1: project generator scripts are incorrect. Fix. Also, be sure not to include the Recast module in your project configuration!
  • On platforms that are not Windows, you may need to replace FLT_MAX with F32_MAX. In fact this is probably a good idea in Windows as well.

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!

#201
06/09/2014 (5:53 pm)
That makes sense Danny. Congrats on post 200 in the Walkabout thread! This particular map's base Heightfield is only 2048x2048, although the squareSize is wildly scaled up to 20. In this case, I've generated the terrain in L3DT and created several opacity maps for the terrain layers. I'm not going for ultra detailed or anything (but I do manage to make it look fairly good :); the control scheme is a hybrid of isometric (diablo-ish), 3rd person, and RTS strategy. In any event, I wasn't aware of the tiling navmesh support. Perhaps I'll have a look at the documentation again.

I haven't found many ways to create a single really large terrain, so the square size of 20 has been the easiest way to create a huge scale across a map. Honestly, tweaking the texture sizes and so on, it looks pretty good and I can't see myself needing too fine of terrain geometry. In this case, though, I'd really like this single map to have as much space as possible.
#202
06/14/2014 (4:25 pm)
One option I'm looking into is to include the ability to use one massive, low-resolution navmesh and multiple smaller high-resolution navmeshes. The global mesh is used for long paths, and the smaller meshes for local pathfinding. You could set that up yourself theoretically but I'm going to put some effort into it this winter (southern hemisphere winter :P).
#203
06/16/2014 (2:25 pm)
Greets All:

I have my project ported over to OSX using Luis' OSX branch. Aside from some OpenGL shader issues that he and others are still working on I have most of it all working except recast/walkabout.

Main issue, there was no xCode project for librecast. I used

cMake to generate a librecast.xcode which works fine. When I add this new project to XCode, I'm getting errors I didn't get in MSVS:

struct CoverSearch
{
   Point3F loc;
   Point3F from;
   F32 dist;
   F32 best;
   CoverPoint *point;
   CoverSearch() : loc(0, 0, 0), from(0, 0, 0)
   {
      best = -FLT_MAX;//xCode error: use of undeclared identifier "FLT_MAX" did you mean 'F32_MAX'?
      point = NULL;
      dist = FLT_MAX;//xCode error: use of undeclared identifier "FLT_MAX" did you mean 'F32_MAX'?
   }
};

Not sure if it's my unfamiliarity with xCode or if there's a code issue there...
#204
06/16/2014 (3:32 pm)
Ah right, Andrew discovered this the other day and I forgot to add it as an issue. You need to #include <limits> I think, or use F32_MAX I guess. That's probably actually a better way to go. This isn't an issue in Windows for some reason.

As for not generating a project, I'm not sure why that wouldn't be the case in OSX, though I imagine the project generator has suffered in terms of OSX support over the years... CMake is probably the way to go on non-Windows platforms right now.
#205
06/18/2014 (6:31 am)
@Daniel:

I went back to R1P3, and added walkabout per the instructions. I still couldn't get the project generator to parse walkabout.inc so I included its contents in T3D.inc (the way AFX is) and the project generated correctly. Your fix from your post #203 got me past the FLT error, now I have a new one:

navMesh.h @ 265

/// Intermediate data for tile creation.
   struct TileData {
      ObjPolyList          geom;//XCODE error:Unknown Type Name 'ObjPolyList'
      rcHeightfield        *hf;
      rcCompactHeightfield *chf;
      rcContourSet         *cs;
      rcPolyMesh           *pm;
      rcPolyMeshDetail     *pmd;


Note that this compiled fine in MSVS2010. I've checked the related files and objpolylist is in the navMesh.h file like so:

#ifndef _NAVMESH_H_
#define _NAVMESH_H_

#include <queue>

#include "scene/sceneObject.h"
#include "collision/concretePolyList.h"
#include "collision/objPolyList.h"
#include "util/messaging/eventManager.h"

I've done all the needed mods, and my Win version tests correctly in-game. I suspect somehow I'm still missing something from project generation but can't see where...
#206
06/18/2014 (4:21 pm)
Update:

I merged Luis' updated project with mine, then added Walkabout R1P4, used the fix from above and now my walkabout project is framed in Mac chrome:

puu.sh/9zIkY
Gracias!!!
#207
08/28/2014 (3:55 am)
Great to hear, Gibby!
#208
10/12/2014 (4:47 pm)
I would like to thank you for all of this incredible work you've done! I have recently returned to Torque after a long absence to find it has gone MIT and had some substantial changes made to it since I last messed with it (TGE 1.5).

I found your blog post about walkabout going MIT and decided hell yeah I could use this! Again, thanks.

Now, the problems :(

So I am getting a ton of: "No NavMesh polygon near visit point (position) of NavPath 8750" console spam.

I must be misunderstanding the usage of the Mesh. I was under the impressing that path creation was dynamic and I need do nothing but create the mesh and save it, load and tell the AI, hey go to this position and it would create a path to it and go there. Doesn't seem to do that and nothing in the documentation I could see gets into the NavPath aspect. If I have to create paths manually then I may as well not use walkabout (seriously I am totally missing something important lol).

One other issue is projectiles somehow being affected by the mesh. If I fire a weapon the projectile moves to me and not away and I basically shoot myself :)



#209
10/12/2014 (4:55 pm)
Are you able to run the navtest demo level fine? Jump into the editor mode where you can spawn AIPlayers to run around and let me know if that works okay.

Your understanding is correct, that's exactly the process you should be able to go through. The AIPlayer::setPathDestination method should just work.

That projectile issue is odd - try changing this line to remove the StaticShapeObjectType (leaving only MarkerObjectType). I hadn't noticed it causing problems, but it might be relevant. EDIT: getting reports from another user that this isn't the problem. They can't verify though. I'll try to reproduce your issue this afternoon - though it might be related to why your pathfinding isn't working, so let's focus on that first!
#210
10/12/2014 (6:13 pm)
Wow fast response, thanks. I just noticed T3D 3.6.1 was released and going to start working on porting what little changes I have into that and move on, is the built in navigation in 3.6.1 on a par with Walkabout?

EDIT: Everything seems to be working now. The problem was stemming from some bad randomized positions being fed to the bots (64 bots running around). I ended up manually creating positions via a function I wrote, so I knew they were good and no problems. Again, thanks for the quick responses.
#211
12/09/2014 (4:31 pm)
I have 2 problems... probably rookie mistakes. (T3D 3.6.2)

1.) when I send an aiplayer to a position 2-outa-3 times it gets there and constantly goes around the point in a large circle.

2.) as you can see below - the mesh does not go through the doorway. I have tried different parameters with no success. On other doorways it works great (different size).

www2.arkansas.net/~morick/walkabout1.png
#212
12/09/2014 (4:45 pm)
For your first problem, have a look at this issue and the linked issue. See if making those changes solves your sprinting problems. As for the doorway, what happens if you reduce walkableRadius by a lot?
#213
12/09/2014 (7:30 pm)
p1.) (going around in circles - music please) change to code aiPlayer.cpp did not fix but setting "%player.allowSprinting(false);" in the aiplayer::spawnbot code did.

p2.) (Can't get there from here). I changed mWalkableRadius from 0.5f to 0.001f and changed actorRadius from 0.5 to 0.001 and there was no difference.
Could there be a problem because I have a office building inside a warehouse? The doorways on the warehouse are fine but the office is closed for business....
Is there some way to manually link the 2 meshes?
I updated the above image.
#214
12/10/2014 (1:54 am)
Yes, you can link them manually - click the second icon down in the bar on the left (the arcing arrow), click a location, then click again to create a one-way link between them (do the same again for the reverse direction). It's a temporary solution. I'm more concerned as to why the radius settings don't seem to have any effect.
#215
12/10/2014 (1:59 am)
cellhieght or actorhieght issue, perhaps?
#216
12/10/2014 (3:02 am)
Thanks... working now.
I put mWalkableRadius back to 0.5f.
I have:
cellsize = 0.2
cellHeight = 0.2
tilesize = 10
actorHeight = 0.2 <=
actorClimb = 0.3
actorRadius = 0.4 <=
walkableSlope = 40
#217
01/14/2015 (4:12 pm)
@Daniel: How do I get CMake to include walkabout?

I can't seem to get the project defines to work - any suggestions?

#218
01/14/2015 (5:04 pm)
figured it out...

In Tools/CMake/Modules

Add this file: module_walkabout.cmake:

Quote:

# -----------------------------------------------------------------------------
# Copyright (c) 2014 GarageGames, LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# -----------------------------------------------------------------------------

# Navigation module

addDef( "TORQUE_WALKABOUT_ENABLED" )
addDef( "TORQUE_WALKABOUT_EXTRAS_ENABLED" )
addLib( "recast" )

# files
addPathRec( "${srcDir}/walkabout" )

# include paths
addInclude( "${libDir}/recast/DebugUtils/Include" )
addInclude( "${libDir}/recast/Recast/Include" )
addInclude( "${libDir}/recast/Detour/Include" )
addInclude( "${libDir}/recast/DetourTileCache/Include" )
addInclude( "${libDir}/recast/DetourCrowd/Include" )



Open File: Torque3d.cmake

add at line 69:

Quote:

option(TORQUE_WALKABOUT "Enable Walkabout module" OFF)
#mark_as_advanced(TORQUE_WALKABOUT)




add at line 351:

Quote:

if(TORQUE_WALKABOUT)
include( "modules/module_walkabout.cmake" )
endif()

#219
01/14/2015 (5:06 pm)
Woof.

Still won't compile:

Quote:

17>............EnginesourcewalkaboutguiNavEditorCtrl.cpp(227): error C2039: 'mLinkTypes' : is not a member of 'AIPlayer'
17> C:Torque362EnginesourceT3D/aiPlayer.h(36) : see declaration of 'AIPlayer'
17>............EnginesourcewalkaboutguiNavEditorCtrl.cpp(227): error C2228: left of '.getFlags' must have class/struct/union
17>............EnginesourcewalkaboutguiNavEditorCtrl.cpp(390): error C2039: 'mLinkTypes' : is not a member of 'AIPlayer'
17> C:Torque362EnginesourceT3D/aiPlayer.h(36) : see declaration of 'AIPlayer'
17>............EnginesourcewalkaboutguiNavEditorCtrl.cpp(390): error C2228: left of '.getFlags' must have class/struct/union
17>............EnginesourcewalkaboutguiNavEditorCtrl.cpp(394): error C2039: 'setPathDestination' : is not a member of 'AIPlayer'
17> C:Torque362EnginesourceT3D/aiPlayer.h(36) : see declaration of 'AIPlayer'



...am I still missing the project define?

EDIT

Had to delete the CMake cache file and rebuild it CMake project - now it compiles!
#220
01/18/2015 (4:58 pm)
Awesome, sorry I didn't get back to you in time. That reminds me, I should add this to the Walkabout PR.