Page 1 of 1

Navigation wip for Alpha 4

PostPosted: 05 Sep 2015, 11:32
by Krom
Reimplementing the algorithm with critical thinking over every procedure seems to be working well. Agents already avoid and push each other out of the way. And the best part – I know why they do so now.

A little sneak peak into the internals:
2015-09-03 caster.png
On the picture rightmost agent was staying idle and 2 agents from the left are on their course to walk to the purple dot. Each agent samples a square area in front of him (1024 points, for better debug display). Red shows where agent should not go (due to being off-way or on a course to collide with another agent). Green is preferred. White dot is the best way agent chose to go.

Re: Navigation wip

PostPosted: 19 Sep 2015, 08:26
by Krom
Problem with agents pushed into unwalkable areas seems to be fixed – instead of trying to keep the on walkable, wrote a “push back to walkable” function.

Now to the next problem – pathfinding!

P.S. Navigation calls units – agents, sounds neat. Agent “Serf” bringing stone to agent “Builder” =)

Re: Navigation wip

PostPosted: 19 Sep 2015, 19:52
by Krom
Caster got massively overcrowded today:
Image

Re: Navigation wip

PostPosted: 19 Sep 2015, 20:04
by Tiank
Such swarm, wow!

Re: Navigation wip

PostPosted: 19 Sep 2015, 20:08
by Krom
40 agents so far. I hope engine will handle 400 on a bigger map.. keeping fingers crossed.
But first - a few more issues to resolve

Re: Navigation wip for Alpha 4

PostPosted: 21 Sep 2015, 11:27
by zombie01
will people be able to swim? :P
joking

Re: Navigation wip for Alpha 4

PostPosted: 21 Sep 2015, 11:32
by Krom
Nope, not really :-D

Re: Navigation wip for Alpha 4

PostPosted: 27 Sep 2015, 18:59
by Krom
Good news – work continues!

Over the weekend I have successfully corrected the problem with two or more agents going for the same target and getting stuck, because no one had a clear priority over others. I have tried two different ideas and choose the best.
Also greatly improved pushing out of idle agents.
Changes and improvements were also made to other parts, such as pathfinding and selection of the next waypoint en route.
Many additions were also made to the debug rendering, for easier isolation of problems and debugging.

Now there are two relatively easy problems:
– In the narrow corridor agents often interfere with their neighbors, if they did not touch the waypoint while walking past it. Here the solution is already known – needs just implementing and debug.
– Idle agents are much too “scared” sometimes. If some other agents approaches them and stops one tile short, they run back around 1/5 of tile. I still need to re think how to solve that, because this behavior is a part of the interaction and collision avoidance algorithms.

All-in-all everything is going pretty well so far :-)

Re: Navigation wip for Alpha 4

PostPosted: 28 Sep 2015, 18:08
by Tiank
All-in-all everything is going pretty well so far
Good to hear that! Looking forward for Alpha 4 :)

Re: Navigation wip for Alpha 4

PostPosted: 29 Sep 2015, 06:58
by zombie01
It would be awesome if we could make a zone where idles head to.