Neroxis Map Generator
-
New Map Generator UI!
With Downlord's Client 1.1.9 the map generator has gained a new UI for generating maps with user specified terrain options.
In order to GENERATE and PLAY maps which utilize the UI options you MUST HAVE Downlord's Client Version 1.1.9 or higherThe following options are available as inputs to map generation:
Number of Spawns: Number of spawn points the map is generated with. Supports 2 to 16 players. Currently only supports balanced team spawns.
Map Size: Size of the map to be generated. Only supports square maps (5km, 10km and 20km).
Water: The probability/amount of water appearing on the map
Plateaus: The probability/amount of plateaus appearing on the map
Mountains: The probability/amount of mountains appearing on the map
Ramps: The probability/amount of ramps appearing on the map (Note: Ramps are the connections between plateaus and ground level)It is also now possible to regenerate a map by using the name of the form neroxis_map_generator_(version)(seed)(options)
This can also be utilized to specify the options directly. The format for parsing the options from the map name can be found in the source.Client Version 1.1.9 also supports watching replays of generated map games
Notes:
- Generation time increases with map size. Optimizations are underway.
- Generating 16 player 5km maps may occasionally fail due to space constraints. If this occurs generate with new seed.
- Map Terrain Generation originally optimized for 10km maps. Optimization for 5km and 20km maps still underway.
- Terrain control options are not a guarantee that a certain amount of that feature will be present in the generated map. They are used for initial seeding only.
- Maps with mostly water will generate water mexes where possible rather than clumping mexes on small amounts of land
- Map Generation not supported on the python client
- Maps Generated Names of the form neroxis_map_generator_(version)_(seed) where seed is numeric will be compatible with older clients
Feel free to stop by the Map Generator Discord: https://discord.gg/XZW62UdYfm
Additionally new features have been added and are included below
Version 1.0.10
- Unit Wrecks now spawn as reclaim (T1-T3 Land, T2 Destroyers, T2 Navy Factories)
- New Symmetries Added (Symmetries: X, Y, XY, YX, QUAD, DIAG, POINT)
- Reclaim Generation Improved (Added cliff rocks and variation of placement)
- Mex Expansions Added (Expansions of 2-4 mexes randomly placed on map)
- Support Mexes Added (Each Base will have 1-3 support mexes nearby)
- Generate previews with better coloring and lighting
- Guarantee space for base building at spawn points
- Odd/Even Teams are guaranteed on all maps and represent mirror positions
As always if you have any suggestions for features of the map generator please comment in this thread.
If a generated map has issues please let me know by messaging me with the map name so that the cause can be investigated. -
I am happy to announce that the map generator is now compatible with Sorian AI as all generated maps will also generate the required pathing AI markers as well as expansion markers for mex expansions. Future releases will include other strategic AI Markers as well. As always you can view the full change log for all releases at https://github.com/FAForever/Neroxis-Map-Generator/releases
-
Badass! Can I make a recommendation for two future features?
Feature 1: Asymmetric map. Ideally, the landmass should be asymmetric to make it more interesting (but the mex distribution can still be fair.) I can also propose a basic mechanism for identifying "fair" mex distribution: A scoring system that ranks mex by proximity. For example, you could use three areas - Within 20 units from spawn, within 120 units from spawn, and within 500 units from spawn. Mex within 20 are worth 3 points, mex within 120 are worth 2, and mex within 500 are worth 1. You should run the calculation from all player small circles first, then all player medium circles, then all large circles. And don't count any mex twice (Player 1's mex shouldn't count in Player 2's total.)
Feature 2: Asymmetric spawn assets. FAF normally just spawns an ACU per player. To make a more interesting (and unranked) game style, you could provide a small base to players on one side of the map and a small mobile force to players on the other side. Mapgen should probably have to generate 4 bases per player, one for each faction, and then spawn whichever of the four that matches the player's selected faction.
As an aside, feature 2 (along with the map marker generator) would work as a precursor component to a single player/coop mission generator.
-
Soon TM is today as with the newest server updates games on generated maps are now ranked
-
Loving the map generator so far! As a new player I've been making a new map for each play to practice against AI as I get the build orders down and learn hotkeys etc.
Some of the maps have been amazing; is there any way to save them to play on again another day?
Also is there a reference for using the feature neroxis_map_generator_(version)(seed)(options) preferably with some examples?
-
The map name is the seed for the generated map so as long as you save the map name you can put it into the text box when generating a map and you will get the same map as before.
Currently there aren't any references as this is mostly present to allow for recreation of previously generated maps.
-
Ah, gotcha; I'll have to make a screenshot library of my favorite map names then which works just fine for me.
Thanks!
-
@FunkOff In order to have procedural generation of "fair" asymmetric maps I think we would need much more advanced AI, similar to what DeepMind did with StarCraft II. If there were highly-skilled AIs that could duel it out on maps thousands of times, it would become possible to programmatically test what kind of asymmetric distributions are fair vs. unfair. An AI map-making agent could learn from those experiments how to develop "fair" asymmetric maps.
Before anyone attempts to make a mapgen that creates fair asymmetric maps, maybe we should create a few by hand? Perhaps we need a map-making tournament for people to create some "fair" 1v1 or 2v2 maps that have significant amounts of asymmetry? I'm talking about significantly more asymmetry than just "the map is symmetrical but there is an island in the middle with kind of a bean shape."
If the financial incentive was big enough, people might participate. I personally would like to see "fair" asymmetrical maps become part of the ladder pool. I think it looks nice when maps aren't always mirrored and probably makes for more interesting games. Since the ladder pool is already divided by rating, we could just remove the asymmetrical maps from the 1700+ pool (where small differences might affect game outcomes in a significant way).
if anyone with less skill complained, we could just blame the victim. If someone said "I have 1340 rating and I lost a ladder match on Asymmetrical River Map, get rid of asymmetrical maps from the ladder pool" we could say "I watched the replay and you made these 3 obvious embarrassing mistakes, git good noob"
-
Heya I've been playing lots of 1v1s lately and its making great maps. Would be nice to have options for reclaim. Also there never seems to be an reclaim-less maps.
-
I'm the one he's playing with and second this. It would be cool to have sliders for reclaim and also civilians, which are occasionally generated randomly.
Mapgen map pool one day? Just a thought...
-
I dont know what the reclaim values are like at the moment but it would be nice to have very rarely a big-mass dump in the middle
-
also I've only seen one type of civilian base, it would be interesting to have more
-
On some maps it is hard to tell where you can walk or not, which is critical for early build decisions.
For example this replay I realise early on that there is only one chokepoint on the map so I dont defend the expansion even though it looks open. The other player doesnt realise the choke points, and at minute 7 is defending an expansion that is not under threat - and has less units than me in the middle. So I can get an advantage that is game defining but not fun at all. https://replay.faforever.com/13282178.
What would be cool is if there was a way to visualize where you can walk.
It is possible to generate a useful 'strategic overlay' image where red is unpathable, blue is underwater, etc. Then you can put the image on the screen as a decal and change the LOD so that it only appears when totally zoomed out. In this screenshot you can see one i made manually. It's not perfectly positioned but you can see its marking red & yellow where you cant walk and white where you can walk.
Not sure if its possible but perhaps a shortcut key could toggle the decal on and off.
This feature would be useful for all maps to be honest (including non mapgen) but with mapgen its much more important because you dont know the map before you play it. It's no fun to spend 15 minutes on a dud game because one player fatally misunderstood the map.
-
@nine2
Perhaps something like cartographic mode but with either finer elevation lines, or slope?I wonder if it is possible to mod this.
-
Ah nice point. The cartographic shader already renders lines based of slope. We just need to make it more selective. You can sort-of-mod shaders because they are cached and you can overwrite the cache. Now we just need a shader author...
-
maybe randomizing the sun colour and angle will make the maps feel a bit more different
-
@nine2 You can also add them to the repo, as is done with other shaders.
What would you like for it to do specifically? At the moment it is an edge detection algorithm:
// phase 0 float4 TerrainPS0( TerrainPixel pixel) : COLOR0 { float2 v0 = terrainSizeCoeff * pixel.world.xz; float2 v1 = v0 + float2(1,0); float2 v2 = v0 + float2(0,1); float2 v3 = v0 + float2(1,1); float2 t = v0 - floor(v0); float2 h0 = tex2D(elevSampler,gridSizeCoeff*v0).rg; float2 h1 = tex2D(elevSampler,gridSizeCoeff*v1).rg; float2 h2 = tex2D(elevSampler,gridSizeCoeff*v2).rg; float2 h3 = tex2D(elevSampler,gridSizeCoeff*v3).rg; float2 h = clamp(lerp(lerp(h0,h1,t.x),lerp(h2,h3,t.x),t.y) - 0.0001,0,1); float3 hypsometric = tex1D(hypsometricSampler,h.x).rgb; float1 topographic = tex1D(topographicSampler,h.x).a; return float4(hypsometric,topographic); } // phase 1 float4 TerrainPS1( FramePixel pixel) : COLOR0 { static const half dx = 1.0 / frameWidth; static const half dy = 1.0 / frameHeight; float4 color = tex2D(frameSampler,pixel.texcoord); half4 c = color.a; /// The following edge detection filter was adapted from /// and example provided by Mark J. Harris and GPGPU.org half4 bl = tex2D(frameSampler,pixel.texcoord+half2(-dx,-dy)).a; half4 l = tex2D(frameSampler,pixel.texcoord+half2(-dx, 0)).a; half4 tl = tex2D(frameSampler,pixel.texcoord+half2(-dx, dy)).a; half4 t = tex2D(frameSampler,pixel.texcoord+half2( 0, dy)).a; half4 ur = tex2D(frameSampler,pixel.texcoord+half2( dx, dy)).a; half4 r = tex2D(frameSampler,pixel.texcoord+half2( dx, 0)).a; half4 br = tex2D(frameSampler,pixel.texcoord+half2( dx,-dy)).a; half4 b = tex2D(frameSampler,pixel.texcoord+half2( 0,-dy)).a; float topo = saturate( 16.0 * ( c - 0.125 * (bl + l + tl + t + ur + r + br + b ))); return float4(color.rgb - topo.rrr,0); }
This is the input of the shader:
float4x4 viewMatrix; float4x4 projMatrix; float4 gridSizeCoeff; float4 terrainSizeCoeff; float1 terrainHeightScale; float1 elevMaximum; float1 elevMinimum; float1 frameWidth; float1 frameHeight; texture elevTexture; texture hypsometricTexture; texture topographicTexture; texture frameTexture; texture decalTexture;
I'm not entirely confident what a 'hypsometricTexture' is. We can not add (or remove) input parameters, but we can toy with what it does with the input.
-
Nice to hear that you guys have been playing and enjoying the generator. I always appreciate being able to watch replays to help improve the generator.
With regards to reclaim currently it always generates some amount of trees and small rocks although this can get down to about 2k mass. Reclaim options are a possibility but I have not yet defined a good range for those.
With regards to the visibility of pathing and texturing tit is constantly being improved to increase the pathing visibility. There were some updates in the last day to increase the texturing so that it is keyed based on the slope values in order to make it clear what is walkable and what is not. There are still some edge cases that are being ironed out. There is a way to change how the cartographic map is displayed so that may be something I look into as well.
With regards to civilian bases there are currently four that are possible. 2 enemy and 2 neutral. If you have ideas or want to contribute additional ones I can let you know the template I would need. Each map currently has a 50% chance of trying to place civilians and a 50% chance of those being enemy bases.
With regards to the sun colour and angle there are a set of biome templates that are used for generating the map with the textures which includes the sun color and angle and I am always looking for people who are interested in contributing some more.
-
I'm not entirely confident what a 'hypsometricTexture' is. We can not add (or remove) input parameters, but we can toy with what it does with the input.
hyposymmetry is the measure of land elevation I believe if that helps.
-
@jip what I was hoping to achieve was to display a line if its unpassable.
The current shader perhaps [renders the heightmap clamped to brackets] then [runs edge detection over it].
Perhaps the first step needs to change to [render white if thisCellHeight - previousCellHeight > threshold, else render black]. Something like that?