adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Started work on Waste's Edge map


From: Kai Sterker
Subject: Re: [Adonthell-devel] Started work on Waste's Edge map
Date: Tue, 25 Sep 2012 22:52:23 +0200

On Mon, Sep 17, 2012 at 11:04 PM, Kai Sterker <address@hidden> wrote:

Took me a while to get anything done, as I had too much else going on
that kept me occupied. However, I finally managed to get down to the
following two items.

> * Noticed that the pathfinding can get into an endless loop while
> trying to route around a part of the path that is blocked. Guess we'll
> have to limit the number of times it tries before pathfinding is set
> to failed and stopped.

Added a maximum number of retries to path finding, so if an NPC gets
totally stuck, it will finally give up reaching its goal. The goal
would be to build maps in a way that NPCs do not get stuck in the
first place. With the current Waste's Edge stairs that cannot be
placed right next to a wall, I occasionally noticed the NPC getting
caught in the space between, although sometimes he could free himself
once a path in the opposite direction was picked.


> * If the NPC makes it to the stairs from cellar to (imaginary)
> stables, any path search from there fails. Need to check what's wrong
> there. Could have something to do with the height level/ground
> position.

The problem here was that on the way up the stairs, the path finding
grid was aligned such that the floor above the stairs was not found to
be blocking the path. On the way back, the grid was aligned
differently and suddenly the floor above was in the way. In truth,
however, the distance between the floor above and the part of the
stairs directly below the edge of the floor was already greater than
the NPC's height. I've added code to accommodate for this case
(https://github.com/ksterker/adonthell/blob/master/src/world/pathfinding.cc#L502).


That aside, I've also updated my development environment. Installed
most recent Eclipse + CDT (was 2 versions behind) and am quite pleased
to find it supporting both Doxygen and GIT out of the box. I've also
went ahead and set up a make install target and a couple debug
configurations. Before I always did compile/install and debug on the
command line, but doing it all from the IDE means less switching
between different windows and directories in the shell. It also means
I no longer have to struggle with gdb so much, which makes actual
debugging finally easier than adding extra logging to see what's going
on :-).

The new C/C++ code analysis feature is less than stellar, though. Lots
of false positives when checking our code base. Briefly looked at it,
but there seems little to improve (that it would find).


As always, if you find issues, let me know.

Coming up next ... path finding through doorways ...

Kai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]