Jump to content

Pyrophorus

Community Members
  • Posts

    78
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Pyrophorus

  1. Hi everyone,

    You'll find here slightly modified female meshes. Not a big deal... just to give female actors a (IMHO:blush:) nicer look. If @stanislas69 didn't suggested me strongly to post it, I would never have made public this personal modification.

    In the game, the differences are quite unnoticeable:

    fem-meshes.thumb.png.fe6da5e12c7070b14ce82908798c6625.png  

    Original meshes are on the right.

    A better view in Atlas: (people offended by breast nudity shouldn't open this)

    Spoiler

    newMeshes.png.ccdd8ef483cb2c05e941f99751b2e8a7.png

    compare with original:

    origMeshes.png.16120262b7f977ced8402155dec2d65f.png

    Just for fun, the archer on the right is an amazon, whose right boob have been cut as everyone knows. Of course you have to edit or create an actor to use it, because the game knows nothing of it.

    You'll find the modified meshes used by the game in the first archive. If you don't already know where to put them, create the '../art/meshes/skeletal/new' folder in the 'mods/public' of your local folder.

    Friendly,

    newFemMeshes.zip

    amazonMesh.zip

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

    • Like 3
  4. 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
  5. 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

    • Like 3
  6. @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
  7. 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
  8. 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,

  9. Hi everyone !

    I should have thought people here have not much time to spare editing my script and try the settings. My bad...

    So in the script below, I have randomized the main settings to show the maps one can get with the library. Changing the map size and random seed in Atlas will show a large variety of maps, from flat landscapes (with or without sea) to steep mountains. It's a tour, so don't tell me there's no control on the map and the result is not predictable !  :P

    landscape-9.jpg.387df775f98aefc47ee7c1c04b0e0fce.jpg

    There's no need to update the library if you already install it. I put it here for those who don't have it.

    Friendly,

    aTour.zip

    yamg.zip

    • Like 4
    • Thanks 1
  10. 6 hours ago, elexis said:

    Nice work Pyrophorus!

    Thanks for your feed-back and appreciation !

    6 hours ago, elexis said:

    I'd advise to create one or more random map scripts for multiple reasons. Foremost, lobby players almost exsclusively play random map scripts (because they can change the number of players and any other setting arbitrarily). Secondly because it is very rare that someone actually proposes a polished map for 0ad that was done with the map editor.

    OK...

    6 hours ago, elexis said:

    With regards to your code, you should take care that the generated map is round (thats the convention, looked better with the minimap. Is also better for gameplay as noone can hide in a corner and all players have the same distance to the center of the map. Also square maps have 4/pi times more area on the same mapsize, i.e. 27% more which often causes unintended performance-lag).

    Yes, I don't forget the maps must be round and they shall be. BTW, it's easy to set the round flag in the json file. But it's still a work in progress, so it's easier to see accurately  how the script works on square maps. For now, I'm working on improving relief variety. Basically the script produces homogeneous maps, e.g. steepness and smoothness are everywhere the same. In the last picture I posted, maybe you noticed there is a rather flat part of the map. The idea is to have steep peaks and flat valleys, and more maybe (underwater and shore relief also are different).

    let peakHeigth = tRelief /3;
    for (let i = 0; i < mSize; i++)
    {
    	for (let j = 0; j < mSize; j++)
    	{
    		if( tMap[i][j] > peakHeigth)
    			tMap[i][j] = -1;
    	}
    }
    
    var tRough = 1.05; // this one rules the ground irregularity, from 0.1 (smooth) to 1.2 (very chaotic and probably not playable)
    var tProgress = 64; // difficult to explain this in few words, try it from 2 to mapSize (power of two). See algorithm for details.
    createAltitudes(0, mSize, 0, mSize, (tRelief * 1.5)); // redraw high peaks

    It's how it works: parts of the map higher than some limit are redrawn with parameters giving this kind of chaotic terrain, leaving the lower parts untouched.

    7 hours ago, elexis said:

    Put some players there, straggler trees and details and try to make the resources balanced (as in guaranteeing 40 starting trees for each player).

    It'll be important that there aren't wide areas void of entities. There can be open space, but the eye should always have something to look at.

    I saw water can be generated as well, so you might have to paint terrain below players (like archipelago random map script does) or ensure that there is sufficient space for each player.

    Yeah, I will do that ;) But I'll try a rather ambitious idea. Instead of spreading resources everywhere equally on the map, I will try to put them in rather realistic places (like  stone at the foot of the cliffs and so on), and later  try to find optimal settlements, given this resources layout (some kind of barycenter of resources, on flat places and so on), just as real people would do colonizing a new land. I have no idea if this could work and give rather balanced maps. Spontaneously, I would say: certainly not. But who knows ?

    Friendly,

    • Like 3
  11. @stanislas69 Thanks for your reply.

    About control, it's an important point. Of course, you need some, and much more in the second use case, but IMHO, the more control you have, the more work you need to put it at use. And I think when you accept some lack of control, you can be rewarded obtaining something you would never have imagined. For myself, I would never have imagined a map like the one in the previous post, and creating it with a height map would be a very, very long task (except if you use an existing one). This is why I work on random map creation instead of designing maps from scratch. Results  are IMHO most often far better than what I could get all by myself.

    Friendly,

  12. I can't resist the pleasure to share this,  produced with yamg in Atlas:

    landscape-7.jpg.a7735e6c047b479966125808d74e1cd6.jpg

    Now, I have another question. I think I see two use cases of random maps in OAD.
    - Map designers can use them as a starter for their work (I think painting by hand something like this picture above, would cost a lot of time)
    - Random maps designers try to write scripts creating playable maps out of the box, of any dimension and random seed.

    Which is the most important one ?

    Friendly,

    • Like 4
  13. Hi everyone !

    So here is my little random map generator library. This alpha version is far from perfect yet, but I hope it deserves an eyeshot already.

    landscape-7.png.fdb901cfb4698f830c74b3569138056a.png


    The archive contains two files and a folder to insert into your local settings at: Oad/mods/public/maps/random. The 'yamg' folder contains a library used by the demo program which creates a random map (Venustas only, it seems there are some differences with earlier versions). Of course, if you prefer all in a single file, you can copy/paste the whole library replacing the 'RMS.LoadLibrary("yamg");' instruction at the beginning of the map script 'aYamgDemo.js'.

    The picture here is a 'medium' map using the '7964' random seed value. I only changed the default sun settings to emphazise the relief.
    Open the map script and feel free to discover the various settings and options. You shouldn't need to edit the library itself. Just be careful with forests on large maps: the script could try to place a huge number of trees and will then choke Atlas.
    Have fun !

    Now, I must say I'm not satisfied with this program for some reasons and would be glad to have a discussion about them. Of course, many details could be improved like round maps correct management and terrains melting, for instance. But this not really a big deal.

    A more serious reason is the library is too low level IMHO. For instance, someone could want a river crossing the map, a mountain in the north-west and so on. It's possible to do that with the library, but it's far from obvious and easy. I need ideas to build a higher level framework, and if you have some, you're welcome.

    The last reason is more abstract. I have worked for years on the topic (creating random maps for games like OAD), and always stumbled on the same problem: creating realistic and good looking maps is one thing, but most often, realistic maps are not balanced at all and even not playable. And well balanced maps are often not very realistic, because they are too regular and exhibit kind of patterns. The real challenge is to have both, and I don't know if it is even possible (contradictory?). This is why I don't rush to code other things like roads or resource placement. How could we define a balanced map in terms of constraints, this is the question I ask to everyone interested here, and I hope to have a discussion about it.

    Friendly,

     

    yamg.zip

    • Like 4
    • Thanks 1
  14. Hi all !

    Not sure I should create a thread for such a little thing...

    In the script below, you'll find a function which creates heightmaps, an alternative to diamonds square method. Smoothing is integrated in the function, and is scale based, not uniformly applied on all tiles. Maybe this could profit to someone.

    More of it, you can reapply the function on parts of the map (with different parameters of course). In landscape-3, a rough mountain is surrounded with softier terrain.

    Don't tell me painting and starting placement are really poor. Yeah, I know... I haven't yet fully scavenged FeXor great work, but I will soon !

    landscape-1.png

    landscape-2.png

    landscape-3.png

    aFractalDemo.zip

    • Like 8
  15. Thanks to you all !

    5 hours ago, fatherbushido said:

    For the Capture thing, it should be fixed sooner or later. If you really want do it, you have to see that in your mod, something like (provided without warranty) should do the job:

    OK, I'll check this, even if...

    4 hours ago, wowgetoffyourcellphone said:

    This kind of thing get you in trouble later when the file is changed by the public mod. I should know...

    [EDIT] Actually, it works... Great...

    5 hours ago, fatherbushido said:

    For the second thing,

    what do you mean by specs?

     

    I mean specifications/properties/values for a structure or a unit. For instance, if I change the Attack/Hack value in a unit file, I think I will see this new value in the unit info, even if I load a saved game where the unit had previously another value. But it seems it's not the case with structures (they keep their original values AFAICS). Is this right ?

    5 hours ago, fatherbushido said:

    The xml entries documentation is currently not online but I attached it as an html page.

    entity-docs.html

    Thanks for this great resource. It's just what I expected.

    Friendly,

  16. Hi everyone,

    New to the game, I created a new civilization to explore all the technologies, units and so on. The way one can modify the game even in details is really impressive and really easy. Thumbs up !!! Just a little thing: it would be nice to have a DTD for units/structures xml files, mainly to offer the many options the various tags have. For instance, the <passability_class> have "large" and "default" possible values, but you have to scan many files to discover  that (and maybe there is another value I missed ! :-)).

    Now with my questions:

    • I tried to give a <Capture> attack to siege tower (inheriting from template_unit_mechanical_siege_tower). In the game, the siege tower has the "capture" cursor, and clicking a building make the tower move and stop at the "MaxRange" distance, but then, no capture happens. The tower keep shooting arrows and the capture bar of the building don't change. Is it normal or I missed something ?
    • When loading a saved game, at least some specs of the units are updated from the description files (if changed meanwhile), but structures specs are not. Is this correct ?

    Thanks in advance for the replies...

    Friendly,

    • Like 1
×
×
  • Create New...