Pyrophorus Posted September 5, 2017 Author Report Share Posted September 5, 2017 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: 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 ! I have to find something else... Friendly, Quote Link to comment Share on other sites More sharing options...
elexis Posted September 5, 2017 Report Share Posted September 5, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted September 5, 2017 Report Share Posted September 5, 2017 On 8/30/2017 at 0:21 PM, Pyrophorus said: Desperately needs SSAO. 1 Quote Link to comment Share on other sites More sharing options...
Pyrophorus Posted September 6, 2017 Author Report Share Posted September 6, 2017 17 hours ago, wowgetoffyourcellphone said: Desperately needs SSAO. ???? Secret Service Armored Olibrius ? Symmetric Strange Analytic Oyster ? 1 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted September 6, 2017 Report Share Posted September 6, 2017 (edited) Screen Space Ambient Occlusion. (Graphical Effect). Nothing you can do with your map generator. Edited September 6, 2017 by stanislas69 2 1 Quote Link to comment Share on other sites More sharing options...
elexis Posted September 6, 2017 Report Share Posted September 6, 2017 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)? Quote Link to comment Share on other sites More sharing options...
Pyrophorus Posted September 6, 2017 Author Report Share Posted September 6, 2017 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 ). 2 Quote Link to comment Share on other sites More sharing options...
elexis Posted September 6, 2017 Report Share Posted September 6, 2017 Oh I like unconventional maps with chokepoints too (contrary to many lobby players). Using existing rmgen calls on top of your library was just an idea to improve the results of maps, not to replace your lib. 1 Quote Link to comment Share on other sites More sharing options...
FeXoR Posted September 6, 2017 Report Share Posted September 6, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
Servo Posted September 6, 2017 Report Share Posted September 6, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
Pyrophorus Posted September 7, 2017 Author Report Share Posted September 7, 2017 @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... 3 Quote Link to comment Share on other sites More sharing options...
FeXoR Posted September 7, 2017 Report Share Posted September 7, 2017 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 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 1 Quote Link to comment Share on other sites More sharing options...
Pyrophorus Posted September 7, 2017 Author Report Share Posted September 7, 2017 (edited) Hi everyone... Does this remind you something ? 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... Friendly, Â Â CalMeadowsHacked.zip Edited September 7, 2017 by Pyrophorus 3 Quote Link to comment Share on other sites More sharing options...
FeXoR Posted September 7, 2017 Report Share Posted September 7, 2017 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. Quote Link to comment Share on other sites More sharing options...
Pyrophorus Posted September 8, 2017 Author Report Share Posted September 8, 2017 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, 1 Quote Link to comment Share on other sites More sharing options...
elexis Posted September 8, 2017 Report Share Posted September 8, 2017 (Might be a bit early, but I'd love to have this proposal on our schedule. So if someone writes a short ticket with component Maps and milestone Alpha 23 at https://trac.wildfiregames.com/ that might help with not forgetting this feature.) 1 Quote Link to comment Share on other sites More sharing options...
Pyrophorus Posted September 9, 2017 Author Report Share Posted September 9, 2017 (edited) Hi there ! Since winter is coming, it's time to deliver a new tour: 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 September 9, 2017 by Pyrophorus tour update 3 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted September 9, 2017 Report Share Posted September 9, 2017 Months I hope. 3 minutes ago, Pyrophorus said: Â BTW, how much time left before feature freeze ? One week ? Â Â Quote Link to comment Share on other sites More sharing options...
Imarok Posted September 9, 2017 Report Share Posted September 9, 2017 The map looks nice, but this straight edge looks quite strange. Maybe a bug in your script? 1 Quote Link to comment Share on other sites More sharing options...
Pyrophorus Posted September 9, 2017 Author Report Share Posted September 9, 2017 1 hour ago, Imarok said: Maybe a bug in your script? Unfortunately, it's not a bug but a feature Most often those artifacts are unnoticeable but if you look at any map from zenith at sunset, you'll see them: At times, it creates some weird alignments like the one you marked. Quote Link to comment Share on other sites More sharing options...
FeXoR Posted September 9, 2017 Report Share Posted September 9, 2017 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 1 1 Quote Link to comment Share on other sites More sharing options...
elexis Posted September 9, 2017 Report Share Posted September 9, 2017 4 hours ago, Pyrophorus said: weird alignments like the one you marked. (rmgen1 remedies include SmoothElevationPainter, createBumps) 1 Quote Link to comment Share on other sites More sharing options...
Pyrophorus Posted September 9, 2017 Author Report Share Posted September 9, 2017 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, 3 Quote Link to comment Share on other sites More sharing options...
elexis Posted January 13, 2018 Report Share Posted January 13, 2018 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. 3 Quote Link to comment Share on other sites More sharing options...
Pyrophorus Posted January 14, 2018 Author Report Share Posted January 14, 2018 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 ) on it. But I have no substantial advance to show yet. Thanks for your interest ! 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.