Wednesday 31 December 2008

Bridge algorithm in action

The bridge searching algorithm is good when the river width is one tile. This happens when the river is wide:



Not clever. I have to improve the algorithm, but it can be difficult to determine where bridges should cross the river. One good indicator could be the corridor mask, because sometimes corridors cross the river. That's a good place to build a bridge.

The map madness is almost over. Search for terrain_map references results only 140 hits, with most being already inside Level class so I think it's really possible to make the terrain_map an internal part of Level rather than a global instance.

No comments:

Post a Comment