https://github.com/irzinfante/wfc4j
Library to use the Wave Function Collapse strategy for procedural generation
https://github.com/irzinfante/wfc4j
game gamedev games java11 library procedural procedural-content-generation procedural-generation tilemap tiles wavefunctioncollapse wfc
Last synced: 6 months ago
JSON representation
Library to use the Wave Function Collapse strategy for procedural generation
- Host: GitHub
- URL: https://github.com/irzinfante/wfc4j
- Owner: irzinfante
- License: agpl-3.0
- Created: 2023-04-15T18:54:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T18:21:46.000Z (almost 2 years ago)
- Last Synced: 2025-02-03T05:02:57.574Z (over 1 year ago)
- Topics: game, gamedev, games, java11, library, procedural, procedural-content-generation, procedural-generation, tilemap, tiles, wavefunctioncollapse, wfc
- Language: Java
- Homepage:
- Size: 381 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wfc4j - The Wave Function Collapse library for Java
The ```wfc4j``` library is a Java library that provides an implementation of the wave function collapse algorithm for procedural generation of content. This library can be used to generate a wide variety of content, such as tile maps, textures, and patterns.
## Installation
To use the ```wfc4j``` library in your Java project, you can include the library as a dependency in your build configuration. Here's an example of how to do it with Maven:
```xml
dev.irzinfante
wfc4j
1.0.0
```
Alternatively, you can download the library JAR file manually and add it to your project's classpath.
## Examples
Here are some examples that demonstrate the usage of the different API of the library:
- 1-dimensional:
- [Euclidean (linear grid)](examples/1-dimensional-euclidean.md)
- [Toroidal (cyclic grid)](examples/1-dimensional-toroidal.md)
- 2-dimensional:
- [Euclidean (planar grid)](examples/2-dimensional-euclidean.md)
- [Toroidal (toroidal grid)](examples/2-dimensional-toroidal.md)
## License
Copyright (C) 2023-2024 Iker Ruiz de Infante Gonzalez iker@irzinfante.dev
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see .
[LICENSE](LICENSE) contains a copy of the full AGPLv3 licensing conditions.
## Acknowledgments
The ```wfc4j``` library is inspired on Dan Shiffman's [Coding Challenge 171: Wave Function Collapse](https://youtu.be/rI_y2GAlQFM) video, which is based on the original [Wave Function Collapse Algorithm](https://github.com/mxgmn/WaveFunctionCollapse) developed by Maxim Gumin.