PathFinder status
I'm going to submit a pull request. I think this is mature enough for this.
There are a few of things that can be improved in the pathfinder, and there is MUCH to improve with the AI.

Pathfinder:
  • Special treatment to water, higher G cost.
  • Add vertically aligned waypoints when a jump is needed, should assist the mobs in jumps.
  • Move in straight line when there's a line of sight with target, this should also prevent mobs from stacking up as often as they do.
  • Higher G cost around other entities to encourage spreading?
  • Flight parameter. Flight is already "built in", it works by modifying some lines of code, I should make a constructor parameter for flight.

AI:
  • Zombies should be more aggressive when it comes to hit frequency / hitting while walking.
  • Cleanup of the older path-not-finderTongue
  • Pretty much everything. The current drawbacks of the AI are eclipsing the awesomeness of the Pathfinder, I set up something which works well for the zombies, but on the long run an overhaul should be made.

I think the code is ready for merging, (unless there's a performance bottleneck, please test that). As I said before, I have to take a break for a couple of weeks. After that, I'll resume adding features (and optimizations if needed).

Please note that the zombies are not "optimal", their invisible paths are indeed optimal but they don't always follow them correctly due to the horrible AI, I did some AI changes which make this tolerable but there's room for improvement, this will be done when I resume this.
Nevertheless, it's no longer "brainless floating zombies".
Reply
Thanks given by: jan64 , Seadragon91
The zombies are having a hard time doing precise movement (e.g) walking across a 1x1x20 plank. Can't I just make them "float" to their waypoints, disregarding all solids? the pathfinder will make sure they don't behave weirdly because the waypoints are all placed in the right places.

Edit: This is actually a pathfinder bug, it doesn't check correctly if diagonal movement is legal. (NOW FIXED)
Reply
Thanks given by:
Fixing the diagonal issue and centering the bounding box seems to have made the AI behave much better Smile
Reply
Thanks given by:
Done a few more commits, the zombies are now very Vanilla-like, 2 main issues remain:
1. The zombies sometimes have a hard time jumping, adding vertically aligned waypoints should fix this, this is my 1st priority right now.
2. The AI is weird in daylight. Can someone find out why?
Reply
Thanks given by:
The zombies might be getting knocked around by fire damage ? OR The burning code is making path following execute with a delay ? (Just a wild guess, i haven't looked at the code much)
Reply
Thanks given by:
Can someone give me a hand here? https://github.com/wiseoldman95/MCServer...rtPointers
I am trying to convert cPath to use smart pointers but it's compiler errors all over the place.
Reply
Thanks given by:
It would be nice if you wrote the actual error messagesTongue
Reply
Thanks given by:
I'll deal with it later, I just want to see zombies in MCServer first!Tongue
I'll post the error messages soon.

Original post updated, code integration with master will probably be soon, stay tuned!
Reply
Thanks given by:
I've tried the new pathfinder, and I have to say I'm impressed. Most mobs were able to follow me through a maze Smile The mobs really move great, but I did notice a few bugs.
  • Sometimes a mob just does nothing. I spawned 2 zombies and they just stood there. I was in survival mode, and I could punch them and they would still not come after me. This could also be due to something other then the new pathfinder of course, but I thought I'd mention it.
  • The path finder doesn't work when there is no block below me. For example like this: http://puu.sh/hvkoi/7754e62fd2.jpg
  • When no path can be found the mobs stop stop moving. They should probably at least try to get as close as possible. It could be that issue 1 is because of this? That the mob thinks there is no path, so it stops doing anything.
Reply
Thanks given by:
(04-30-2015, 04:05 AM)NiLSPACE Wrote: I've tried the new pathfinder, and I have to say I'm impressed. Most mobs were able to follow me through a maze Smile The mobs really move great, but I did notice a few bugs.
  • Sometimes a mob just does nothing. I spawned 2 zombies and they just stood there. I was in survival mode, and I could punch them and they would still not come after me. This could also be due to something other then the new pathfinder of course, but I thought I'd mention it.
  • The path finder doesn't work when there is no block below me. For example like this: http://puu.sh/hvkoi/7754e62fd2.jpg
  • When no path can be found the mobs stop stop moving. They should probably at least try to get as close as possible. It could be that issue 1 is because of this? That the mob thinks there is no path, so it stops doing anything.

As I said before, I was disappointed that the AI's drawbacks eclipse the pathfinder's awesomeness. Note that the next to-do in my roadmap (first post) is improving the AI. This isn't directly a pathfinding thing, but it's important. Issue 1 is most likely an AI thing, issue 3 is also AI-related.

Issue 2 is definitely a pathfinder issue, I explicitly programmed it to do nothing when there's no block beneath the playerTongue , I did not consider the situation in your screenshot.

Issue 3 is a hybrid issue. If no path is found, the pathfinder returns nothing. Making it return the "second best" shouldn't be too hard, but it isn't always the desired behavior; the zombie should start pathing only after spotting you. (You don't want 10 zombies waiting outside your cobblestone bunker, they shouldn't have seen you wanyways!), and it might be the cause for issue 1.

Thanks for the feedback, I'll add those things to my to-do list.

btw: Jiggling when trying to go up is an AI issue, I have a plan in mind for that.
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)