So gennerally for 2d tile maps a tile is either passable or impassible... so an actor can move to any passable adjacent tile.
I am looking for a good way to decouple the passablity of a cell from the traversal to/from the cell.
Which do you suppose is the best way?
1) Each tile contains a value indicating if the passage to the right and bottom tiles are valid.
Pro: Requires very little modification to a standard 2d array implementation
Con: Checking for passage works on different cells depending on direction of travel... i.e to travel right or down you check your current tile, but travel up or left requires checking the destination tile.
2) Each tile contains a value indicating the passage to adjacent tiles
Pro: Can still be implemented using a standard 2d array implementation
Con: Disabling travel between two tiles requires setting a value on both the tiles (semi-redundant data... semi b/c you could implement 1 way passages, etc).
3) Use a separate array for tile data and traversal data... in the tile array the data describes the tile, in the separate array the data represents the "wall" between two cells.
Pro: No data redundancy, consistent mapping
Con: Requires entirely new map structure with more complex mapping, look up functions...
4) Awesome method that I haven't thought of... pro: It may be awesome, con: I didn't think of it yet...