Finally my new script works!
The idea was to make a script that would, out of limited number of tiles, create seemingly infinite variations of map- or roadlike patterns.
The tiles needs some rules in order to pair them up so I drew some temporary lines representing roads just to make it easier to understand how to match them up with each other. I soon noticed that I only needed six different variations in order to make a continous map/pattern without any of the lines ending abruptly.
No matter what tile the script chooses, it will always be possible to put another tile on either side of it and make it pair up with the rest of the pattern since all the roads lie on the symmetry axis. This is, on the other side, only true if each tile is ‘single filed’. The number of tiles needed will increase dramaticly with every additional ‘file’.
In the single file tile set above there are 16 possible ways of placing the tiles:
- Tile #1: 4 rotations
- Tile #2: 4 rotations
- Tile #3: 1 static
- Tile #4: 2 rotations
- Tile #5: 1 static
- Tile #6: 4 rotations
But, in a tile set with a higher number of files simply rotating the tile in 90º increments won’t do since it’s symmetry axis will be offset.
Evidently, reflecting a tile both vertically and horizontaly yields the same result as rotating 180º.
The script has to consider the fact that each tile should be able to both rotate and reflect.