{"repo":"krychu/wfc","free":true,"listed":false,"github":"https://github.com/krychu/wfc","clone":"git clone https://github.com/krychu/wfc.git","description":"Wave Function Collapse library in C, plus a command-line tool","language":"C","stars":366,"topics":["wfc","c","procedural-generation","procgen","wave-function-collapse","library","command-line-tool"],"license":null,"category":"cli-tools","readme_excerpt":"wfc Single-file Wave Function Collapse library in C, plus a command-line tool - License: MIT - Version: 1.0 Supports the overlapping WFC method. The method takes a small input image and generates a larger output image which is locally similar to the input image. A few examples of input/output pairs: The WFC is often used for procedural map generation, but is not limited to this use-case. The library is very performant and includes a number of optimizations not found in other implementations. As an example, generating a 128x128 image from cave.png (308 unique tiles) takes 371ms. Solve times (3x3 patterns, flipped and rotated) on an Intel Core Ultra 9 285K with clang -O3: Sample Tiles Size Solve (ms) --- --- --- --- cave.png 308 128x128 371 cave.png 308 256x256 1729 twolines2.png 76 128x128 58 twolines2.png 76 256x256 514 wrinkles.png 51 128x128 37 wrinkles.png 51 256x256 356 LANGUAGE BINDINGS - Rust -- by Noah Ryan HOW TO USE THE LIBRARY One file in your project should include wfc.h like this: Other files can also include and use wfc.h but they shouldn't define WFC IMPLEMENTATION macro. Alternatively, you can build a traditional .o file with make wfc.o and use wfc.h as a regular header file. Usage: By default you work with struct wfc image for inputs and outputs. data is tightly packed without padding. Each pixel consists of component cnt components (e.g., four components for rgba format). The output image will have the same number of components as the input image. wfc run ret","default_branch":null,"files":null,"tree":[],"storefront":"/r/krychu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/krychu/wfc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}