All Projects → amitp → Mapgen2

amitp / Mapgen2

Licence: other
Map generator for games. Generates island maps with a focus on mountains, rivers, coastlines.

Programming Languages

actionscript
884 projects
procedural
45 projects

Labels

Projects that are alternatives of or similar to Mapgen2

Openlayers
OpenLayers
Stars: ✭ 8,612 (+624.92%)
Mutual labels:  maps
Gwt Ol
GWT wrapper for OpenLayers 3+ using JSInterop
Stars: ✭ 57 (-95.2%)
Mutual labels:  maps
Easymap
Ready to use Address Selection Library using Google Maps and Places API.
Stars: ✭ 66 (-94.44%)
Mutual labels:  maps
Pgo
Go library for PHP community with convenient functions
Stars: ✭ 51 (-95.71%)
Mutual labels:  maps
Mapscanner
R package to print maps, draw on them, and scan them back in
Stars: ✭ 55 (-95.37%)
Mutual labels:  maps
Explorer
WorldWindExplorer: A 3D virtual globe geo-browser app framework based on WorldWindJS, Bootstrap and KnockoutJS. Includes 3D globe and 2D map projections, imagery, terrain, markers, plus solar and celestial data.
Stars: ✭ 59 (-95.03%)
Mutual labels:  maps
V3 Utility Library
Utility libraries for Google Maps JavaScript API v3
Stars: ✭ 1,047 (-11.87%)
Mutual labels:  maps
Editor
An open source visual editor for the 'Mapbox Style Specification'
Stars: ✭ 1,167 (-1.77%)
Mutual labels:  maps
Caranimation
A sample project about car animation in a route
Stars: ✭ 55 (-95.37%)
Mutual labels:  maps
Curve Fit
Curve-Fit is an Android library for drawing curves on Google Maps
Stars: ✭ 63 (-94.7%)
Mutual labels:  maps
Leaflet Swoopy
⤵️ Swoopy Arrow Plugin for Leaflet
Stars: ✭ 52 (-95.62%)
Mutual labels:  maps
Geotiff.io
Static website for viewing and analyzing GeoTIFF's in the browser
Stars: ✭ 53 (-95.54%)
Mutual labels:  maps
Magrit
♠ Thematic cartography ♠
Stars: ✭ 60 (-94.95%)
Mutual labels:  maps
Lenz
Console based MAP 🗺 : with lots of features 🤩
Stars: ✭ 51 (-95.71%)
Mutual labels:  maps
1843 Planet Generation
One week experiment: learn how to procedurally generate maps on a sphere. Code is messy but it runs.
Stars: ✭ 66 (-94.44%)
Mutual labels:  maps
Khartis
Khartis - thematic mapping
Stars: ✭ 49 (-95.88%)
Mutual labels:  maps
Geo Maps
🗺 High Quality GeoJSON maps programmatically generated.
Stars: ✭ 1,098 (-7.58%)
Mutual labels:  maps
Openmaptiles
OpenMapTiles Vector Tile Schema Implementation
Stars: ✭ 1,175 (-1.09%)
Mutual labels:  maps
Making Maps With React
🌐 Example React components for React-Leaflet, Pigeon Maps, React MapGL and more
Stars: ✭ 66 (-94.44%)
Mutual labels:  maps
Ol Games
🎮 Game stuff for Openlayers, powered by HTML5, canvas, javascript and Openlayers.
Stars: ✭ 61 (-94.87%)
Mutual labels:  maps

No Maintenance Intended

After working on a Perlin-noise-based map generator I had wanted something with islands and rivers and volcanoes and lava. However, I had a lot of trouble getting that map generator to generate any more than what it did at first. This project was my exploration of several different techniques for map generation.

The goal is to make continent/island style maps (surrounded by water) that can be used by a variety of games. I had originally intended to write a reusable C++ library but ended up writing the code in Actionscript.

The most important features I want are nice island/continent coastlines, mountains, and rivers. Non goals include impassable areas (except for the ocean), maze-like structures, or realistic height maps. The high level approach is to

  1. Make a coastline.
  2. Set elevation to distance from coastline. Mountains are farthest from the coast.
  3. Create rivers in valleys, flowing down to the coast.

The implementation generates a vector map with roughly 1,000 polygons, instead of a tile/grid map with roughly 1,000,000 tiles. In games the polygons can be used for distinct areas with their own story and personality, places for towns and resources, quest locations, conquerable territory, etc. Polygon boundaries are used for rivers. Polygon-to-polygon routes are used for roads. Forests, oceans, rivers, swamps, etc. can be named. Polygons are rendered into a bitmap to produce the tile map, but the underlying polygon structure is still available.

The full process is described here.

History

  • I started out with C++ code that used mountains, soil erosion, water flow, water erosion, water evaporation, volanoes, lava flow, and other physical processes to sculpt terrain expressed in a 2d array of tiles. However as described in this blog post I decided to abandon this approach.

  • Since my initial approach failed, I wrote several small prototypes to figure out how to make rivers, coastlines, and mountains. These are the key features I want to support. I will then figure out how to combine them into a map.

  • The voronoi_set.as prototype worked well and I continued adding to it (instead of converting to C++). It supports terrain types: ocean, land, beach, lake, forest, swamp, desert, ice, rocky, grassland, savannah. It has rivers and roads. I decided not to convert it to C++ for now. Instead, I've refactored it into the core map generation (Map.as), display and GUI (mapgen2.as), graph representation (graph/*.as), decorative elements (Roads.as, Lava.as), and noisy edge generation (NoisyEdges.as).

Requirements

These third-party requirements have been added to the third-party directory:

Make sure you run git submodule update --init to check out the third-party libraries.

Compiling

To compile mapgen2.as to mapgen2.swf, use the following command:

mxmlc -source-path+=third-party/PM_PRNG -source-path+=third-party/as3delaunay/src -source-path+=third-party/as3corelib/src mapgen2.as
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].