Page 1 of 1

Random map generator

Posted: Sat Jul 23, 2011 3:27 pm
by machiavelli
Hi,

I stumbled across OpenRA a couple of weeks back and have really enjoyed the retro nostalgia of my '90s gaming days. Great job!

One feature I was hoping to see in OpenRA, but have as yet been unable to find, is a random map generator. Is this something hidden somewhere, or something planned?

Obviously random maps are a great way of ensuring replayability.

Some thoughts on the parameters for setting up random games:

map dimensions
% water vs % land
% of land covered by tiberium/ore
% of land covered by gems
number of blossom trees/ore mines
% of land covered by rivers
% of land covered by trees
% of land covered by rocks
% of land covered by cliffs
number of bridges
number of causeways
islands vs interconnected land

I was also wondering whether it would be possible to change the starting units (be able to chose how many of each unit type), tech level and number of starting positions (e.g. being able to start in two locations simultaneously, and build two bases concurrently).

Anyway, just some thoughts. Thanks again for the game.

Nic

Posted: Sun Jul 24, 2011 8:22 pm
by Harisson
I think, it's unreal, because OpenRA don't use autotiles, only 2D images.

Posted: Sun Aug 07, 2011 12:31 pm
by machiavelli
You're right that the use of images rather than autotiles would make programming a random map generator much more of a challenge, but certainly not impossible. The random map generator would need to be programmed with what images can go next to what other image, so that they match. e.g. a particular ridge image can only be placed next to another ridge image.

Posted: Mon Aug 08, 2011 6:20 am
by hamb
I'll just throw a spin on things here for a moment

At some point someone made a .BMP file -> OpenRA map converter. You fed it a BMP and it drew a map.

For example, you created a 128x128 BMP file - used green pixels for terrain & blue pixels for water, and it transposed it into a map 1:1.

The main problem it had though, was it couldn't support complex shorelines. I believe it could do corners, and it did simple flat shorelines just fine. You could enable or disable the option to generate shorelines.

Something similar to this could be used in generating a random map. I'm imagining that terrain tiles could be generated, and the player would have to add the shores themselves. No idea about generating ore patches, cliffs, etc, but I imagine that a generator could produce something that could be massaged into a nicer looking map.

Posted: Mon Aug 08, 2011 9:14 am
by BaronOfStuff
IIRC, that was Holloweye's creation.