aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-12-21 13:27:13 +0200
committerkartofen <mladenovnasko0@gmail.com>2022-12-21 13:27:13 +0200
commit407e1bdc46fc3b4983aa95b3b270a017d631dc42 (patch)
treec3e446f5da88a9e7de90f36b6c4cf4de06e1e6aa
parent85601f555a3a57db44631706a25e0f933afd8551 (diff)
readme
-rw-r--r--README.md33
-rw-r--r--demo/demo1.pngbin24545 -> 7685 bytes
-rwxr-xr-xdownload-tilesets.sh2
3 files changed, 10 insertions, 25 deletions
diff --git a/README.md b/README.md
index f166789..09e2863 100644
--- a/README.md
+++ b/README.md
@@ -5,52 +5,37 @@ It uses tiles to generate an image, similar to this:
![Demo 0 of the program](../plain/demo/demo0.png) ![Demo 1 of the program](../plain/demo/demo1.png)
-It can use colored tileset like the one included in the files directory, which is copied from
-Mxgmn's Wave Function Collapse README.
-
-There is a script to turn the generated images into png using imagemagick.
-All files including the tiles are saved in the files directory.
+There is a script to download a couple of tilesets
+that are copied from [mxgmn's repository](https://github.com/mxgmn/WaveFunctionCollapse)
### Build
To build use `./build.sh`
To build and run use `./build.sh run`
To clean use `./build.sh clean`
+To download the tilesets use `./download-tilesets.sh`
Two files will be build in the bin directory,
`bin/gen_tiles` and `bin/wfc`
-I am pretty sure the `bin/wfc` should work on Windows,
-`bin/gen_tiles` uses linux-only header to
-create the directories for the files (files and files/tiles)
-and uses `cp` to copy files around.
-
-It would be easy to make everything work on windows,
-I just dont want to take my time and make it cross platform.
-
-And I dont want to use Makefile, because I dont like it,
-the project is not too big, a shell script is enough.
+I don't want to use Makefile, because I don't like it,
+and the project is not too big, so a shell script is enough.
### How it works
-Firstly `bin/wfc --help` can be used for some info on program arguments
+Firstly `bin/wfc -h` can be used for some info on program arguments
The main program `bin/wfc` uses the tiles in `files/tiles`, which are ppm files.
There is a file called `tiles.dat` in the same directory that holds information about the tiles, and it enables `bin/wfc` to generate the tile rotations
-The `bin/gen_tiles` generates the `tiles.dat` file and optionally the tiles themselves.
+The `bin/gen_tiles` generates the `tiles.dat` file and copies the required tiles from the tileset
There is a file called `config.h` under the src directory which is used to specify things about
`tiles.dat` and basically configuring `bin/gen_tiles`. More info in the file as comments.
-To use a tileset different generated one it is explained in `src/config.h`.
-For a tilset to be compatable with this project, it needs to be all ppm files,
-and files should be named exactly like the names in the table in `src/config.h`.
-For example see the tileset in `files/tilesets/knots`.
-
### Limitations
-1. A tile can either not connect with a tile or connect with all tiles that have a connection on the given direction.
- It cant connect only with specific tiles.
+1. One the connection are saved, and no other tile data, so the circuit tileset
+doesn't really work
2. Only tile based wave function collapse, I dont understand the other more complex one
### References
diff --git a/demo/demo1.png b/demo/demo1.png
index a39a508..f08b175 100644
--- a/demo/demo1.png
+++ b/demo/demo1.png
Binary files differ
diff --git a/download-tilesets.sh b/download-tilesets.sh
index 0b9a5ec..2354890 100755
--- a/download-tilesets.sh
+++ b/download-tilesets.sh
@@ -2,7 +2,7 @@
cd ${0%/*} # go to project root
-URL="https://ftp.batnako.net/tilesets/"
+URL="https://ftp.batnako.net/tilesets"
mkdir -p "files/tilesets"