fabio-t / terrain-generator Goto Github PK
View Code? Open in Web Editor NEWTerrain generation library, meant to be used either standalone or within a game.
License: Apache License 2.0
Terrain generation library, meant to be used either standalone or within a game.
License: Apache License 2.0
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).
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)
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.