This library was created with inspiration from @Durango. Currently, this toolkit only has a small amount of functions that relate to 2D int-array manipulation and rendering. However, in the future I hope to grow this project to support a significant amount of random/procedural generation algorithms that can be implemented as-is in your project or be used as a sample for implementation and execution of these algorithms.
Todo
Example stretching
ProceduralData procArray = new ProceduralData(20, 20, "stretch");
Pair[] pairs = Neighborhood.DONUT.getPairs(5);
for (Pair pair : pairs) {
procArray.set(pair.x + 10, pair.y + 10, 1);
}
procArray = Resize.stretch(procArray, 1.0f, 1.5f);
print(procArray, PrintMethod.SYMBOLS);
Example detecting and isolating blobs with size > 3
ProceduralData procArray = new ProceduralData(10, 10, "blobs");
procArray.noise(.45f, 1);
procArray.findBlobs(new BlobData()
.filter(BlobData.BlobFilter.ABOVE, 3)
.overwriteGiven(true)
.render(BlobData.BlobRender.ONE));
print(procArray, PrintMethod.SYMBOLS);
For more examples and usage, please refer to the Wiki.
If running Gradle, simple put the following into your build.gradle
repositories {
maven { url 'https://jitpack.io' }
}
...
dependencies {
compile 'com.github.Ktar5:ProcLib:master-SNAPSHOT'
}
Or if you are running Maven, put the following into your pom.xml
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
...
<dependency>
<groupId>com.github.Ktar5</groupId>
<artifactId>ProcLib</artifactId>
<version>master-SNAPSHOT</version>
</dependency>
- None yet
Todo
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
Carter Gale – @Ktar5 – [email protected] – Github