Eager generation of valid structures is important because fill orders lacking it tend to cut off such structures (other tiles have encroached upon the already generated part of the structure and made it impossible to continue generating). My current implementation checks to see if the newly placed tile is compatible with exactly one tile on each side and, if so, places the only possible companion and repeats the process for that new tile.
Results so far are encouraging, but there are some problems. It's possible for the eager generator to be "too late" if tiles have already been placed that block the outgrowth of particularly large structures. Also, this algorithm generates rare structures far too frequently - the fuse box from the Regulation Control Center appears at least once in literally every Keen 5 level I've generated.
Except this one. (But I had to go through dozens to find it.) |
No comments:
Post a Comment