Is it really needed to make 2 seperate grids?

Could you not just make a pathfinding node attach to each grid object? Having to make 2 seperate grid systems that are references the same phsyical grid spaces just feels very redundant to me when you could have one grid control both.

Yes you could have everything in a single GridObject, but then your GridObject would become massive and a confusing mess of game logic and pathfinding logic.
The code is much simpler to understand if you separate those things, each GridObject type has a clear purpose.
Not to mention with this approach you can easily reuse the Pathfinding in a completely separate project, it’s already fully decoupled from any mention of any specific TBS game logic.

2 Likes

I actually feel the opposite way about it. I thought it was a really good idea. It separates the concerns and keeps the code clean and manageable

3 Likes

Privacy & Terms