This repository is an example implementation of the Wave Function Collapse algorithm using DragonRuby.
The algorithm is used to generate the entire map using tiles based on the rules. Rules are defined using the Tiled program and read by the Ruby program from the TSJ file.
Because DragonRuby allows building an HTML game, you can test the implementation yourself at https://pusewicz.github.io/wave-function-collapse-dragonruby/. HTML version is slower compared to a native build.
Build the Wave Function Collapse algorithm in DragonRuby that's fast enough to iterate in a game on each frame.
Bug reports and pull requests are welcome on GitHub at https://github.com/pusewicz/wave-function-collapse-dragonruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Tileset: https://opengameart.org/content/consolidated-hard-vacuum-terrain-tilesets