Jump to content

historic_bruno

WFG Retired
  • Posts

    2.755
  • Joined

  • Last visited

  • Days Won

    47

Posts posted by historic_bruno

  1. 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.

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

  3. 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.

  4. Great video, Pureon! It really shows some of the graphics improvements we'll have for Alpha 5.

    The assets used in the random maps are somewhat outdated. But if I deleted the old assets then the random maps would error. I think it's much simpler to use one large mine in place of many small ones.

    Ah, that's useful information. I can change the random map scripts to use single mines if we prefer those. Actually I had to guess about what assets to use, since most had been renamed or deleted, and I'm not really a map designer. :)

  5. Details: unhandled exception (Access violation writing 0x00000000)

    Location: unknown:0 (?)

    Call stack:

    (error while dumping stack: No stack frames found)

    errno = 0 (?)

    OS error = 487 (Attempt to access invalid address.

    )

    Couldn't find the the crashlog files or else I would have attached them here like instructed to. Sorry in advance if this was a very common bug on this board.

    Drew

    Unfortunately we'll need crash logs to make any sense out of it. If you're in Windows the logs should be in %appdata%\0ad\logs or in Linux ~/.config/0ad/logs.

  6. A few suggestions for improving TestBot and the AI system generally (including UnitAI):

    • Resource collectors will walk all the way across the map to find the nearest resource of the type they want, even if that's in an enemy base! I can't think of many situations where this is a good idea:
      • It takes a long time to reach the destination and by that time the target resource is often gone anyway.
      • Some resources just aren't important enough to risk losing villagers, for example berry bushes. It's quite simple to acquire food by other means.
      • How does the AI know there are resources far away? I think we want to restrict their "knowledge" of the world to what they've actually explored. So the AI will need to "scout".

      [*]If resources are far away from the base, build a drop site (mill or farmstead).

      [*]Soldiers can work too, so if they're not otherwise employed, they should collect resources and construct military buildings.

      [*]Units are able to become "deadlocked" in a few ways I've noticed:

      • If many workers are assigned to construct a new building, others that are passing by may end up stuck while standing on top of the foundation, possibly being told to clear off by the UnitAI but refusing because they have other orders. Maybe we need to prioritize the orders.
      • There should be a timeout so that if a unit can't accomplish an order in a certain time, they give up or wait for a while.
      • If there's a narrow pass and units are going to and fro in opposite directions, they might by chance block each other and constantly try to move in avoidance, but they seem to mirror each other. This is oddly similar to RL behavior but we should probably be smarter than this ;)

  7. Ah, good thing I didn't start working on this, too :D

    I'm using Visual C++ 2010, and with our current version of premake I have to convert 2008 projects every time a source file is added or removed (requires several steps and 2008 projects seem to be broken anyway). That was enough for me to at least look at the new premake, but as the structure is totally different I didn't pursue it. It's great that someone else has! This will make a huge difference in ease of development on different platforms.

  8. Something I just noticed. Shadows don't fall on water, they pass right through. Thats not how it works in real life. Shadows fall on the surface of the water and(if its shallow) also on the sea bed below. Like this and this. now, i don't think we'll need shadows on the sea bed, but shadows on the surface of the water make it seem much more realistic, imo.

    That would look nice, but I wonder how it would affect performance?

  9. Great suggestions, thanks! That's what it needs to improve :)

    All maps are square rather than round.

    OK, I can change the setting to circular easily. The map scripts will need a bit of tweaking.

    Most maps could probably do with a little more resources.

    Definitely agree with this. And the resource generation is funky, sometimes it's based on map size, others it's the number of players. This should be fixed before they are truly "playable".

  10. Here's what I'm toying with now for the skeleton of a random map script:

    1. Written in JavaScript (same as simulation, GUI, and AI scripts)

    2. Optionally calls LoadLibrary(), which will load scripts for map generator implementations. It loads a whole directory, e.g. "/maps/lib/rmgen/*.js" This lets us switch easily from one implementation to another and test new ideas.

    3. Calls InitMapGen() to create the map data structures.

    4. Does stuff specific to the random map, like placing mountains, forests, civic centres, etc.

    5. Calls ExportMap() to send the results to the engine.

    Here's a simple RMS which would generate a blank map with 1 civil centre and 3 female citizens per player. It uses an rmgen-like API:


    //////////////////////////////////////////////////////////////////////////////
    RMS.LoadLibrary("rmgen");

    //////////////////////////////////////////////////////////////////////////////
    // initialize map

    log("Initializing map...");

    InitMapGen();

    //////////////////////////////////////////////////////////////////////////////

    var numPlayers = getNumPlayers();
    var mapSize = getMapSize();


    // place players in a circle

    var playerX = new Array(numPlayers);
    var playerY = new Array(numPlayers);
    var playerAngle = new Array(numPlayers);

    var startAngle = randFloat() * 2 * PI;
    for (var i=0; i < numPlayers; i++)
    {
    playerAngle[i] = startAngle + i*2*PI/numPlayers;
    playerX[i] = 0.5 + 0.39*cos(playerAngle[i]);
    playerY[i] = 0.5 + 0.39*sin(playerAngle[i]);
    }

    for (var i=0; i < numPlayers; i++)
    {
    log("Creating base for player " + (i + 1) + "...");

    // get the x and y in tiles
    var fx = fractionToTiles(playerX[i]);
    var fy = fractionToTiles(playerY[i]);
    var ix = round(fx);
    var iy = round(fy);

    // create the TC and citizens
    var civ = getCivCode(i);
    var group = new SimpleGroup(
    [ // elements (type, count, distance)
    new SimpleObject("structures/"+civ+"_civil_centre", 1,1, 0,0),
    new SimpleObject("units/"+civ+"_support_female_citizen", 3,3, 5,5)
    ],
    true, null, ix, iy
    );
    createObjectGroup(group, i+1);
    }

    //////////////////////////////////////////////////////////////////////////////
    // Export map data
    RMS.ExportMap(SaveMap());

    In order for the RMS to be recognized by the game setup, there is an accompanying raw JSON file:


    {
    "settings" : {
    "Name" : "Simple test",
    "Script" : "test.js",
    "Description" : "Simple test of an RMS",
    "BaseTerrain" : "grass1_spring",
    "BaseHeight" : 10,
    "RevealMap": true,
    "GameType": "endless",
    "XXXXXX" : "Optionally define other things here, like we would for a scenario"
    }
    }

    This is analogous to the ScriptSettings element of a scenario XML file.

  11. The difficulty is what to do with overlapping silhouettes, of the same colour or of different colours. We can't control the order in which models get drawn (because of performance concerns), so they're effectively random (though consistent from frame to frame). If we could use additive blending, like this, the order doesn't matter since it'll just add all overlapping polygons. If we want standard blending, like this, then whichever model randomly happens to be rendered first will be the one you see, which goes a bit weird for units consisting of multiple models (see the archer's vanished heads (or, rather, don't see them)). But the latter case will be fine if units are all the same colour, and probably players won't really notice when multiple colours are overlapping a little weirdly, so we can do that if people don't like additive blending.

    Yes! Either of those are a great improvement IMO. But I agree having this at all is fantastic :)

  12. we could represent water as a heightmap instead of a plane, and then have 'fill' and 'empty' tools that do a kind of flood-fill to let you easily produce flat bodies of water, with independent rendering settings for each body, or whatever

    I don't know what impact this has on reflections or rendering cost, but it seems like the best long-term strategy for water. Assuming you mean where the water heightmap intersects the land heightmap, water gets rendered. It could be forced parallel to the surface of the land, actually just below ground level, so we don't have "peaks" of water sticking up in a field by accident. Then we could have features like rivers that flow downhill, for instance :)

    I imagine in Atlas you would do something like select a water brush, optionally change depth and appearance (color/reflectivity/etc), and then paint it right across existing terrain. Atlas would deform the land slightly and raise the water heightmap appropriately.

×
×
  • Create New...