Opened 5 years ago
Closed 5 years ago
#3 closed enhancement (fixed)
New Path-Finding Sub-system
Reported by: | Mad Martian | Owned by: | Mad Martian |
---|---|---|---|
Priority: | critical | Component: | Entity Sub-system |
Version: | Keywords: | ||
Cc: |
Description
The built-in Vanilla path-finding algorithm is not optimized (at all) and makes the game almost unplayable when more than one player is logged-on a server at a time. This is because some mobs (Nightmare Creatures mobs in-particular) make very deep path-finding requests and these requests are issued once per tick, which is very inefficient (and unnecessary).
This will likely inspire a new companion mod that solely improves the built-in path-finding.
Change History (7)
comment:2 by , 5 years ago
Status: | new → accepted |
---|
comment:3 by , 5 years ago
All of the above are now completed except for the following remaining sub-tasks:
- Clear A* graph memory periodically (based on random time period)
- Introduce random entropy so that paths are non-deterministic
- A* graph cache window, verify that it culls properly
There are some new sub-tasks I've found since working
- Fences, mobs think they can jump over them and jump endlessly at them
- Cache the path-point graph since we're going to be refreshing it periodically anyway
- Mobs tend to "break-dance" near edges
- Spiders don't really move, they just sit there unless you get very close to them
- Zombies (and other mobs) seem to give-up path-finding altogether and even lose complete interest in you until you aggravate them
comment:4 by , 5 years ago
Again, the above are now completed except for the following remaining sub-tasks:
- Introduce random entropy so that paths are non-deterministic
- A* graph cache window, verify that it culls properly
- Fences, mobs think they can jump over them and jump endlessly at them
Improved, but still needs work:
- Mobs still tend to "break-dance" near edges
comment:5 by , 5 years ago
Again and again, the above are now completed except for the following remaining sub-tasks:
- Introduce random entropy so that paths are non-deterministic
- Mobs "break-dance" near narrow holes, the block-highlighter indicates that these are larger mobs that are trying to path-find into them. They give-up after a little while though so I might leave this as is.
Additionally, I still need to:
- Prohibit animal-like mobs from climbing ladders
I also did some performance profiling, once again none of the path-finding methods shows-up as hot spots, even with a hundred mobs running around in the immediate vicinity. These performance gains are simply unreal, we're talking between x100 and x1000 performance boost over the Vanilla implementation. Minecraft multi-player will be playable again at last.
comment:6 by , 5 years ago
Only remaining sub-task is the break-dancing phenomenon, which is a bit more common than I had thought.
I decided against a random entry feature, this would significantly increase the computational and storage complexity of the algorithm, and the resultant behavior may not even be desirable.
comment:7 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Released as version 1.0 under MMM 8.6.8-Blackberry
Implementation is almost completed. Some outstanding sub-tasks include (may be promoted to separate tickets later):
Sub-tasks that are complete but require further testing: