Twitter  YouTube  E-Mail  RSS
The One Man MMO Project
The story of a lone developer's quest to build an online world :: MMO programming, design, and industry commentary
By Robert Basler on 2016-10-12 15:47:27
Homepage: email:one at onemanmmo dot com

Fun bug showed up last night, first time in the five years I've been running Miranda's pathfinding. I was driving a group of tanks around the map when all of a sudden, two of them wouldn't move. I looked in the log and the pathfinding was giving up with "no path to destination" errors. Weird, they were moving fine a second ago and the destination I was clicking on looked fine.

[Stuck tanks - This should never happen!]

Stuck characters are a common problem for MMO's, usually requiring special menu options and customer service and I thought I'd never have to worry about that particular problem so... Eek!

Miranda's map has two types of areas: walkable and unwalkable. Unwalkable areas are cliffs, steep hills and (some day maybe) water. When I dug into it with the debugger I discovered that those two tanks were both on unwalkable areas. Ohhhh. Miranda's pathfinding can't find a path if the start of the path is on an unwalkable area. So how did they get on an unwalkable area? It turns out that the system that steers units away from collisions can steer them slightly onto unwalkable areas, but normally the steering system detects that it has driven off the walkable area and goes back immediately.

This time though, right as the units moved off the walkable area, I told them to move to a different location. When I tell a unit to move, if it is already moving to a destination it stops immediately. These two units unfortunately stopped at the exact moment they were off of the walkable area.

So now Miranda's pathfinder will check to see if the unit is on an unwalkable area and find the closest walkable area and use that as the pathfinding starting point. Since the nearest walkable area should be the one it just drove off of, and the steering system is fine with unwalkable areas, nobody should notice any problem.

New Comment

Cookie Warning

We were unable to retrieve our cookie from your web browser. If pressing F5 once to reload this page does not get rid of this message, please read this to learn more.

You will not be able to post until you resolve this problem.

Comment (You can use HTML, but please double-check web link URLs and HTML tags!)
Your Name
Homepage (optional, don't include http://)
Email (optional, but automatically spam protected so please do)
Type boy. (What's this?)

  Admin Log In

[Home] [Blog] [Video] [Shop] [Press Kit] [About]
Terms Of Use & Privacy Policy