Here's my take on this idea, based on your code.
changes in this version:
automatically generate lookup tables
support separate lookups for both types of tile ("land" and "water")
create and save template spritesheet
@merwok the idea is that you can lay out a grid of simple tiles (in these examples, just ones and zeros), then the code will figure out which of many sprites to use based on the neighbors of each cell.
1 surrounded by 1 is solid land. 1 surrounded by 0 is a small island.
000 111 000
is an east/west bridge
[Please log in to post a comment]