Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Autonauts

Make and teach robots to automate the world! · By Denki

WIP: random map generator

A topic by Jumboman created Sep 11, 2017 Views: 1,027 Replies: 5
Viewing posts 1 to 6
(1 edit) (+1)

With the discovery of the unofficial map editor and seeing how save files are organized, I decided a fun programming exercise would be to try my hand at a random map generator. I'll post updates every now and then and eventually share the code. If anyone (with some experience in algorithms) has any ideas feel free to add. I would prefer to keep the whole thing memoryless for simplicity and elegance. 

The algorithm so far:

- generate some water pixels (purple)

- water pixels spread out X times with Y chance

- remove purple pixels that neighbor only 1 or 0 other purple pixels (repeat 5 times)

- generate some land pixels

- spread out land in all directions until can't spread no more

- fill in the oceans with purple

(+1)

update: added rivers. this is easy to do in netlogo, not sure yet how I will translate it to C# for the actual application...

(3 edits) (+1)

Update: I've worked out how to add objects to the map. Denki would you be so kind to briefly explain what ST, STT, and SM means/does? Am I correct that ST means "stage", STT means "milliseconds passed this stage"? SM I did not figure out. Right now when I start the map, the trees and grass have to grow first. What should I add to make them start fully grown?

Oh, and that means RMG v0.0.1 is now actually playable :D

Where's the water? :/

(1 edit)

woops, you're right. here there's water, and clay, and grass. Wheat is giving me some trouble still :(

edit: wheat is fixed it's weed that gives me trouble. But at least all the resources are now complete (i also added cows)

Is this still active?