Procedural 1-bit map maker

Published 2023-06-12


A simple 1-bit procedural map generator with coastlines, rivers, mountains and forests.

⬆️⬇️⬅️➡️ - Move camera
❎🅾️ - Zoom in an out
TAB - Enter forge, create a new world

This started life as a tweet cart and creeped in scope a bit until it became what you see now.

There's a UI to play with the numbers, if you'd like to modify these values outside the boundaries I've set, check out the vals object array near the start of the file.

The world is created from a vornoi diagram, mountains are placed along cell boundaries and forest in cell centre points.

World name generated has been pilthered from this post from The Collaborative Gamer

If you comment out the pal calls at the start of draw_world() you'll see a more colourful version of the world, but I much prefer the 1 bit style personally.

Please feel free to remix or adapt this code in any way you see fit :)