I'm trying to make an oldschool dungeon crawler like ROGUE, I'm wondering how it's possible to achieve turn based pathfinding using arrays or tilemaps. I'll give a quick run-down of how my project works:
I've got a procedural generation dungeon created in a 50x30 cell Array. 0 being a wall, 1 being floor. To which I do a 'For Each X&Y Element' condition to render each cell to it's counterpart on the tilemap. It all works nice.
However the problem comes with enemies, Construct 2 has built in path-finding. However it uses actual collision checks with objects to which i'm not using objects for my walls. I figured since the map is procedural generated for each tile that's not equal to 1 i'll create an invisible wall object the size of each tile. So that the pathfinding will work. But the problem lies that my game's map is 50x30 tiles per floor. And some floors will only have about 200 of the tiles as walk-able flooring so you can imagine how intensive that'll be to run having over a thousand invisible objects on run time?
And factoring in the problem of i'm using turn based movement instead of Construct 2's pathfinding movement. I figured I would call a 'FindPath' action and then use the 'Pathfinding.NodeX' and 'Pathfinding.NodeY' expressions to determine which tile to move to. Every turn it would recall the 'FindPath Action'to update. But this is only achievable if I can find a way for the PathFinding behavior to work with either a tilemap/array.
Does anyone have any suggestions?
Thank you, Pixel.