A problem previously present in Markeen-generated levels was that they had way too many "rare" structures. As a review, rare structures are groups of multiple tiles that only exist in that configuration. Whenever one tile in the structure was placed, the rare structure builder automatically put the rest of the group in place, effectively multiplying the probability of those structures by their size.
So today, I put in place a counterbalance for that multiplication. After a rare structure is generated, the dice are rolled and the structure is completely erased if the roll fails. The RNG's upper bound increases linearly with the structure's size. This has successfully cut down on the number of rare structures while keeping surviving ones intact.
Come to think of it, this post-generation erasure step could help remove preempted rare structures. A failure to place a critical tile could trigger the erasing routine, freeing up that space for normal tiles.
What is an RNG?
ReplyDeleteRandom Number Generator. The upper bound is the largest number it will generate, so smaller upper bounds mean a larger chance of a hit.
Delete