Ktar5 / ProcLib

A procedural content generation library written in Java. #InDevelopment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 – @Ktar5ktarfive@gmail.comGithub

About

A procedural content generation library written in Java. #InDevelopment

License:Creative Commons Attribution 4.0 International


Languages

Language:Java 100.0%