Jump to content

Yet another random map generator


Pyrophorus
 Share

Recommended Posts

Hi @FeXoR

Thanks for your interest

On 9/1/2017 at 1:08 PM, FeXoR said:

@realistic and fair: It is possible by choosing a symmetry matching the number of players and use realistic design for the part left. The symmetry will leave a notable global pattern but locally the map will be mostly realistic.

I made some tests on this idea. Unfortunately, this works rather bad as one can see on the picture:

shot01.jpg.e4b3fa461237305edd0bc261e53684d9.jpg

The red square is flat and large enough to put a CC here, but all this looks really weird. In extreme cases, the player is trapped in a deep hole and cannot even get out to meet enemies ! :blush:

I have to find something else...

Friendly,

Link to comment
Share on other sites

Reminds me of the Ambush or Archipelago map where you often see circles around the CC. By using some random patterns instead of only a single circle or square, that shape could be blended in a bit. The flattening approach doesn't seem so bad after all. An alternative would be very strong smoothing.

Notice that besides a single player being cut off, theres also the possibility that two parts of the map are disconnected.

Perhaps connectivity could be ensured by creating paths between players, as seen on Caledonian Meadows. Those paths really add a lot of value to the visual appearance as well usually (for example on Danubius).

Also I'd recommend a createBumps() call after all mapgen is processed to disrupt any repetitive patterns in the terrain.

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, elexis said:

Does that map on the screenshot include a createBumps call? Try the numbers from danubius. Might be weird for the cliffs, but I assume those can be avoided (as in cliffs being marked with a tileclass)?

