13-04-2008, 07:23 PM
The way mine work, is it basically has a pseudo NPC wander around till it hits a map edge, wherever it stepped = path.
then fill in the rest of the areas with the tileset's upper wall, then loop through the X/Y, and whenever a path is directly below the upper one, set a middle tile there instead.
Spawn NPCs however you like, then set anything that's not the ground tile to TILE_BLOCKED.
Mine's a bit more complete than that, but that's the gist of how it works.
then fill in the rest of the areas with the tileset's upper wall, then loop through the X/Y, and whenever a path is directly below the upper one, set a middle tile there instead.
Spawn NPCs however you like, then set anything that's not the ground tile to TILE_BLOCKED.
Mine's a bit more complete than that, but that's the gist of how it works.