Git Product home page Git Product logo

terrain-generator's People

Contributors

fabio-t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vrum einastir

terrain-generator's Issues

Improve SimplexNoise class

  • it may have been updated (may 2016) http://webstaff.itn.liu.se/~stegu/simplexnoise/SimplexNoise.java

  • it currently does not support any seeding. A simple approach could be to set xmin and ymin to a specific random value instead of zero, when generating a heightmap (of course only if seeding has been requested by the user). This makes it easy to check for boundaries (eg, ymin = xmin = rand.nextInt(0, Float.MAX - Math.max(width, height)) or something like that).

TODO

API

TerrainGenerator class. Instantiate, then add some modifiers/constraints (we provide some, user can write others), then finally build() to get a final instance containing all required things. Could work fine.

In general, we'll only support a 2D grid plus heightmap, initially. So the user must specify width and height, if it must be island-shaped or not (it would be great to generalise constraints so that the users can provide their own). Then to make the heightmap we need the usual scale/persistence/lacuness for the noise. Might have to see if I can support a toroidal world (if should be possible for 2D maps with 3D noise).

Finally we should also provide a "threshold" object/map to make a coloured 2D image output.

(we could also have a "lazy generator" where the map is NOT actually created all at the same time, but in blocks when the user asks for it. Not sure we need it though)

App

Lower priority, but: make a command line utility to quickly create a "terrain package" (to be defined what this means). Eg, saving image and heightmap should be enough.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.