Posts: 721
Threads: 77
Joined: Apr 2014
Thanks: 113
Given 130 thank(s) in 91 post(s)
Hello, the zombies are really polished now. I can't reproduce the air hanging error anymore, so I think it's fixed. Can you?
They don't freeze anymore, but at daylight, will not charge at you when they're hiding in the shadows unless provoked, this behavior will later be tweaked.
Posts: 116
Threads: 3
Joined: Sep 2014
Thanks: 31
Given 15 thank(s) in 11 post(s)
05-01-2015, 08:06 PM
(This post was last modified: 05-01-2015, 08:09 PM by jan64.)
About the zombies following second best path, the correct behavior would be for the zombie to check if there is a line of sight to the player, and then get the best/second best path (vanilla does that, afaik) as long as the player is in some nearby area.
Posts: 721
Threads: 77
Joined: Apr 2014
Thanks: 113
Given 130 thank(s) in 91 post(s)
Update: The new AI and PathFinder branch has been merged and is now part of the official MCServer.
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
It's still faster to do what xoft wrote because the slow bit is DoWithChunk, querying neighbors within DoWithChunk is cheap. The problem with that is that whilst it increases throughput, the depth limit becomes much more important because you hold the ChunkLayer lock for the entire time.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
It's not so much about the locks - they are locked during the mob ticks anyway. It's about the chunk lookups. Each DoWithChunk() needs to locate the chunk within the world, which is not exactly trivial; if you do that for each queried block, it quickly becomes the bottleneck.
Posts: 721
Threads: 77
Joined: Apr 2014
Thanks: 113
Given 130 thank(s) in 91 post(s)
Oh, ok. You're referring to the name of the commit only, correct?
Is the PR much better performance wise?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
I have no idea; I'd expect so, but unless someone actually measures the performance, there's no way to know.
Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
It's me or mobs can jump fences now?