Log In  


Cart #procmapmaker-0 | 2023-05-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
28

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

Controls

⬆️⬇️⬅️➡️ - 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 :)

28


1

This is beautiful, and the zoom-dependent level of detail in the drawing is really slick.


1

That is soooo cool. I love watching it being drawn in real time.


1

Really nice! 🌟


Love the zoom. So cool to see details.


excellent! would be perfect in a rpg type game



[Please log in to post a comment]