RE: Implementing PathFinding - LogicParrot - 05-02-2015
(05-02-2015, 05:34 AM)tonibm19 Wrote: It's me or mobs can jump fences now?
Sadly, you're right. Should be an easy fix, I'll see what I can do.
RE: Implementing PathFinding - LogicParrot - 05-02-2015
Push fix to PR.
RE: Implementing PathFinding - LogicParrot - 05-02-2015
Main post updated.
RE: Implementing PathFinding - NiLSPACE - 05-03-2015
I noticed that the mobs only calculate a new path when they reached their previous path or if they can't reach the path anymore.
RE: Implementing PathFinding - LogicParrot - 05-03-2015
(05-03-2015, 03:26 AM)NiLSPACE Wrote: I noticed that the mobs only calculate a new path when they reached their previous path or if they can't reach the path anymore.
Correct. it's an issue mentioned in the "AI Reborn" thread, I'll fix it eventually
RE: Implementing PathFinding - Howaner - 05-03-2015
The server crashes on my pc :/
Quote:Thread 9 (Thread 0x7ffff2438700 (LWP 11765)):
#0 0x00007ffff6bf6e37 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff6bf8528 in __GI_abort () at abort.c:89
#2 0x00007ffff6befce6 in __assert_fail_base (
fmt=0x7ffff6d3fc08 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0xdfac1a "0",
file=file@entry=0xe3ec1b "/home/franz/Schreibtisch/MCServer/src/Mobs/Path.cpp", line=line@entry=44,
function=function@entry=0xe3ec4f "cPath::cPath(cChunk *, const Vector3d &, const Vector3d &, int, double, double, int, int)") at assert.c:92
#3 0x00007ffff6befd92 in __GI___assert_fail (assertion=0xdfac1a "0",
file=0xe3ec1b "/home/franz/Schreibtisch/MCServer/src/Mobs/Path.cpp",
line=44,
function=0xe3ec4f "cPath::cPath(cChunk *, const Vector3d &, const Vector3d &, int, double, double, int, int)") at assert.c:101
#4 0x0000000000b43c1e in cPath::cPath (this=0x7fffed74a3d0,
a_Chunk=0x7fffdc127fc0, a_StartingPoint=..., a_EndingPoint=...,
a_MaxSteps=20, a_BoundingBoxWidth=1, a_BoundingBoxHeight=2, a_MaxUp=1,
a_MaxDown=1) at /home/franz/Schreibtisch/MCServer/src/Mobs/Path.cpp:44
#5 0x0000000000b3def2 in cMonster::TickPathFinding (this=0x7fffe8038df0,
a_Chunk=...) at /home/franz/Schreibtisch/MCServer/src/Mobs/Monster.cpp:134
#6 0x0000000000b3e5d6 in cMonster::Tick (this=0x7fffe8038df0, a_Dt=...,
a_Chunk=...) at /home/franz/Schreibtisch/MCServer/src/Mobs/Monster.cpp:298
#7 0x0000000000b37871 in cAggressiveMonster::Tick (this=0x7fffe8038df0,
a_Dt=..., a_Chunk=...)
at /home/franz/Schreibtisch/MCServer/src/Mobs/AggressiveMonster.cpp:63
#8 0x000000000085d649 in cWorld::TickMobs (this=0x7ffff5443010, a_Dt=...)
at /home/franz/Schreibtisch/MCServer/src/World.cpp:1078
#9 0x00000000008512ab in cWorld::Tick (this=0x7ffff5443010, a_Dt=...,
a_LastTickDurationMSec=...)
at /home/franz/Schreibtisch/MCServer/src/World.cpp:990
#10 0x0000000000850a6c in cWorld::cTickThread::Execute (this=0x7ffff5bbd950)
at /home/franz/Schreibtisch/MCServer/src/World.cpp:242
#11 0x000000000087bef9 in cIsThread::DoExecute (this=0x7ffff5bbd950)
at /home/franz/Schreibtisch/MCServer/src/OSSupport/IsThread.cpp:74
#12 0x000000000087d5d2 in std::_Mem_fn<void (cIsThread::*)()>::operator()<, void>(cIsThread*) const (this=0x19d7bf0, __object=0x7ffff5bbd950)
at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:569
#13 0x000000000087d532 in std::_Bind_simple<std::_Mem_fn<void (cIsThread::*)()> (cIsThread*)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x19d7be8)
at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:1699
#14 0x000000000087d4e5 in std::_Bind_simple<std::_Mem_fn<void (cIsThread::*)()> (cIsThread*)>::operator()() (this=0x19d7be8)
at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:1688
#15 0x000000000087d4bc in std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (cIsThread::*)()> (cIsThread*)> >::_M_run() (this=0x19d7bd0)
at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/thread:115
#16 0x00007ffff7255dd0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#17 0x00007ffff74b20a5 in start_thread (arg=0x7ffff2438700)
at pthread_create.c:309
#18 0x00007ffff6cb9cfd in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Quote:[a20d88875d30bc16|00:43:34] Assertion failed: m_Chunk != nullptr, file /home/franz/Schreibtisch/MCServer/src/Mobs/Path.cpp, line 44
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_Z15PrintStackTracev+0x1c)[0x88960c]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZN5cPathC1EP6cChunkRK7Vector3IdES5_iddii+0x171)[0xb43bf1]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZN8cMonster15TickPathFindingER6cChunk+0x1b2)[0xb3def2]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZN8cMonster4TickENSt6chrono8durationIlSt5ratioILl1ELl1000EEEER6cChunk+0x2a6)[0xb3e5d6]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZN18cAggressiveMonster4TickENSt6chrono8durationIlSt5ratioILl1ELl1000EEEER6cChunk+0x51)[0xb37871]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZN6cWorld8TickMobsENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE+0x499)[0x85d649]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZN6cWorld4TickENSt6chrono8durationIlSt5ratioILl1ELl1000EEEES4_+0x79b)[0x8512ab]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZN6cWorld11cTickThread7ExecuteEv+0x9c)[0x850a6c]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZN9cIsThread9DoExecuteEv+0x39)[0x87bef9]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZNKSt7_Mem_fnIM9cIsThreadFvvEEclIJEvEEvPS0_DpOT_+0x72)[0x87d5d2]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZNSt12_Bind_simpleIFSt7_Mem_fnIM9cIsThreadFvvEEPS1_EE9_M_invokeIJLm0EEEEvSt12_Index_tupleIJXspT_EEE+0x42)[0x87d532]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZNSt12_Bind_simpleIFSt7_Mem_fnIM9cIsThreadFvvEEPS1_EEclEv+0x15)[0x87d4e5]
/home/franz/Schreibtisch/MCServer/MCServer/MCServer_debug(_ZNSt6thread5_ImplISt12_Bind_simpleIFSt7_Mem_fnIM9cIsThreadFvvEEPS3_EEE6_M_runEv+0x1c)[0x87d4bc]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xbadd0)[0x7ffff7255dd0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x80a5)[0x7ffff74b20a5]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ffff6cb9cfd]
MCServer_debug: /home/franz/Schreibtisch/MCServer/src/Mobs/Path.cpp:44: cPath::cPath(cChunk *, const Vector3d &, const Vector3d &, int, double, double, int, int): Assertion `0' failed.
RE: Implementing PathFinding - LogicParrot - 05-03-2015
Fixed in this PR. (Now merged)
RE: PathFinder status - NiLSPACE - 05-05-2015
Mobs should also walk through doors if they fit, and if the doors are open.
RE: PathFinder status - xoft - 05-05-2015
Note that "open" door is somewhat vague. It's not enough to check the "openness" bit, because it effectively only says which side of the block is blocked by the door. It's possible to place a door that lets things through when it's "closed" and blocks things when it's "open". This might need a change in the A* logic, instead of asking "is block solid", it should ask "can I go from block A to neighbor N?" This kind of questions can then be answered using the door data.
RE: PathFinder status - LogicParrot - 05-05-2015
(05-05-2015, 07:26 AM)xoft Wrote: Note that "open" door is somewhat vague. It's not enough to check the "openness" bit, because it effectively only says which side of the block is blocked by the door. It's possible to place a door that lets things through when it's "closed" and blocks things when it's "open". This might need a change in the A* logic, instead of asking "is block solid", it should ask "can I go from block A to neighbor N?" This kind of questions can then be answered using the door data.
Good point.
I want to tweak the basic stuff before starting with doors though (Path recalculation, Bounding boxes, and when to call ResetPathFinding, etc.)
edit: typo
|