https://github.com/darkpurple141/maps
This is a sub-repository of some work I did on creating a map-generating framework.
https://github.com/darkpurple141/maps
games graphics mapgeneration maps python voronoi
Last synced: 5 months ago
JSON representation
This is a sub-repository of some work I did on creating a map-generating framework.
- Host: GitHub
- URL: https://github.com/darkpurple141/maps
- Owner: DarkPurple141
- License: gpl-3.0
- Created: 2017-01-18T09:15:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-01T07:22:52.000Z (about 8 years ago)
- Last Synced: 2025-04-30T03:47:09.763Z (5 months ago)
- Topics: games, graphics, mapgeneration, maps, python, voronoi
- Language: Python
- Size: 141 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Maps
This is a sub-repository of some work I did on creating a map-generating framework. The code is pretty rough in parts; I was figuring it out as I went. I tried to clean it up toward the end with some success, although it's still far from optimised.For more read this:
https://medium.com/@al_hinds/making-dem-maps-fa2187b70c8b#.744ldhpov## Dependencies
+ Build is in Python 3
+ numpy, PIL are required for present build
* pip3 install numpy, pillow will deliver the goods
* pygame is only required for rendering, however this could be altered to matplot if required## Usage
Voronoi.py is the core map generating code.
+ There's a setup() function which can take a number of different arguments based on the type of map, size, polygon count required. If you're just starting out, I'd suggest use the default setup function.## Classes
The major classes are Corner, Point, Polygon, Triangle.
+ Polygons control terrain type and are the output from the core generation code.
+ Points/Corners hold some key pathing information, and are used for roads, rivers.