Lua port of Amit Patel's Polygonal Map Generation for Games
See a demo of how it works here.
Amit's algorithm creates an interesting procedurally-generated island map featuring coastlines, various biomes, and rivers through Voronoi polygons and Delaunay triangulation (I also added roads, which run perpendicular to rivers along certain elevations). I ported this algorithm for generating procedural Island worlds for a massively-multiplayer 3D game I was making called Voxrealms. The game is no longer maintained by me, and I am releasing this code so other developers using Lua can generate maps for their games.
Read more about how the algorithm works here.
Create a new randomly-generated IslandMap:
local IslandMap = require(**IslandMap Script Location**)
local island = IslandMap:new() --Creates a new IslandMap
island:go() --Starts the procedural generation (if IslandMap:go() is called again, it will generate a completely new map)
The island
variable now contains the graph structure of polygons for your procedural Island world, and you may use the data within to construct your new island for your game.
This code is Open Source. Zero Rights Reserved.