That S Thing
You know the one...
I was thinking about it earlier, and I noticed how it can be broken down into similar repeating parts:
I wanted to generate a random pattern using the tiles, but I wanted it to be a bit more pleasing to the eye than just random, so I wrote up some rules for which tiles can come after which other tiles, based on the original layout:
tile | allowed below | allowed to the right
- | - | - 0 | 2 | 1 1 | 2 | 0 2 | 0, 1, 3, 4 | 2 3 | 2 | 4 4 | 2 | none
notice that if we only stick to the original layout, we can't make a repeating pattern because nothing is allowed to appear to the right of tile 4! Let's relax the rules a little bit to allow some horizontal repetition:
tile | allowed below | allowed to the right
- | - | - 0 | 2 | 1 1 | 2 | 0 2 | 0, 1, 3, 4 | 2 3 | 2 | 4 4 | 2 | 3
It's not bad! we get a little variation, but things always repeat horizontally. This is clear if you pick a tile and follow the "right" rules:
- 0,1,0,1,0,1…
- 1,0,1,0,1,0…
- 3,4,3,4,3,4…
So I tweaked the rules a bit more, honestly just until it looked the right amount of "interesting"
tile | allowed below | allowed to the right
- | - | - 0 | 2 | 1, 3 1 | 2 | 0, 3 2 | 0, 1, 3, 4 | 2 3 | 2 | 4 4 | 2 | 0
with this set of rules "the s" appears in the pattern, but not too often! just enough to be special.