I was wondering what are the suggestions to create custom pathfinding, take My Restaurant! . I have thought of different ideas but got none, anything is helpful!
Well, My Restaurant is laid out with a tiled floor pattern, that is their building system uses tiles for placement. That gives us a clue as to how their pathfinding works.
Say we have a tiled system of our own that looks like this:
We can assign each tile two numbers, one corresponding to it’s column and one corresponding to it’s row.
Now, let’s say we have a hypothetical scenario like this:
What we would do in this scenario is recognize first the row that the start position is in, and determine what row it needs to move to in order to align itself with the same role as the destination.
In this scenario the NPC at the start position needs to move up 3 rows from Row 1 to Row 4
It can then use the same system to check for the column, in this case moving 3 columns from Colum 2 to Column 5.
This should be able to adequately replicate the system from My Restaurant, however it can’t be applied to much else outside of a tiled movement system.
Seems like a genius idea to try, I’ll try my best to script something similar to it, appreciated!