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
P#72905 2020-02-08 04:38
@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
P#72928 2020-02-09 08:21
[Please log in to post a comment]