All Projects → redblobgames → Mapgen4

redblobgames / Mapgen4

Licence: apache-2.0
Mapgen4 procedural wilderness map generator

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Mapgen4

Proceduraltoolkit
Procedural generation library for Unity
Stars: ✭ 1,729 (+805.24%)
Mutual labels:  procedural-generation
Df Style Worldgen
Fantasy Worlds Procedurally Generated
Stars: ✭ 130 (-31.94%)
Mutual labels:  procedural-generation
Ndwfc
🌊💥 N-dimensional Wave Function Collapse with infinite canvas
Stars: ✭ 159 (-16.75%)
Mutual labels:  procedural-generation
Rock Generator
C# rock generator
Stars: ✭ 118 (-38.22%)
Mutual labels:  procedural-generation
Graphmesh
Graph-based mesh modifiers.
Stars: ✭ 128 (-32.98%)
Mutual labels:  procedural-generation
Texturegenerator
3D and 2D Texture generation using the compute shaders within the Unity engine.
Stars: ✭ 142 (-25.65%)
Mutual labels:  procedural-generation
Hermit
A man. A horse. A nature.
Stars: ✭ 105 (-45.03%)
Mutual labels:  procedural-generation
Spheres
Methods to create a sphere mesh
Stars: ✭ 168 (-12.04%)
Mutual labels:  procedural-generation
Anothercraft
A Minecraft clone demo
Stars: ✭ 130 (-31.94%)
Mutual labels:  procedural-generation
Proceduralmapgenerator
A procedural map generator for roguelike games
Stars: ✭ 156 (-18.32%)
Mutual labels:  procedural-generation
Infinity Square Space
Infinity Square/Space. The prototype of the game is open source. Unity Asset.
Stars: ✭ 122 (-36.13%)
Mutual labels:  procedural-generation
Astraea
A planet generator inspired by Planetarium.
Stars: ✭ 126 (-34.03%)
Mutual labels:  procedural-generation
Ue4proceduralmesh
UE4.7 Procedural Mesh Generation plugin
Stars: ✭ 147 (-23.04%)
Mutual labels:  procedural-generation
Wfc python
An implementation of mxgmn/WaveFunctionCollapse in Python
Stars: ✭ 114 (-40.31%)
Mutual labels:  procedural-generation
Stylized Planet Generator
A stylized procedural planet generator written in Godot 3.0.
Stars: ✭ 166 (-13.09%)
Mutual labels:  procedural-generation
Improved Sapling Tree Generator
A new version of Blenders sapling tree generator addon with improvements, new features, and bug fixes
Stars: ✭ 107 (-43.98%)
Mutual labels:  procedural-generation
Stsmapgen
Procedural map generator inspired by Slay the Spire.
Stars: ✭ 136 (-28.8%)
Mutual labels:  procedural-generation
Territory
3D rendered proc-gen world test. C++ homebrew voxel engine for agent-driven prodedural generation / world simulation
Stars: ✭ 175 (-8.38%)
Mutual labels:  procedural-generation
Mapgen Viewer
Map generator based on Voronoi Diagram and Perlin noise
Stars: ✭ 169 (-11.52%)
Mutual labels:  procedural-generation
Cosmonium
3D astronomy and space exploration program.
Stars: ✭ 153 (-19.9%)
Mutual labels:  procedural-generation

#+title: Mapgen4 #+date: <2018-12-24>

