05-29-2015, 02:03 AM
(This post was last modified: 05-29-2015, 02:12 AM by LogicParrot.)
Mob status
|
05-29-2015, 02:26 AM
48 * 48 * 48 * 4 = ~800,000. I think a PathFinder wrapper would be the way to go if we find we need more options than just give me the path from a to b.
05-29-2015, 02:28 AM
(05-29-2015, 02:26 AM)worktycho Wrote: 48 * 48 * 48 * 4 = ~800,000. I think a PathFinder wrapper would be the way to go if we find we need more options than just give me the path from a to b. We do have a more sophisticated logic, but it's ugly tight coupling right inside monster.cpp. What's the 48 and the 4?
05-29-2015, 02:47 AM
(This post was last modified: 05-29-2015, 02:48 AM by LogicParrot.)
I figured out your numbers.
A naive implementation would indeed reach this. But a well-written Dijkstra/Astar is much more efficient, because it won't scan the whole area, it will only scan walkable areas. So, for a 1x1x1 chicken on a plane, only the ground plane will be scanned, that would be 48 * 48 * 4 = 9216. A typical mob is bigger than 1x1x1 and the world isn't always a plane, so I'd roughly estimate that the memory demand is 48 * 48 * 4 * x where x is somewhere between 1 and 5. Note, that the idea of a reversed Dijkstra (a field around each player) would mean that memory is consumed per *player* and not per *mob*.
05-29-2015, 03:00 AM
It goes up to 36K, because you need to store the coordinates the cost is associated with. Thats less than 800K, but still a considerable amount of memory per mob, but I agree that per player, it would be a good thing to have.
05-29-2015, 04:53 AM
Per player pathfinding would be nice, but a dumb path finding code should be available too (for plugin devs, and other future uses).
05-29-2015, 05:21 AM
(This post was last modified: 05-29-2015, 05:43 AM by LogicParrot.)
05-29-2015, 05:35 AM
^^ That wasn't me -- I understand nothing of this process, but it sure sounds like magic to me, if you know the quote.
05-29-2015, 05:43 AM
Meant jan
05-29-2015, 06:18 AM
Yeah, I didn't crunch the numbers when I wrote that, I was just brainstorming out loud
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)