PathFinder status - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: PathFinder status (/thread-1571.html) |
RE: Implementing Pathfinding - LogicParrot - 04-28-2015 I didn't finish the Monster rewrite code. The (horrible) code is at the monsterTick branch. Anyone is invited to re-write it or fix it. I won't be working on this for the next week or two. RE: Implementing Pathfinding - LogicParrot - 04-29-2015 I eventually decided to finish this (Or at least work on it a bit) today, the monsterTick branch is obsolete, I'll keep you updated. RE: Implementing Pathfinding - LogicParrot - 04-29-2015 Is it just me or is the AI really dumb at the moment? It is drunk even when I hand it down points that are ready to be followed. (See latest commit) RE: Implementing Pathfinding - worktycho - 04-29-2015 Its really dumb. RE: Implementing Pathfinding - LogicParrot - 04-29-2015 Mob PathFinding is roughly working in the latest commit to pathFindingReborn. A group of zombies literally chased me and killed me while testing, it was unexpected, but it was a joyful death. I assume it's already better than the previous AI, but as mentioned in the previous comment, something is still... dumb. It seems that the AI is having trouble even following the precise adjacent waypoints handed down to it by the Pathfinder. There are still some easily fixable issues as well. (Such as considering grass and water solids) RE: Implementing Pathfinding - NiLSPACE - 04-29-2015 Awesome We might also like to rename it to cGroundPathFinder, since there are also mobs that fly. Those mobs should probably have a different path finder. RE: Implementing Pathfinding - LogicParrot - 04-29-2015 I have already tested flight, it works with the current pathFinder with a different flag. It's all awesome except the current AI, I just feel it downgraded my Pathfinder by an order of magnitude, it won't follow side-by-side points without trouble, and sometimes the mobs just get stuck. I am sure it has nothing to do with the PathFinder because it only manipulates m_Destination. It's just that the AI is not good at reaching m_Destination even if it's a single block away. This seems to be the code block responsible for m_Destination following (and hence responsible for the trouble): Code: if (m_Destination != GetPosition()) RE: Implementing Pathfinding - NiLSPACE - 04-29-2015 Maybe a Vector3d is too precise? Maybe you can say instead of "Destination == GetPosition()" see if he's near the position? RE: Implementing Pathfinding - LogicParrot - 04-29-2015 I cobbled up something that works a little better. Currently the AI hates flowers. I have a BLOCKTYPE and a NIBBLETYPE, I'd like to know the given block is walkable or not. Right now I check if it's of type E_BLOCK_AIR. This is a bad idea because grass and flowers and such will be considered solid that way. How can I check if a given block is walkable or not? RE: Implementing Pathfinding - NiLSPACE - 04-29-2015 Using cBlockInfo::IsSolid(BLOCKTYPE) |