[[http://unmaintained.tech/][http://unmaintained.tech/badge.svg]]

[[https://www.redblobgames.com/maps/mapgen4/][Mapgen4]] is a procedural wilderness map generator I wrote during 2017 and 2018. It's written in JavaScript and designed to:

  • run /fast/ enough to regenerate in real time as you paint terrain
  • look /pretty/ instead of generating realistic terrain

[[https://www.redblobgames.com/maps/mapgen4/blog/screenshot15-small.jpg]]

  • Install

If you like =yarn=:

#+begin_src sh yarn global add browserify yarn install make build/points-5.data yarn build #+end_src

If you like =npm=:

#+begin_src sh npm -g install browserify npm install make build/points-5.data npm run build #+end_src

Run python2 -m SimpleHTTPServer 8000 or python3 -m http.server 8000, then visit http://localhost:8000/embed.html in your browser.

  • Background

I have a [[http://simblob.blogspot.com/search/label/mapgen4][series of blog posts]] about how I made these maps:

  • [[http://simblob.blogspot.com/2018/08/mapgen4-goals.html][History]] of the project
  • [[https://www.redblobgames.com/x/1721-voronoi-alternative/][Alternative to Voronoi cells]]
  • [[https://www.redblobgames.com/x/1722-b-rep-triangle-meshes/][Compact data structure]] for the Delaunay+Voronoi mesh
  • [[http://simblob.blogspot.com/2018/08/mapgen4-elevation.html][Elevation]] to match the desired look instead of tweaking the look to match the elevation
  • [[http://simblob.blogspot.com/2018/09/mapgen4-elevation-painting.html][Distance fields for elevation]]
  • [[http://simblob.blogspot.com/2018/09/mapgen4-threads.html][Multithreading]] to make it run acceptably fast
  • Fixing the [[http://simblob.blogspot.com/2018/09/mapgen4-river-appearance.html][appearance of rivers]]
  • Revisiting [[http://simblob.blogspot.com/2018/09/mapgen4-elevation-painting-revisited.html][distance fields]], which didn't work out like I hoped
  • [[http://simblob.blogspot.com/2018/09/mapgen4-rainfall.html][Rainfall]], biomes, evaporation, wind
  • Rendering with an [[http://simblob.blogspot.com/2018/09/mapgen4-oblique-projection.html][oblique projection]], not the standard rotate+translate+scale
  • Rendering [[http://simblob.blogspot.com/2018/10/mapgen4-outlines.html][outlines]]
  • Some [[http://simblob.blogspot.com/2018/09/mapgen4-bug-fixes.html][bug fixes]]
  • River [[https://www.redblobgames.com/x/1723-procedural-river-growing/][generation]] and [[http://simblob.blogspot.com/2018/10/mapgen4-river-representation.html][data structures]]

It's a continuation of ideas I developed for [[https://github.com/amitp/mapgen2/][mapgen2]] back in 2010, but at a much larger scale. The underlying code can support 1 million+ Voronoi cells (change =spacing= in config.js to 0.7), including [[https://www.redblobgames.com/maps/mapgen4/blog/3565944-triangles-600kregions.png][a very detailed river network]], but the rendering code and other parameters are designed to look prettiest around 25k cells.

There's plenty more that could be done to make it even faster and prettier. There are plenty of features that could be added, such as [[https://www.redblobgames.com/x/1723-procedural-river-growing/#draw][drawing your own rivers]], [[https://www.redblobgames.com/x/1843-planet-generation/][sphere output]], [[https://www.redblobgames.com/x/1736-resource-placement/][natural resources]], towns, forests, names, roads, and nations, but I'm leaving those for a future project.

  • License

Mapgen4 and helper libraries I wrote (dual-mesh, prng) are licensed under Apache v2. You can use this code in your own project, including commercial projects.

The map generator uses these libraries:

  • [[https://github.com/mapbox/delaunator.git][Delaunator]] from MapBox is licensed under the ISC license.
  • [[https://github.com/kchapelier/poisson-disk-sampling][poisson-disk-sampling]] from Kevin Chapelier is licensed under the MIT license.
  • [[https://github.com/jwagner/simplex-noise.js][simple-noise]] from Jonas Wagner is licensed under the MIT license.
  • [[https://github.com/mourner/flatqueue][flatqueue]] from Vladimir Agafonkin is licensed under the ISC license.
  • [[https://github.com/mikolalysenko/hash-int][hash-int]] from Mikola Lysenko is licensed under the MIT license.

The rendering code uses these libraries:

  • [[https://github.com/regl-project/regl][regl]] from Mikola Lysenko is licensed under the MIT license.
  • [[https://github.com/toji/gl-matrix][gl-matrix]] from Brandon Jones, Colin MacKenzie IV is licensed under the MIT license.

The build step uses:

  • [[https://github.com/browserify/browserify][Browserify]] + [[https://github.com/substack/webworkify][Webworkify]] are licensed under the MIT license.
  • [[https://github.com/hughsk/uglifyify][Uglifyify]] from Hugh Kennedy is licensed under the MIT license.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].