Skip to content
/ ProcLib Public

A procedural content generation library written in Java. #InDevelopment

License

Notifications You must be signed in to change notification settings

Ktar5/ProcLib

Repository files navigation

ProcLib


Header

A procedural content generation library for use in Java with support for LibGDX

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.

Examples

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.

Installation

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>

Release History

  • None yet

Contributing

Todo

  1. Fork it (https://github.com/yourname/yourproject/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request



Carter Gale – @Ktar5[email protected]Github

About

A procedural content generation library written in Java. #InDevelopment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages