Page 1 of 1

loony bin

Posted: 20 Apr 2015, 12:49
by eronoobos
maybe if i let you know i'm making this randomly generated crater map, i'll finish it sometime:
https://github.com/eronoobos/loony-bin

i just need to add radial FFA map symmetry (right now if there's an uneven number of allyteams, the map will be totally asymmetrical, i.e. probably unfair). and maybe optimize the map generation (or as gajop suggests, make it GLSL-based). currently it takes forevs (a minute or two on this i5 from 2012).

oh yeah, and making an actually random map every time instead of having to change the random seed through a map option would be nice, but i'm fairly convinced this isn't possible. i could certainly wait to generate the map based on the gameID, but then, because of the late timing, all the players wouldn't be able to see the heightmap until they explore it, and i'm not sure the pathfinder would know what's going on.

Image

https://www.youtube.com/watch?v=b6KDGHNpYXU

Re: loony bin

Posted: 25 Apr 2015, 03:40
by eronoobos
i'll keep muttering to myself here

The map is finally random each time based on gameID. Apparently the pathfinder is fine with changing the heightmap at that time, because units do go around the craters when it's a better choice.

To get around nobody being able to see all the new terrain, i made a unit with 99999 sightradius, that spawns before the heightmap changes, and is destroyed quietly when the game starts. I think there may be a limit to sightradius? Even at 99999 and spawning it at 1000 altitude, it could not see the corners of the map. I had to spawn one in each corner (for each team).

Also added radial symmetry for any number of allyteams other than 2 or 4. Radial maps get a big crater in the middle, because the mirror-overlap blocking in the middle of such maps tends to make the center empty otherwise.

5-allyteam radial map:
Image

Re: loony bin

Posted: 25 Apr 2015, 09:27
by Google_Frog
Looks good. Although, why does the heightmap need to be visible at the start of the game for a random map?

Re: loony bin

Posted: 25 Apr 2015, 09:43
by gajop
Google_Frog wrote:Looks good. Although, why does the heightmap need to be visible at the start of the game for a random map?
It looks weird while you "discover" it otherwise. Mountains would get cut off in blocks between the visible/invisible parts.

Re: loony bin

Posted: 25 Apr 2015, 12:48
by eronoobos
Exactly, it looks like this:
Image

It would be cool to have an unknown/explorable map, but it would need some sort of fog effect (widget) to make it not look awful.