Random map generator
Moderator: Moderators
Random map generator
Is it possible to make a rm genator. like age of empire`s.
Re: Random map generator
if you used forum search you will see that the idea was discussed and dev thought about doing it.
Re: Random map generator
thankssmoth wrote:if you used forum search you will see that the idea was discussed and dev thought about doing it.
Re: Random map generator
no problem, no way in hell you new guys would know all the crap that has been discussed over the years but don't let that stop you from making suggestions, maybe a dev will read your post and want to restart the effort.
In the future, if you want a feature added you should probably post in the feature request subforum.
In the future, if you want a feature added you should probably post in the feature request subforum.
Re: Random map generator
SJ actually made it and released a handful of random maps
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Random map generator
(quantum originally suggested) even more interesting would be the ability to randomly generate a map right when the game starts and hide all terrain, features, metal spots, etc. from your starting view so that it's a new game every time and requires exploration.
Re: Random map generator
he was asking for in game generation.AF wrote:SJ actually made it and released a handful of random maps
Re: Random map generator
sounds like Age of Empires.CarRepairer wrote:(quantum originally suggested) even more interesting would be the ability to randomly generate a map right when the game starts and hide all terrain, features, metal spots, etc. from your starting view so that it's a new game every time and requires exploration.
Re: Random map generator
He never specified in or out of game. Either way if you wish to play semantics we can always hook SJs program into the lobby and not show the resulting map to the player till they're ingame.smoth wrote:he was asking for in game generation.AF wrote:SJ actually made it and released a handful of random maps
Re: Random map generator
He did specify however that it had a running time of over 4 hours, IIRC, to generate one map. Also it did not generate a random map from scratch, you had to give it various inputs.
viewtopic.php?t=4885
viewtopic.php?t=4885
Re: Random map generator
Indeed, inputs can be generated randomly too but meh 4 hours
Re: Random map generator
If the maps were not that big, we could think about some sort of a map server.
The lobby client of the host downloads a random (or random generated) map from there and tells the other client in a hidden way, which file to download.
But i agree this is practically not achievable.
The lobby client of the host downloads a random (or random generated) map from there and tells the other client in a hidden way, which file to download.
But i agree this is practically not achievable.
Re: Random map generator
if we had sm3.. or splatting in general..
- Felix the Cat
- Posts: 2383
- Joined: 15 Jun 2005, 17:30
Re: Random map generator
A big problem is that the random map generator doesn't know how each game operates. It can read the mod file and so has access to max slope traversal, etc., but it has no idea what the balance implications of each slope level are.
For example, imagine a game with no air units. All units have a maxslope of 50, except that each side's unarmed builder unit has a maxslope of 100. How would the generator know that generating a cross-map ridge of 75 slope would be a bad idea?
Clearly this case could be solved with a sufficiently intelligent map generator, but it's a simple example case to illustrate the concept that since the engine doesn't know the properties of the games that will be played on it, a map generator is not feasible.
Game teams are free to mod the engine to include a map generator suitable to their game; the best way to support map generation without forcing game teams to mod the engine would probably be an API for game teams to program their own map generators, to be packaged with the game.
For example, imagine a game with no air units. All units have a maxslope of 50, except that each side's unarmed builder unit has a maxslope of 100. How would the generator know that generating a cross-map ridge of 75 slope would be a bad idea?
Clearly this case could be solved with a sufficiently intelligent map generator, but it's a simple example case to illustrate the concept that since the engine doesn't know the properties of the games that will be played on it, a map generator is not feasible.
Game teams are free to mod the engine to include a map generator suitable to their game; the best way to support map generation without forcing game teams to mod the engine would probably be an API for game teams to program their own map generators, to be packaged with the game.
Re: Random map generator
Its pretty simply to make a 'randomish' map thats just randomly lumpy.
The major objection i got from CA lua devs is it would take ages to randomize the map (changing the height map etc).
But i dont feel this is correct, spawn 4 adv fusions randomly around the map and blow them up, there is perhaps a second or two of lag while the terrain deforms, at most, and will deform most small maps into a totally unrecognizable shape.
The major objection i got from CA lua devs is it would take ages to randomize the map (changing the height map etc).
But i dont feel this is correct, spawn 4 adv fusions randomly around the map and blow them up, there is perhaps a second or two of lag while the terrain deforms, at most, and will deform most small maps into a totally unrecognizable shape.
Re: Random map generator
Setting the heightmap takes 20sec alone on my 2.5+GHz, with a simple sincos random function it already takes 1min.
Re: Random map generator
we could use simpler maps.
Re: Random map generator
I could set the heightmap in a reasonable time. I did have trouble creating passable slopes, but it's just a matter of tuning the parameters.
Re: Random map generator
As I'd discussed with some springers (fairly sure quantum was
one of them), one of the better ways to do randoms maps
would be to setup a separate lua script with call-outs tailored
to that particular task. I'd actually started down this path at
one point (which was also combined with a new map format).
If you throw in transformations and mask layers, you get a
powerful map editing API. Several other functions are probably also
desirable (copy area, sinusoidals, lorentzian, mirroring, etc...) You
could also specify tile sets and tile positions in the same file.
one of them), one of the better ways to do randoms maps
would be to setup a separate lua script with call-outs tailored
to that particular task. I'd actually started down this path at
one point (which was also combined with a new map format).
Code: Select all
local xsize = 2048
local ysize = 4096
local xmid = xsize * 0.5
local ymid = ysize * 0.5
local heightmap = Map.CreateArray(xsize, ysize)
local metalmap = Map.CreateArray(xsize, ysize)
heightmap:Set(0, 0, xsize, ysize, 0)
heightmap:Gaussian(xmid, ymid, 50, xsize * 0.25, size * 0.25)
heightmap:Noise(0, 0, xsize, ysize, 8)
heightmap:Smooth(0, 0, xsize, ysize, 16)
heightmap:Add(100, 100, 200, 400, 32)
metalmap:LoadImage('metalmap.jpg') -- b/w conversion
return {
heightmap = heightmap,
metalmap = metalmap,
}
powerful map editing API. Several other functions are probably also
desirable (copy area, sinusoidals, lorentzian, mirroring, etc...) You
could also specify tile sets and tile positions in the same file.
Re: Random map generator
One problem with these run-time map generators is that what happens to the map? Will it be saved on your harddisk? After playing those games a lot, you might have loads of random maps in your maps folder, maybe thousands... And to watch replays, you need the map too.
I think the random map should be saved, but not in the same format as other maps, just the map generator "script" would be saved, or what ever it is made to...
I have though of making that random generator many times, but never really had time to waste in thinking about it :/ Its interesting programming concept... if you want to make it enough fast i mean... like not take more time than 10-20 seconds in generating one map etc...
I think the random map should be saved, but not in the same format as other maps, just the map generator "script" would be saved, or what ever it is made to...
What the hell, you using PHP or what? heightmaps are like 1024x1024 size usually, or twice bigger... not so big to take 1 minute processing for simple sincos calculations on it o_O i cant believe that... i could make random noise blurred in 1 second (or less) to 2048x2048 image, and for bumps you really dont need sincos calculations, just blur and some random noise shit in it :DjK wrote:Setting the heightmap takes 20sec alone on my 2.5+GHz, with a simple sincos random function it already takes 1min.
I have though of making that random generator many times, but never really had time to waste in thinking about it :/ Its interesting programming concept... if you want to make it enough fast i mean... like not take more time than 10-20 seconds in generating one map etc...