From 3009bdfe5c9d06dd03d9a36a5919fcb1c834137c Mon Sep 17 00:00:00 2001 From: kartofen Date: Tue, 9 Aug 2022 23:29:20 +0300 Subject: edit readme --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index e20a0ff..c0a06a2 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ This an implementation of very primitive tile-based wave function collapse. It uses tiles to generate an image, similar to this: + ![Demo of the program](demo/demo.png) It generates the tiles as ppm, then generates the image, similar to the demo image as ppm. There is a script to turn the ppm files into png using imagemagick. @@ -12,3 +13,18 @@ All files including the tiles are saved in the files directory To build use `./build.sh` To build and run use `./build.sh run` + +### How it works + +There are two programs, the first one generates the tiles and a special little file which includes the information +if a tile should connect to another tile. The tiles are specified as bitmaps, their symmetry type, and on which sides it connects. +And the program generates every tile and all of its rotations as ppm files. + +The other program reads the ppm tiles and the tile-info file (tiles.bin) and it creates the tilemap. +Using the tile-info file it internally creates a table of bit masks to apply to the neighbors of collapsed tiles. +Other than that it functions very similar to a normal a normal simple tiled model + + +#### References + +[wave function collapse readme](https://github.com/mxgmn/WaveFunctionCollapse) -- cgit v1.2.3