Jump to content

Random Maps!


Recommended Posts

  • 4 weeks later...

Future RMSes really need more metal, my AIs keep ending up in an almost unwinnable slogging match based around throwing lots and lots of javelinists at one another. Also, low metal really badly hits the Iberians at the moment as they need it to train some fairly basic troops. I'm having good fun with 'em other than that, Latium is particularly fun.

Link to comment
Share on other sites

I might be wrong, but I imagine there aren't all that many palm trees in Italy.

Actually, I'd put the Mediterranean Fan Palms along the coast. Also, with the "mountains" there can be some hills here and there, but the map is supposed to have its mountains and cliffs in a range like a "spine" that runs North and South that divides the map into two halves. The mountain range will then have defensible paths through it.

I think generally the forests on all these maps can be a bit thinner. I have a fairly new rig and for some reason I get a huge framerate hit when I pan over the forests. This does not happen on my hand-made maps, so I think the forests on the random maps are too thick. If forests are too thick, then units will get stuck trying to pathfind through them.

Link to comment
Share on other sites

Actually, I'd put the Mediterranean Fan Palms along the coast. Also, with the "mountains" there can be some hills here and there, but the map is supposed to have its mountains and cliffs in a range like a "spine" that runs North and South that divides the map into two halves. The mountain range will then have defensible paths through it.

I think generally the forests on all these maps can be a bit thinner. I have a fairly new rig and for some reason I get a huge framerate hit when I pan over the forests. This does not happen on my hand-made maps, so I think the forests on the random maps are too thick. If forests are too thick, then units will get stuck trying to pathfind through them.

Thanks for the feedback! This is exactly what's needed to improve them :)

