Tile # NESW ------------- Tile 1: 0312 Tile 2: 1302 Tile 3: 0203 Tile 4: 1013 Tile 5: 0310 Tile 6: 1200 Tile 7: 0012 Tile 8: 0002 Tile 9: 1003 Tile 10: 0213 Tile 11: 1210 Tile 12: 1300The edge matching algorithm stores tile numbers (referred to as indices) into an array that represents which tile is drawn at any particular place in the image. It uses a class that represents the four labels of a given tile to compare the tiles based on the indices chosen. The algorithm is as follows:
Note that each time the game is loaded, the texture tiling is different due to pseudo-random tile selection. | |
---|---|
Ick. The fully randomized tile background is terrible, choppy, full of seams and just plain unappealing. Then again, the Wang tiles were designed specifically for Wang tile tesselation, and at least some of the tiles match up occasionally. Imagine how awful a texture with totally random tile samples (not Wang tiles cut from image stitching) would look like... | |
---|---|
Original image: | |
Patch: | |
Quilt: |
Wang tiles: | ||||
Final result: |
The program samples lots of blue for the Wang tiles. Unfortunately, the resulting pattern makes the game's blue jewels difficult to see. |
Original image: | |
Patch: | |
Quilt: |
Wang tiles: | ||||
Final result: |
Original image: | |
First patch and quilted image: | |
Wang tiles (bad) | ||||
Final result (bad): |
Second patch (taken from first quilt) and quilted image: | |
Wang tiles (improved) | ||||
Final result (good): |
Original image: | |
Patch: | |
Quilt (looks decent): |
Wang tiles: | ||||
Final result (looks...not so fantastic): |
Original image: | |
Patch: | |
Quilt: |
Wang tiles: | ||||
Final result (looks surprisingly decent...maybe): |