{"id":16702165,"url":"https://github.com/pusewicz/wave-function-collapse-ruby","last_synced_at":"2026-03-02T00:31:51.863Z","repository":{"id":238476974,"uuid":"796635953","full_name":"pusewicz/wave-function-collapse-ruby","owner":"pusewicz","description":"Tiled Wave Function Collapse model implemented in Ruby and rendered using Gosu","archived":false,"fork":false,"pushed_at":"2026-01-29T12:20:12.000Z","size":1433,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-30T02:32:40.047Z","etag":null,"topics":["game-dev","game-development","gamedev","gosu","ruby","wave-function-collapse"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pusewicz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-06T10:39:34.000Z","updated_at":"2026-01-29T12:20:15.000Z","dependencies_parsed_at":"2024-05-06T11:57:39.197Z","dependency_job_id":"7de583ab-f5b2-4601-abdf-586350e983c3","html_url":"https://github.com/pusewicz/wave-function-collapse-ruby","commit_stats":null,"previous_names":["pusewicz/wave-function-collapse-ruby"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pusewicz/wave-function-collapse-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusewicz%2Fwave-function-collapse-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusewicz%2Fwave-function-collapse-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusewicz%2Fwave-function-collapse-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusewicz%2Fwave-function-collapse-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pusewicz","download_url":"https://codeload.github.com/pusewicz/wave-function-collapse-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusewicz%2Fwave-function-collapse-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29988044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T22:42:38.399Z","status":"ssl_error","status_checked_at":"2026-03-01T22:41:51.863Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-dev","game-development","gamedev","gosu","ruby","wave-function-collapse"],"created_at":"2024-10-12T18:47:01.575Z","updated_at":"2026-03-02T00:31:51.839Z","avatar_url":"https://github.com/pusewicz.png","language":"Ruby","readme":"# Wave Function Collapse in Ruby\n\nThis repository is an example implementation of the [Wave Function Collapse](https://github.com/mxgmn/WaveFunctionCollapse) algorithm using [Ruby](https://www.ruby-lang.org/) and [Gosu](https://www.libgosu.org/).\n\nThe algorithm is used to generate the entire map using tiles based on the rules. Rules are defined using the [Tiled](https://www.mapeditor.org/) program and read by the Ruby program from the [TSJ](https://github.com/pusewicz/wave-function-collapse-ruby/blob/main/assets/map.tsj) file.\n\n![Wave Function Collapse in Ruby](assets/screenshot.png)\n\n## Objective\n\nBuild the Wave Function Collapse algorithm in Ruby that's fast enough to iterate in a game on each frame.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nRun `bin/run` to run the example.\n\n## Benchmark\n\nRun `bin/benchmark` to see how fast the algorithm is.\n\n#### f8157d0: Apple M3 Max 64GB (2023): 1.09s\n\n        ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]\n        Run #1: Benchmark for Model(grid=20x20 entropy=188)… Finished in 1.17s\n        Run #2: Benchmark for Model(grid=20x20 entropy=188)… Finished in 1.02s\n        Run #3: Benchmark for Model(grid=20x20 entropy=188)… Finished in 1.07s\n        Average time: 1.0883400000069134\n        Slowest time: 1.1748530000040773\n        Fastest time: 1.020996000006562\n        Result: 1.09s\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/pusewicz/wave-function-collapse-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/pusewicz/wave-function-collapse-ruby/blob/main/CODE_OF_CONDUCT.md).\n\n## Contributors\n\n\u003c!-- readme: contributors -start --\u003e\n\u003ctable\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/pusewicz\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/940?v=4\" width=\"100;\" alt=\"pusewicz\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003ePiotr Usewicz\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/cyberarm\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/581879?v=4\" width=\"100;\" alt=\"cyberarm\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eCyberarm\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003ctbody\u003e\n\u003c/table\u003e\n\u003c!-- readme: contributors -end --\u003e\n\n## Others\n\n- [Wave Function Collapse in DragonRuby](https://github.com/pusewicz/wave-function-collapse-dragonruby)\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Credits\n\nTileset: https://opengameart.org/content/consolidated-hard-vacuum-terrain-tilesets\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusewicz%2Fwave-function-collapse-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpusewicz%2Fwave-function-collapse-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusewicz%2Fwave-function-collapse-ruby/lists"}