Random Map Generator
schkorpio
I can mspaint Join Date: 2003-05-23 Member: 16635Members
<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->UPDATED : see last post in the thread plz :)<!--colorc--></span><!--/colorc-->
I was thinking the other day whether it would be a good idea to have ns2 randomly generate maps.
Random maps could bring a lot of good things to NS, such as real strategies from commanders and proper tactics from aliens (rather than just knowing the map) and a bit more atmosphere as you would always have the feeling of being lost, and unsafe. And of course variety - which usually means longer playability.
The only down side is that it might be a bit overwhelming for new players.
EDIT
<b>The way i see it could work would be.</b>
<i>1 A Mapper creates tile sets of a similar theme
2 Tile sets are distributed with NS to players and servers
3 Upon loading of a map the server generates a legal map (minimap is also generated)
4 Server sends the randomization key to the players
5 The players load map tiles in a pattern defined by the randomization key
6 Players join the game and start playing</i>
1.
Mappers would still play a very important role in creating the tile sets to a particular theme of their choice, just that they would need ensure that hallways are interchangeable, and the hallways/map parts/tile sets have labels so that the generator knows which hallway can be stuck to which room - so for example it doesn't stick a big hallway into a vent opening.
I'd imagine it would be done with sets of similarly themed tiles - sets of hall ways and rooms which easily hook onto each other. There would need to be a large rule set which the the map generator would use to create the maps.
You could have as many themes as you want , like the veil/eclipse theme, or the nothing/bast theme. it would be up to the mappers
2.
all of the clients and servers would have the same sets of hallways and rooms, vents etc already on their computers, already in a compiled stage, with the lighting built in. the Vis program, well that would need to done the same way doom 3 does its maps - you place a VIS portal brush at the end of each hallway and the engine does it on the fly, but given the claustrophobic nature of ns maps this shouldn't create too much over head. (hey it works for d3 :) )
So yes there would be some pre-compiling of the individual tile pieces.
3.
Things like distance of hives, res points, siege rooms, choke points (the mapping guidelines page already has a lot of this) - to keep the maps balanced and playable.
Minimaps would need to be generated differently - but it could be generated the same time as the map is being loaded, or perhaps it would just take a "snapshot" or the tile pieces and arrange them, kind of like a 2d version of the map generator.
it would take a fair amount of time to get the generator right - to make sure maps are balanced, but thats would all be done in the generators rules. but if done right, it would also make sure that the map is always balanced, always performs well, and error free. Plus there could be a dynamic nature to the but fixing if there are errors - steam could automatically replace a faulty tile which would only small in size rather an entire 20mb map.
4.
All that the server needs to do is send a randomization key over to the clients and then everyone's machine would place the tiles together.
So it wouldn't be sending lots of data or using the cpu much more than it does to load the assets or maps now days.
5.
clan players would need get used to the hallways rather than the maps, but also you could have a feature which lets you save and enter the randomization key. so that way you could replay a map.
6.
yeehaa
For example
Imagine this - you could take KFS best work Eclipse and Veil, as they have similar themes, then break each part of the map into hallways, rooms, hives, vents, then stick label info on the end of each so that way the generator knows how to use each part. Hit the generator button and all of a sudden you can walk from eclipse marine spawn down to and around the corner to a mirrored version of west skylights.
And this could be possible with any similar theme maps.
I was thinking the other day whether it would be a good idea to have ns2 randomly generate maps.
Random maps could bring a lot of good things to NS, such as real strategies from commanders and proper tactics from aliens (rather than just knowing the map) and a bit more atmosphere as you would always have the feeling of being lost, and unsafe. And of course variety - which usually means longer playability.
The only down side is that it might be a bit overwhelming for new players.
EDIT
<b>The way i see it could work would be.</b>
<i>1 A Mapper creates tile sets of a similar theme
2 Tile sets are distributed with NS to players and servers
3 Upon loading of a map the server generates a legal map (minimap is also generated)
4 Server sends the randomization key to the players
5 The players load map tiles in a pattern defined by the randomization key
6 Players join the game and start playing</i>
1.
Mappers would still play a very important role in creating the tile sets to a particular theme of their choice, just that they would need ensure that hallways are interchangeable, and the hallways/map parts/tile sets have labels so that the generator knows which hallway can be stuck to which room - so for example it doesn't stick a big hallway into a vent opening.
I'd imagine it would be done with sets of similarly themed tiles - sets of hall ways and rooms which easily hook onto each other. There would need to be a large rule set which the the map generator would use to create the maps.
You could have as many themes as you want , like the veil/eclipse theme, or the nothing/bast theme. it would be up to the mappers
2.
all of the clients and servers would have the same sets of hallways and rooms, vents etc already on their computers, already in a compiled stage, with the lighting built in. the Vis program, well that would need to done the same way doom 3 does its maps - you place a VIS portal brush at the end of each hallway and the engine does it on the fly, but given the claustrophobic nature of ns maps this shouldn't create too much over head. (hey it works for d3 :) )
So yes there would be some pre-compiling of the individual tile pieces.
3.
Things like distance of hives, res points, siege rooms, choke points (the mapping guidelines page already has a lot of this) - to keep the maps balanced and playable.
Minimaps would need to be generated differently - but it could be generated the same time as the map is being loaded, or perhaps it would just take a "snapshot" or the tile pieces and arrange them, kind of like a 2d version of the map generator.
it would take a fair amount of time to get the generator right - to make sure maps are balanced, but thats would all be done in the generators rules. but if done right, it would also make sure that the map is always balanced, always performs well, and error free. Plus there could be a dynamic nature to the but fixing if there are errors - steam could automatically replace a faulty tile which would only small in size rather an entire 20mb map.
4.
All that the server needs to do is send a randomization key over to the clients and then everyone's machine would place the tiles together.
So it wouldn't be sending lots of data or using the cpu much more than it does to load the assets or maps now days.
5.
clan players would need get used to the hallways rather than the maps, but also you could have a feature which lets you save and enter the randomization key. so that way you could replay a map.
6.
yeehaa
For example
Imagine this - you could take KFS best work Eclipse and Veil, as they have similar themes, then break each part of the map into hallways, rooms, hives, vents, then stick label info on the end of each so that way the generator knows how to use each part. Hit the generator button and all of a sudden you can walk from eclipse marine spawn down to and around the corner to a mirrored version of west skylights.
And this could be possible with any similar theme maps.
Comments
y'know what happens when an new custom map is run on a server, most will leaver or do a map vote (not talking about NS only, other games have the same problems). People tend to avoid the unfamiliar and tend to stick with what they know.
Also map story lines would cease to exist I guess.
While mapping for ns we are talking about lighting, geometry, chokepoints, vent system, map and res control, entity limits, weldables and such.
Name one good random map generator that is able to create anything more complicated than simple rts maps with some resoucre locations, a few cliffs and some forests or such planted around at random.
While mapping for ns we are talking about lighting, geometry, chokepoints, vent system, map and res control, entity limits, weldables and such.
<!--QuoteEnd--></div><!--QuoteEEnd-->Well the Doom3 RPG mod had a random map generator, but it was essentially just Diablo with walls. Google if you want the link.
NS is too complicated for random map generation. How do you randomly balance a map?
This could work for combat maps, but i wonder how it would affect CPU usage
<!--QuoteEnd--></div><!--QuoteEEnd-->
It would have to be handled server-side, then that data passed onto the clients. Load time would increase a huge amount I'd imagine, and although it would be nice to always have that uncertain and jumpy feeling you get with new maps as others have pointed out balancing would be nigh on impossible.
And people are fine w/ new maps if TWO criteria are met: A) the map is actually good and B) people tell the other people that it is actually good. ...Though opinions do vary :x.
While mapping for ns we are talking about lighting, geometry, chokepoints, vent system, map and res control, entity limits, weldables and such.
<!--QuoteEnd--></div><!--QuoteEEnd-->
All of that could be defined in a set of rules for the map generator - those rules already exist on the mapping guidelines site, they would just need to implemented as part of the map generator. Same goes for balancing, there would be rules which take care of it - like distances between res points, height variations, time it takes to walk to a hive from marine start etc etc.
Sure its more complicated than a 2D, but it doesn't mean impossible. As long as the rules are there to guide the map generator it should work <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />
Hybrid Claw - It would especially work for Combat Maps as there are a lot less things to consider and less rules would have to be written for the generator - perhaps this would be a good proof of concept. Pitty I can't code <img src="style_emoticons/<#EMO_DIR#>/tounge.gif" style="vertical-align:middle" emoid=":p" border="0" alt="tounge.gif" />
EDIT updated 1st post
oh btw , i believe hellgate : london have random maps <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" /> and yes its a fully 3d game, i don't know what kind of tech they are using but it atleast it proves its possible <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />
Edit: Forgot to add my thoughts about random maps
While its a cool idea, the fact that detail and complexity are lost is a huge downside. No random map gen will be able to create maps like Eclipse or veil. Now maybe if the majority of the map could be built but have some areas that can be randomized, that would be cool.
I can see where your comeing from schkorpio, I sort of agree, exspesaly if everything is maped with leniances like res nodes can be 2048-4096 distance apart with mention of 64 units as incriments. The tunnels would work the same if you need a tunnel 512 long and you have peice like leggo, the amount of diff halls that could be produced are endless.
Say you have 8 diff 64 long
6 diff 96 long
4 diff 128
4 diff 256
and a pair of 512 long already
64,64,64,64,256
128,64,64,128,64,64
128,256,128
128,64,128,26,128
###### guys the out come is awsomely endless.
A while ago in the mapping form schorp I suggested a idea simmilar, I sugested player make said lego bits with set dementions with map tile types and theams, so they can always be sloted togther. The mappers wouldnt have a bar of it. Shot down, i mean sure its there opinions, but the fact no ones ears poped up.
If I was to make a map it would be exstreamly simmilar to the lego block idea, infact the outer case if you will would be exsact cubes hollowed -16 or -32. to make a perfectly sealed map, there no gaps you can garrenttee it. If at the end of the day I dont like the lay out, it would take a hour to remake a entire path to a hive 3 times over to find something I like that works with balance. What do you have to do mappers?
And if I was to release those blocks those building blocks in a single map file, any mapper could grab those grouped coridorr blocks and duplicate and slap down AND ALWAYS have a perfectly sealed map.
whos to say they cant indovidualy make a few unquie blocks.
If you get the community to start mapping in this style, I cant see why in the furture a random map genarator couldnt be thrown in.
If done like this not every map has to be randomly gen'ed, gened lays outs can be saved, like you said by saveing the key. The wow talent trees work exsackly like this on the main blizzard web page, you save the html with said tallent tree key.
If I was a dev of a video game company schkorpio I would want you on my staff, as apose to the the people that just blatantly shot your idea down and or mine, they just simpley dont look or think out side the box,
they go marines, push you back into your hive siting comfy with their ranged buffer. wait till 3/3 and consistantly own people, their skill is only as good as their weapons limits, they are compensating for a lacking some were. Ever thought of handy caping your self to improve your over all skill?, na didnt think so.
Imagine a map where a team of Marines needs to repair and rebuild a bridge to cross into a hive... Need an example of the general idea? HL2 mod: SourceForts
If I was a dev of a video game company schkorpio I would want you on my staff
<!--QuoteEnd--></div><!--QuoteEEnd-->
*blushes* that would be awesome <img src="style_emoticons/<#EMO_DIR#>/biggrin-fix.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin-fix.gif" />
the lego approach is a very good way of explaining it <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" /> glad someone agrees
the only big thing I see as a problem is Source is still ...compiled lightmaps.
The examples mentioned have light generated at runtime.
However some amount of randomization of a map could occur through the use of entities and triggers.
However I would still like to see it done, but wouldn’t care if I didn’t.
On the note of ruining competitive maps, there would be maps that are always the same.
BUT on this topic, the way it could work. (this would make life hard for mappers >.>)
but but but, say you make a map.
it is divided into an 8x8 grid or smaller.
then, each grid coordinate, has predefined link locations with its surrounding sections.
then the mappers create 2-5 different possibilities for each grid coord.
then when the server loads the map, it randomly picks which of the options each grid coord is, and connects them together.
So the maps would always be SOMEWHAT similar, in the sense that a vent in A1 will always attatch to a vent in A2 at the same location. same with all paths and doors.
ALSO, with nodes and hives, some forms of a region would have a node or hive, others wouldnt.
but when the map randomly picks them, it makes sure theres atleast a certain number of nodes, and 3 hives.
and in some cases, parts of the map would just be closed off. like a vent has a grate blocking you from entering, or doors are locked/broken.
this could work to make maps dynamic and change in size in accordance to the amount of players.
say theres a 4x4 grid map, and only a few players are on, maybe only a 9 of the 16 regions would be open. then say more players join, locked doors open.
This could work nicely?
what ya'll think?!
<!--coloro:#2E8B57--><span style="color:#2E8B57"><!--/coloro-->
schkorpio, got msn? add me; jozsa@hotmail.com <3<!--colorc--></span><!--/colorc-->
T<!--QuoteEnd--></div><!--QuoteEEnd-->
Team fortress 2 is doing that apparantly :o am keen to see how it actually works <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />
awesome :} the only ting that appeals to me about TF2 is the graphics.
ps. come back on msn <img src="style_emoticons/<#EMO_DIR#>/sad-fix.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad-fix.gif" />
I was just browsing this idea before, not really paying it much mind until Icon dropped this beautiful bomb of an idea! Icon For The Win!
With his idea, mmm, gaming goodness!
This could work nicely?
what ya'll think?!
<!--coloro:#2E8B57--><span style="color:#2E8B57"><!--/coloro-->
schkorpio, got msn? add me; jozsa@hotmail.com <3<!--colorc--></span><!--/colorc--><!--QuoteEnd--></div><!--QuoteEEnd-->
Socom3/Combined Assault did this: In 32 player rooms, the full map was avaible, but in 16 player rooms; only a portion of the map was avaible.
What wound up happening was; the 16 player versions didnt play right; the balance was totally thrown off by the artificial barriers set up for the smaller map versions. It just wasnt fun, and looked half-assed.
What wound up happening was; the 16 player versions didnt play right; the balance was totally thrown off by the artificial barriers set up for the smaller map versions. It just wasnt fun, and looked half-assed.<!--QuoteEnd--></div><!--QuoteEEnd-->
Fair enough, but i still stand by my grids for map randomness.
I dont really care if parts of the map get closed off or not.
<!--coloro:#FFFF00--><span style="color:#FFFF00"><!--/coloro-->
We have a lot of advantages on our side, which could make this work:
-The maps are changed real-time
-Lighting does not need to be compilied
-no VIS calculation
-heavy use of 3D models rather than brushes making uniformity quite easy.<!--colorc--></span><!--/colorc-->
<!--coloro:#00FFFF--><span style="color:#00FFFF"><!--/coloro-->so bascially this brings us back to these steps:
-mapper(s) create variations of,
--rooms,
--corridors(straight, and corner),
--lift shafts of different heights
--and vents (including lights etc,) and these are saved as layers or prefabs .
-They are created to specific size and some with doors so that they fit together in a lego fashion.
-Actually it would be better to publisize these rules so that communities could add hallways and rooms to the mod.
-a rules file then determines how these pieces are allowed to fit together, and how bright/dim the lights are allowed to be, height variations etc.
-the mod (a program) then takes these rules and lego pieces to create a legal map.
-however this information is compiled into a text file with only the coordinate and lego piece information.
- This is sent to all of the clients connected to the server.
-their own computers use this text file to create the map on each pc (rather than sending out a large map file) (everyone will already have the models etc as part of the mod or vanilla ns)
<!--colorc--></span><!--/colorc-->
This would open up some other nice game modes too - such as the old ESCAPE mode - where the map generator makes a giant deadly maze of rooms and hallways, with traps, obstacles and dangerous areas (some rooms would trigger AI skulks to come out), and the commander needs to give waypoints to the marines so they can find there way out.
and it would be different every time :)
Lighting might also be an issue as if there is no BSP, lights might bleed more readily through models into other areas of the map. And speaking of lighting, the lights might be dynamic, by they might not be movable from within Lua. A special entity might have to be created for that purpose.
Assuming all of the above is completely wrong and BSP, Props and lights can all be moved readily with Lua, then I would say that this would definitely make for some interesting gameplay, however, the generator logic would be brutal to write.
Edit: While it won't be CPU intensive for clients, only the server, I would suggest that a set of maps are randomly generated ahead of time and when clients connect, they download the current map, then the server might stream the rest? The point is, the server shouldn't need to regenerate maps at the end of every session. They should be generated ahead of time to a maximum set by the Server administrator, and once the current map played hits that last map, a new set of maps are generated.
<a href="http://www.fpsbanana.com/tools/3180" target="_blank">http://www.fpsbanana.com/tools/3180</a> check that out.
<!--QuoteBegin-"Hoodedsniper"+--><div class='quotetop'>QUOTE ("Hoodedsniper")</div><div class='quotemain'><!--QuoteEBegin-->random map generators have already been done, there awful and your not even doing any work. It is impossible for a complex map that shows no patterns to the one you generated before.<!--QuoteEnd--></div><!--QuoteEEnd-->
Not many things that are randomly generated by a computer can top the hard work, dedication, and love that one can put into something. Creating a workable random map generator is however, fairly difficult but creating "complex" maps that doesn't follow an obvious pattern are far from impossible. The logic required for something like that would be dense, but again, its not an impossibility to randomly generate a map that is fairly unique compared to a previously generated maps.
Just because something has done before and the end result was poor, doesn't mean it shouldn't be attempted again, let alone attempted again by anyone else. If that were the case, then we would have died off as a society long ago, I'm sure.
vents could be defined easily as there are models with vent exits - just tell the program to make the shortest vent path from one opening to another, without going through an existing corridor.
I know diablo 1 and 2 aren't 3D but the principles are the same and they nailed it in those games! its just an extra axis :P
I'm not sure what you mean? Typically, pre-fabs would have properties described about them that the generator would read and fit into the grand scheme of things. So the generator would know that the 4-way vent crossing has 4 possible vent connections, and that the vent exit/entrance actually goes down 64" because it needs to connect the vent-entrance that is part of a wall prefab. This means that pre-fabs can come in varrying shapes, sizes, and have various different properties and the engine will be able to fit them all together nicely.
<img src="http://www.unknownworlds.com/images/news/powergrid/NS2_powergrid_overview.jpg" border="0" class="linked-image" />
Good friggin' luck with that.