I think it should be possible to have a map filled with trees with no adverse affects. That's just my opinion, but right now there's memory and performance issues :( It's hard because the maps have to scale over several sizes with between 2-8 players, but if there's a tiny forest on a huge map, the players might not even find it. I guess more scattered trees would help, and maybe some less circular clumps of forests.

I'll start tweaking them.

Link to comment
Share on other sites

Actually really clumped forests tend to be OK with pathfinding in my experience; it's mostly clumped ones with a few missing trees that cause issues (take a look at the palms just southwest of the southern ford on Hellenised Egypt as the ultimate example, not even joking when I say armies have been defeated and crushed due to those trees).

Link to comment
Share on other sites

Actually, I'd put the Mediterranean Fan Palms along the coast. Also, with the "mountains" there can be some hills here and there, but the map is supposed to have its mountains and cliffs in a range like a "spine" that runs North and South that divides the map into two halves. The mountain range will then have defensible paths through it.

I think generally the forests on all these maps can be a bit thinner. I have a fairly new rig and for some reason I get a huge framerate hit when I pan over the forests. This does not happen on my hand-made maps, so I think the forests on the random maps are too thick. If forests are too thick, then units will get stuck trying to pathfind through them.

I think there are some OpenGL extensions to speed up this case: ARB_draw_instanced and ARB_instanced_arrays. They are also available on mesa drivers.

Link to comment
Share on other sites

@fabio Please make a ticket about that on Trac (http://trac.wildfiregames.com/) and assign it to Philip for the Alpha 6 milestone to get some discussion going. Groups of tree, like Michael experienced, are killing the frame rate when I hover over them. They could do with some serious speed ups.

The problem with the two things you mentioned is that ARB_draw_instanced is only supported by 51% (http://feedback.wildfiregames.com/report/opengl/feature/GL_ARB_draw_instanced'>http://feedback.wildfiregames.com/report/opengl/feature/GL_ARB_draw_instanced) and ARB_instanced_array only supported by 43% (http://feedback.wildfiregames.com/report/opengl/feature/GL_ARB_instanced_arrays'>http://feedback.wildfiregames.com/report/opengl/feature/GL_ARB_instanced_arrays) so those particular ones might not be the best.

We should aim to keep support for atleast 90% of our users. See http://feedback.wildfiregames.com/report/opengl/ for what we can use.

Link to comment
Share on other sites

Instanced rendering can't work usefully for trees, since our trees use alpha blending (which means they need to be sorted by distance, not by texture, so they can't be drawn in large batches). Also that wouldn't help if the rendering is fill-rate limited (i.e. the cost of drawing blended pixels), though I don't remember how often that's the problem. Switching from alpha blending to alpha testing (i.e. 1-bit alpha masks) would solve all those problems, but I don't know whether it'd be possible to make alpha-tested trees that don't look ugly so I don't want to claim it's a viable solution. (Also it'll take a bit of work to get that supported properly in the engine, though I'll probably try doing that soonish anyway so that it's possible to experiment with this.)

A proper solution to #434 should make trees much faster, but I think ortalo's working on some stuff that's relevant to this so I don't want to interrupt that work. (With fancy water, trees get drawn 5 times per frame. That patch would reduce it to 4. Removing water refractions (which seem so subtle that I've never been able to see their effect, unless I'm just looking in the wrong place) would reduce it to 3. There might be a change to the shadow rendering that could reduce it to more like 2.5 or so.)

About pathfinding: Maybe increasing the radius of trees would help stop units walking through sparser forests? Alternatively, at some point in the far future we'll probably need some kind of terrain analysis so AI players can recognise forests as simple coherent shapes (not just as individual trees) and could maybe use that for pathfinding if it'd help, but that's not going to work any time soon.

Link to comment
Share on other sites

About pathfinding: Maybe increasing the radius of trees would help stop units walking through sparser forests?

I think this would help, not yet for random maps because the algorithms assume 1-tile footprints when placing clumps. It would need to access templates for that, maybe, or else have it hardcoded. At least it would make forests-as-obstacles slightly more practical.

I'm about to commit a change to Cantabrian Highlands that will show some progress made. At least I can generate even a giant map with only 5k entities total, and it doesn't look too bad. Having a river or two will help even more since they form a natural barrier without the high cost of trees.

Link to comment
Share on other sites

In that case, the game can apply a special flag to tiles that are near trees (where "near" is determined by what tree density should block siege engines etc), and units can be given different passability classes that determine whether they are blocked by those flagged tiles or not. But I suppose it's bad if units look like they're standing inside tree trunks, so the trees need to act as small trunk-sized circular obstructions even to units that can walk through forests, in which case they might still be blocked by particularly dense forests, but hopefully we can simply make them not quite that dense.

Link to comment
Share on other sites

May I suggest switching to developing a Desert biome map, like Median Oasis, instead of Cantabrian Highlands? The Cantabrian map will use Temperate biome assets (terrains, etc.) and you'll be forced to change a bunch of things later. The Desert Biome is pretty much complete (except for maybe another tree species or two). If you're okay with trying to make a Median Oasis map, just emulate the custom scenario already in the game -- Median Oasis. It is pretty balanced.

Link to comment
Share on other sites

May I suggest switching to developing a Desert biome map, like Median Oasis, instead of Cantabrian Highlands? The Cantabrian map will use Temperate biome assets (terrains, etc.) and you'll be forced to change a bunch of things later. The Desert Biome is pretty much complete (except for maybe another tree species or two). If you're okay with trying to make a Median Oasis map, just emulate the custom scenario already in the game -- Median Oasis. It is pretty balanced.

In fact, looking at Median Oasis it is very similar to the Neareastern Badlands random map. They both have a central oasis, only Median Oasis seems to have more rolling hills than steep cliffs. Adding it as a random map shouldn't be too difficult :)

The idea has always been to allow units to walk through forests, while larger units like siege engines have to go around.

Oh, I didn't know this. So in that case a map like AoK's black forest will not be possible, since trees alone wouldn't form an obstacle to most units. One thing that could be added, if you think of a real-world dense forest, it's not practical for large armies to just march through, you have to go fairly slow and not in a straight line. So the pathfinder should force units to scatter out of a formation if they enter a forest and also there should be a time penalty, so it may be faster to go around a forest than through it.

Link to comment
Share on other sites

Oh, I didn't know this. So in that case a map like AoK's black forest will not be possible, since trees alone wouldn't form an obstacle to most units.

Right. And we don't have AOK's tree-smashing siege engines either, so an AOK-style Black Forest would be bothersome. However, I do believe we have a BF-style map spec'd, the Temperate map 3.2.2. Ardennes Forest.

Link to comment
Share on other sites

  • 1 month later...

Right. And we don't have AOK's tree-smashing siege engines either, so an AOK-style Black Forest would be bothersome. However, I do believe we have a BF-style map spec'd, the Temperate map 3.2.2. Ardennes Forest.

Vorrei aiutare ma non c'è nessuno che mi sintetizza che texture vi vogliono in Italiano .... ricordate del filtro togli giunzioni in Gimp comunque !

OT all englisch speack?

Link to comment
Share on other sites

Vorrei aiutare ma non c'è nessuno che mi sintetizza che texture vi vogliono in Italiano .... ricordate del filtro togli giunzioni in Gimp comunque !

OT all englisch speack?

Ciao, credo di sì tra gli sviluppatori. In ogni caso puoi usare google translate.

Link to comment
Share on other sites

Ciao, credo di sì tra gli sviluppatori. In ogni caso puoi usare google translate.

Si con copia e incolla e traslate e originale ... quanti vi sono che parlano italiano ? io sto anche al progetto www.unrealproject.com ... e mi bastano queste info http://www.unrealproject.org/forum/index.php?topic=1840.0 sia qui che li !! niente di più

PS .potremmo collaborare dato che ci capiamo...se c'è ne sono altri :drunk:

Link to comment
Share on other sites

  • 1 month later...

Cool Ben (y) Random maps are starting to get to the point where they rival custom made maps, not yours though Michael ;) That will take a while longer :) Seriously though, andom maps will probably never be as visually interesting as maps created by humans, on the other hand, with things like POGs they'll sure be more interesting than in most games.

Link to comment
Share on other sites

Looking at a map's XML, I can start to see how "POGs" could be possible.

	<Entities>
<Entity uid="13">
<Template>gaia/flora_tree_carob</Template>
<Player>0</Player>
<Position x="212.539" z="506.22016"/>
<Orientation y="2.35621"/>
</Entity>
<Entity uid="15">
<Template>gaia/flora_tree_carob</Template>
<Player>0</Player>
<Position x="262.94837" z="499.05585"/>
<Orientation y="1.01987"/>
</Entity>
<Entity uid="24">
<Template>gaia/flora_tree_carob</Template>
<Player>0</Player>
<Position x="206.7829" z="477.50257"/>
<Orientation y="-1.5824"/>
</Entity>
<Entity uid="26">
<Template>gaia/flora_tree_carob</Template>
<Player>0</Player>
<Position x="253.0978" z="522.48066"/>
<Orientation y="-1.6237"/>
</Entity>

Each entity shows a position and orientation. In a POG this could be relative to the boundaries of the POG. Once you place a POG then those positions and orientations are recalculated for the map. If we wanted to go super cool, we could still have these placed items be connected in an underlying way so that you could hold ALT and re-drag the POG after its already been placed, even if you've already repositioned (or deleted) some of the individual items. Something like that would be good for custom scenarios.

Now, POGs for random maps would be awesome because a script could place a variety of POGs to give a nice hand crafted feel. What are POGs? Premade Object Groups, a concept I came up with some years ago. Basically a designer could create a small "map" in Atlas, place some objects in an aesthetically pleasing way, like a vignette, then save that "map" as a POG, which can then be used later, either by the designer (or other designers--I could envision "POG Packs"!) or called by random map scripts. I suggest POG mode would have a standard length and width so that POGs don't get too massive, or a small number of standard sizes.

post-130-0-08442600-1310666381_thumb.jpg

Link to comment
Share on other sites

Now, POGs for random maps would be awesome because a script could place a variety of POGs to give a nice hand crafted feel. What are POGs? Premade Object Groups, a concept I came up with some years ago. Basically a designer could create a small "map" in Atlas, place some objects in an aesthetically pleasing way, like a vignette, then save that "map" as a POG, which can then be used later, either by the designer (or other designers--I could envision "POG Packs"!) or called by random map scripts. I suggest POG mode would have a standard length and width so that POGs don't get too massive, or a small number of standard sizes.

I think this is a great idea to implement at some point. Another useful concept for random maps is the ecotope, a collection of entities that occur within a given biome according to certain probabilities and constraints, but on a smaller level, say 16x16 tiles. Examples: "temperate forest", "temperate grassland", "tropical forest", "desert plains". The more of these that are defined, the more variation the random maps will have.

The basic design would be generating high level strategic elements first (terrain, player positions, etc.), if the map will have multiple biomes do that next, then split the biomes into separate random ecotopes that match their terrain, and then finally place some POGs and other small elements. I like this better than the current piecemeal approach which is slow and hard to understand.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...