That may come bundled with other issues, though.

Hmmm, would it be too hard to separate those hitboxes? Is it hardcoded in? I don't like squeak through (because imo you need to think through the layout of your pipes and other stuff), but trees are annoying, especially before you have robots.Pi-C wrote: Sun Oct 20, 2019 1:45 pmThat may come bundled with other issues, though.PaqpuK wrote: Sun Oct 20, 2019 9:24 am
Can it be solved by just reducing the collision hitbox of trees? I know a lot of people use mods for that already.![]()
Make the tree hitbox too small, and they fit between walls or rails and aren't marked for deconstruction when they should be. Then trains collide into them, or bots just hover waiting for a tree that's in the way but isn't marked.PaqpuK wrote: Sun Oct 20, 2019 10:02 pm Hmmm, would it be too hard to separate those hitboxes? Is it hardcoded in? I don't like squeak through (because imo you need to think through the layout of your pipes and other stuff), but trees are annoying, especially before you have robots.
That's exactly what I was thinking : We could argue that biters are the native living form on the planet, and therefore very used to run between the native vegetation.
Collision mask defines colliders between entities, you don't need to change the size of any collision boxes.Koub wrote: Mon Oct 21, 2019 7:31 am Also if the trees hitbox can't be shrunk, maybe the biters'/player's can ?
The trick is fewer nodes to search, each big chunk is 32x32 = 1024 so path finding with the big nodes is 3 orders of magnitude faster than doing it on tilesmrvn wrote: Mon Oct 21, 2019 10:53 am In the simplified map how does the heuristic calculate the distance? You could be just crossing one tile at the edge of the chunk or go all the way across the chunk. Worst case there could be a spiral pattern so it takes 100+ tiles to cross a chunk.
So what's your trick there?
That wasn't the question.ratchetfreak wrote: Mon Oct 21, 2019 11:05 amThe trick is fewer nodes to search, each big chunk is 32x32 = 1024 so path finding with the big nodes is 3 orders of magnitude faster than doing it on tilesmrvn wrote: Mon Oct 21, 2019 10:53 am In the simplified map how does the heuristic calculate the distance? You could be just crossing one tile at the edge of the chunk or go all the way across the chunk. Worst case there could be a spiral pattern so it takes 100+ tiles to cross a chunk.
So what's your trick there?
It is two-sided (and has always been). I only showed the forward search in the FFF to simplify things a bit.darkfrei wrote: Sat Oct 19, 2019 5:09 pm You are show the pathfinding only from A to B, is two sided search not better? I can simultaneously search paths A to B abd B to A, just wait when they find the same point, connection point.
The heuristic is only supposed to give you a lower bound on the length of the optimal path, not the exact actual length. The heuristic uses the number of chunks that have to be traversed to reach the goal, and knowledge about which chunk to go to next (the came-from pointer in the abstract search). So, the heuristic is (number of chunks to goal) * (chunk size) + (shortest possible distance to the next chunk).mrvn wrote: Mon Oct 21, 2019 10:53 am In the simplified map how does the heuristic calculate the distance? You could be just crossing one tile at the edge of the chunk or go all the way across the chunk. Worst case there could be a spiral pattern so it takes 100+ tiles to cross a chunk.
So what's your trick there?
The heuristic is only supposed to give you a lower bound on the length of the optimal path, not the exact actual length. The heuristic uses the number of chunks that have to be traversed to reach the goal, and knowledge about which chunk to go to next (the came-from pointer in the abstract search). So, the heuristic is (number of chunks to goal) * (chunk size) + (shortest possible distance to the next chunk).mrvn wrote: Mon Oct 21, 2019 10:53 am In the simplified map how does the heuristic calculate the distance? You could be just crossing one tile at the edge of the chunk or go all the way across the chunk. Worst case there could be a spiral pattern so it takes 100+ tiles to cross a chunk.
So what's your trick there?
Yes, that can indeed happen. We already use an inadmissible heuristic (because we use static weighting), so it shouldn't be too much of a problem.mrvn wrote: Mon Oct 21, 2019 12:40 pmGoing from red to green that is 3 chunks to green and one tile to the next chunk: H(red->green) = 3 * 32 + 1 = 49. But the shortest path is actually 7.
I hoped you had something more clever. But the difference is probably not noticeable unless you compute the path perfectly to compare. I bet most of the time any difference will be where nobody is watching or even invisible on the map.Oxyd wrote: Mon Oct 21, 2019 12:51 pmYes, that can indeed happen. We already use an inadmissible heuristic (because we use static weighting), so it shouldn't be too much of a problem.mrvn wrote: Mon Oct 21, 2019 12:40 pmGoing from red to green that is 3 chunks to green and one tile to the next chunk: H(red->green) = 3 * 32 + 1 = 49. But the shortest path is actually 7.
Oxyd wrote: [...]
The pathfinder is limited to doing a certain amount of steps per tick to avoid tanking UPS. With JPS, every iteration of the loop that searches for the next tile where you can make a turn would have to count as a step, and because each of these steps involves the same collision check it does for plain A*, the step limit would have to be very close to the current one, if not the same. And since JPS can visit each position on the map multiple times, it would be potentially slower than what we currently have.
[...]
It is unlikely that the biter AI with change significantly in the future – apart from the newly introduced pathfinding optimizations._alphaBeta_ wrote: Tue Oct 22, 2019 4:02 pm I'm hoping this pathfinding upgrade is a precursor to more sophisticated biter attacks. Would be nice if biters offered more of a challenge by avoiding hazards altogether and going through a hole in your defenses.