No, the map is created without any call to rmgen. I don't reject or despise rmgen at all, but my approach is different. It's something about the control you have on the map creation: rmgen tries to give you as much control as possible (even when it's about putting some random noise in the map). I'm trying to work on more fuzzy algorithms, less control on details, because I think they're very efficient to give realistic results and much more variety. I don't know very well rmgen, but do you think you can produce easily with it something like the map in the screenshot above ? If you tried a little the tour I published, maybe you marked the large variety of maps it produces (even if some are far from usable, but this will change soon).

I think I could rather easily scavenge the existing random map scripts to produce very quickly new ones of more or less the same quality, and I will do that if my efforts are fruitless. But I want to follow my own path too. The problem is not new to me: multiplayers requirements are extremely difficult to match with realism and aesthetic. They just want their resources equally distributed and as little obstructions as possible, in other words, maps as plain as a chessboard, because they play some kind of chess game. Realism is only an eyecandy to them, never a challenge,  but...

On 9/5/2017 at 1:09 PM, elexis said:

Notice that besides a single player being cut off, theres also the possibility that two parts of the map are disconnected.

Yeah, but you can imagine maps where finding a path to the enemy is not trivial because you must wander in a large part of very rough terrain  where you can be ambushed from high cliffs and can't built anything. It's something like Hannibal crossing the Alps. In the same spirit, resources are not always equally distributed and easy to get in reality. I'm personally more interested in this kind of challenge (I would play chess otherwise :)).

  • Like 2
Link to comment
Share on other sites

On 9/5/2017 at 1:09 PM, elexis said:

An alternative would be very strong smoothing.

I'd go for this. In heightmap rectangularSmoothToHeight() would do the trick.

I at least can't tell the shape of the smoothing (rectangle) with the default window function (Paraboloid). The transition is quite smooth and leaves the general terrain shape intact. With a strength of 0.5 to 0.8 it should still create a suitable base.

  • Thanks 1
Link to comment
Share on other sites

Nice thread! Any random realistic modded map that can be downloaded and playable? I dont  mind unbalanced map  especially if playable in DE mechanics since it will be easier to gather resources but preserving the initial beauty of your main base. I prefer maps like Danubius, Alphine Valleys or Corinthian Istmus or any maps with heavy on Gaia units and mercenaries. Lag is not my concern too coz I can play up to the slowest speed possible. 

  • Thanks 1
Link to comment
Share on other sites

@elexis:

12 hours ago, elexis said:

Using existing rmgen calls on top of your library was just an idea to improve the results of maps, not to replace your lib.

Certainly, it's exactly what I plan to do. Rmgen has a lot of fine and useful features. No need to rewrite them.

@FeXoR

11 hours ago, FeXoR said:

I'd go for this. In heightmap rectangularSmoothToHeight() would do the trick.

I at least can't tell the shape of the smoothing (rectangle) with the default window function (Paraboloid). The transition is quite smooth and leaves the general terrain shape intact. With a strength of 0.5 to 0.8 it should still create a suitable base.

Should be a nice "last chance fall down" if other attempts fail. Thanks...

@Servo

Thanks for your interest, but there is no random map script playable for now. You'll have to wait a little. I have still a lot of work ahead. Sorry...

  • Like 3
Link to comment
Share on other sites

I love the sharp cliffs but I can't find in the code where they come from and why they don't show up in setBaseTerrainDiamondSquare generated heightmaps :scratch_one-s_head:

While over all your approach looks similar to Caledonian Meadows I'd love you to try and find your own way of creating a playable map from this beautiful and realistic terrain ;)

EDIT:

Reading through the code a bit more the cliffs seam to come from "tProgress" specifying that finer details keep a high offset until the threshold? (I'd make this one an argument BTW).

And you recalculate the mountains to be rougher in the tour, very nice!

You also use e.g. some height limits from Caledonian Meadows so I guess you have roughly read through it already ;)

  • Like 1
Link to comment
Share on other sites

Hi everyone...

Does this remind you something ?

CalMeadowHacked.jpg.8198122ae5080dc543b4f5411ad63e33.jpg

Of course, it's Caledonian Meadows shamefully hacked. I replaced here map generation with my own code, and... Maybe you can even play it...
It's your fault, you all ! If you were not urging me like that...

3 hours ago, FeXoR said:

Reading through the code a bit more the cliffs seam to come from "tProgress" specifying that finer details keep a high offset until the threshold? (I'd make this one an argument BTW).

That's right. tProgress and tRough rule the noise factor attenuation. The problem is you don't need the same noise at large scale and details: you may want high but very smooth mountains, or a rather flat plain with very chaotic terrain.

3 hours ago, FeXoR said:

You also use e.g. some height limits from Caledonian Meadows so I guess you have roughly read through it already ;)

I think I can't deny anymore...:blush:

Friendly,

 

 

CalMeadowsHacked.zip

Edited by Pyrophorus
  • Like 3
Link to comment
Share on other sites

No need to be ashamed in any way ;p

I love how you drive this approach further!

And you made me think about how we can use code from water driven erosion to add details to realistic terrain maps without the water plane (I was told the engine doesn't really support that though somehow implemented with different water levels in mind) just with terrain texture. Though not as cool as rumbling rivers it would still add some more detail if painted with bog texture like an overgrown river or at least occasionally wet, muddy ground.

Link to comment
Share on other sites

6 hours ago, FeXoR said:

No need to be ashamed in any way ;

It was a joke, and a way to acknowledge  clearly most of the code in the script is yours.

6 hours ago, FeXoR said:

And you made me think about how we can use code from water driven erosion to add details to realistic terrain maps without the water plane (I was told the engine doesn't really support that though somehow implemented with different water levels in mind) just with terrain texture.

BTW, I didn't dare to keep this call:

// Apply simple erosion
for (let i = 0; i < 5; ++i)
	splashErodeMap(0.1);

in my quick hack, but you can try inserting it around line 315. I feared it could interact badly with cliffs, but I may be wrong. If you want to test that and other things on the script, I have introduced:

const seaRatio = 0.1;
const mountRatio = 0.15;

You can tune the water and rough terrain ratios in the map with them. Not fully accurate because the height map is cropped to the map size and to a round shape, but it's better than setting those levels only from height range. And  of course, this rules the bumpiness of the map:

var tRelief = (MAX_HEIGHT * mapSize) / 400; //  200 < reasonnable values < 800

I have too a water erosion function in my papers, but as you say, since it's impossible to have water at different levels, it's of little use, except  to create dry valleys or bogs.

Friendly,

  • Like 1
Link to comment
Share on other sites

Hi there !

Since winter is coming, it's time to deliver a new tour:

NewTour.jpg.3360e64e36232a6b0e83cb8a71642b73.jpg

Snow is of course the most prominent feature. It is disabled in savanna landscapes because there's no snowy baobab in the game  for now (cruel lack !).
Now, the maps conform much better to the various ratios settings (water, mountains, snow). It's done using a height histogram. So the tour no more produces empty seas or inaccessible mesas as before.

I think I'll work on actors and structures placement now but there is still a point which puzzles me. As everyone can see on the picture, transitions between snow and grass are ugly. I think I read somewhere it's possible to improve that, and if someone could point me to the trick, it would be great.

Thanks for you interest and support...

On 9/8/2017 at 2:23 PM, elexis said:

milestone Alpha 23

BTW, how much time left before feature freeze ? One week ?

 

 

aNewTour.zip

Edited by Pyrophorus
tour update
  • Like 3
Link to comment
Share on other sites

I assume the straight lines have the same cause than the sharp cliffs: The random offset not declining right from the beginning.

Erosion/smoothing and/or recalculating mountains/steep areas (and maybe flat areas too) should hide them.

Erosion/smoothing will wash away some details too though.

Wind driven erosion would also create structures similar to this so I don't think they are to bad ;)

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, FeXoR said:

I assume the straight lines have the same cause than the sharp cliffs: The random offset not declining right from the beginning.

IMHO, it comes much more from the algorithm working with squares. If you try with tRough = 0.5 and tProgress = 0 (this is the plain fractal algorithm where the noise factor  is exactly scaled to the edge size), you'll find those squares are still there. They are very efficiently hidden by a high noise factor of course, but the drawback is the terrain becomes hard to use for players. That's why I introduced the tProgress parameter to choke the noise factor when coming to details and smooth them.

Now, your solutions:

4 hours ago, FeXoR said:

Erosion/smoothing and/or recalculating mountains/steep areas (and maybe flat areas too) should hide them.

Erosion/smoothing will wash away some details too though.

 

1 hour ago, elexis said:

(rmgen1 remedies include SmoothElevationPainter, createBumps)

are certainly efficient, but I wonder if they're really needed. I created some hundred maps with the tour, and I would say less than five of them exhibit an obvious issue like the one we're discussing, only visible from particular point of views. I leave the point to discussion.

Friendly,

  • Like 3
Link to comment
Share on other sites

  • 4 months later...
On 1/13/2018 at 2:22 AM, elexis said:

Any updates? Would be sad to not put this to use in one way or another. The artifacts should be cleaned, but that shouldn't be impossible.

I don't forget this project and I'm still working (rather lazily :blush:) on it. But I have no substantial advance to show yet.

Thanks for your interest !

  • Like 2
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...