Warcraft: War Heroes - Official Thread
-
Looks badass! I was a tides of darkness kid when II hit. Dabbled a little in III, though sadly I missed out on WoW, cause I was deep in school at the time and new it would just ruin me if I opened that box hehe. But its cool to see this universe getting a tripleA treatment. Can't wait to check it out
-
Here is a small progress report for this map
All the unit art work is done (almost), so I have begun working on the “Hero Bar” information. The Hero Bar is what I call the top right part of the map, dedicated to displaying hero information like stats, level progression and backpack items. The idea is that when hero unit levels up or captures an item on map, triggers remove it and places a corresponding item in the hero's backpack ... this again triggers a change/upgrade of hero unit’s stats.
Like on this map screen shot of a randomly seeded map, just left of the Troll starting area, you find the “Leatherneck” collar item. Picking this up should give “isMarine” to the troll hero unit called "Sian-tsu". The purple item to the north is the “Pendant of Mana” that gives the hero unit +4 Mana resource generation:
Here is a picture of how a hero’s information is displayed at the hero bar:
However, I have also run into an unexpected problem that seems to set a full stop to any testing out this map
The map runs fine when under human control, but when the nations are set under AI control, the pace slows down after 4-6 players have had their turn. After round 1 is over, it practically takes 30-60 minutes for an AI player to take its turn.
The map has 8 main players starting out with 1 territory each + 24 AI small players with 1 territory each (the players are neutral to each other).
In round 1 the 24 small players have no walking/fighting units, just a factory unit placed randomly on the map during territory picking.
In round 1 every small AI players’ only option is to build and place a unit at its factory, but even this is apparently demanding for the AI’s calculations.
In round 2 the AI players only have 1 unit under control and can walk 1 territory out, but this is also apparently demanding for the AI’s calculations.Maybe it is not the 24 AI players that causes the lag. I have tested out an 8 human player + 1 big AI player, but this version also slows down the game to the same degree, making it unplayable. So I suspect that it is maybe the 400 land territories that is the problem. (???)
Have any of you guys and gals had experience with huge maps and AI?
Is there a developer here willing to download a working alpha version of “World of War Heroes” and maybe figure out what is slowing the map down?
I can provide a dropbox link for you to download from.
Help will be much appreciated … as this extreme slow AI playing / memory problem makes the map unplayable -
@Frostion Wow! The screenshots look great. And really liking the ideas and concept here.
I'm glad to take a look at the AI performance issues if you send me a working zip of what you have so far. First question is did you try both the Hard and Fast AI? As if both are slow that narrows down the issue already vs only Hard AI being slow. The 2 most common things that I know of that cause the AI to be slow are number of units being high so simulated battles take a while (probably not the case here and only impacts Hard AI) and the map having a large number of territories (probably the issue here).
I can probably do some quick testing to see which calculations are taking a very long time and make some adjustments. There just hasn't really been any maps that have gotten to the point where the AI takes more than a minute or 2 so haven't really tested anything bigger than probably World At War.
Oh and just to add, number of AI vs human players has virtually no impact as each AI essentially takes its turn separately. Overall number of players has some impact but number of territories is the bigger factor.
-
@Frostion Domination 1901 has about 500 land and 200 water territories, turns take around 90s for Hard AI.
-
Thanks @redrum. I am at a loss about what is slowing the game down. As @alkexr says, other maps have similar amount of territories, and run much better (still slow I guess), so I can’t see what makes this map extra exhausting for the AI.
The most puzzling thing is that it is so slow, even though all players start out with 1 owned territory.
Dropbox link sent. To test the map, I advise you to just run an all AI game.
BTW because of the change unit on death to another unit, I have of course played with pre-releases. I think I have also tried. I have mostly played with Hard AI.
-
@Frostion The main issue I found so far is actually that you have a troll and human sea unit after the first set of major player turns that has 100 movement and can transport units. For each AI, it runs calculations to determine the possible moves/attacks from all the other players when determining where it should move. Checking the possibles moves and amphib assaults means for these 100 move ships ends up checking every sea territory and land territory adjacent to sea territories on the whole map. The AI also assumes worse case scenario so doesn't limit the possible moves base on needed fuel (assumes its enemies could possibly get more fuel before moving).
So I guess the question is what's the purpose of these ferry units and do they really need 100 movement?
I did some quick tests and if you either remove their ability to transport units and/or vastly decrease their movement points to say 5 then it seems to run a lot faster.
-
@redrum Also guess another user case for being able to set infinite. I wonder if in such a case the AI would go any slower if set to 100 or 1000, assuming 1000 never allows you to do more than what you can with 100?
-
@Cernel Umm hard to say without running some tests but looking at the code it would have a potential impact and infinite would actually run forever with the current engine code (though infinite would probably correspond to max integer value in Java so wouldn't actually run forever). I added a check in to improve performance where if its already checked all the territories it can reach on a map then it stops searching so that 100 vs 1000 should be the same performance if 100 is already checking all possible territories.
@Frostion I made a few engine improvements for maps with lots of territories and then changed ferries to have 5 instead of 100 movement. I ran a test game with all Fast AI players and got to round 8 in probably about 30 minutes: test.tsvg
@alkexr Yeah, I ran some tests on WaW, Another World, and some of the Domination maps which I think are probably the largest maps we have. I'm making some performance improvements for maps with a large number of territories though this map's issue is primarily the 100 move transport units. If you add units like that to those other maps, you'd probably see performance tank as well.
-
@redrum The Ferry unit is a transport that only heroes can use. With the prerelease I have installed, even when they have a movement like 5 move, the AI is still uses a long time to purchase a single unit (the only thing AI can do during round 1), and in round 2 most AI players cannot afford a second unit, but the ones who can, is also here very slow to make the purchase. It seems to me that it is during purchase the slowing down happens.
With the very limited options the AI players have, I can’t see why it takes so long for it to purchase.
I will try to use some of the newer pre-releases and see if there is any differences.
-
@Frostion Ok. Did you at least see a noticeable improvement when decreasing ferry movement from 100 to 5? Can you give me a ballpark in say round 2 on about how long a major AI turn takes and a neutral AI turn takes? You might want to try increasing the memory allocated to TripleA as well given how large and detailed the map is: https://forums.triplea-game.org/topic/524/how-to-increase-memory-for-triplea. The default is 2GB but providing 3-4GB might help.
I don't think you'll see much difference in newer pre-release versions until I include some of the performance improvements I'm making now. I'm also vastly decreasing the time it takes for the RandomStartDelegate as that is really slow right now and waiting several minutes for the map to start up each time I test something is painful
-
A quicker random start delegate would be great. I guess it would be nice to have AI place without delay even though the “AI pause duration” is 400 ms. Perhaps the random start should just happen as fast as possible and not be affected by the “AI pause duration” setting. This has also been an issue in the Star Trek map, where players also have to wait some time for all planets to be placed.
Yes I think the 100 to 5 move has speeded up the map a lot, but it still seems that the small AI players use a lot of time when purchasing.
I have tested out how fast the map runs on my PC:
Intel i5-4670K @ 3.4GHz
16 GB RAM
Win 64-bitHard AI test results: (not including the random start delegate’s time to set up a game)
Round 1 finish: 12 minutes and 40 sec into the game
Round 2 finish: 30 minutes and 30 sec into the game
Fast AI test results: (not including the random start delegate’s time to set up a game)
Round 1 finish: 12 minutes and 50 sec into the game
Round 2 finish: 30 minutes and 05 sec into the game -
@Frostion Ok. The random start delegate actually doesn't use the AI pause duration just had a hard coded 250ms. I've changed that to 10ms so it runs much faster now.
30 mins for round 2 is really slow. I've made a bunch of performance changes to the AI and I'm now seeing round 2 take 4-5 mins so much better. I'm just doing some tests on other large maps to ensure performance is equal or better on them before I create a PR for the changes.
-
@redrum hey do these changes effect the WWIIClassic map AI at all?
-
@Captain-Crunch Technically they impact the AI on all maps but definitely more so on larger maps. Probably won't notice much of a performance difference on ww2 classic as its a pretty small map in comparison to many others but should be a little faster. Its mostly about making some of the AI calculations more 'regional' instead of 'global' so it only runs calcs where it has units to move/place. So that on large maps for example Japan isn't calculating a bunch of unnecessary things over in the European theater.
-
Sweet ! Always like seeing the AI get improved ! Although i did watch Terminator last night : )
-
@Frostion Here's the PR: https://github.com/triplea-game/triplea/pull/4764
Once that's merged then I'd ask you to download the latest pre-release and test it again to see if it made a significant improvement.
-
@redrum said in World of War Heroes – Official Thread:
@Frostion Ok. The random start delegate actually doesn't use the AI pause duration just had a hard coded 250ms. I've changed that to 10ms so it runs much faster now.
Are all the developers sure about this change? The main reason the random start delegate was made (by Veqryn) was to make Risk. Now, Risk has never been made, but if you think about a similar sized game (or you can take a look at "Conquest of the World"), 250ms allows you to have a quick glimpse ad who gets what, and you don't need to wait much. Without getting into any more complexity, maybe 100ms would be a reasonable compromise? At 10ms, I would rather suggest to just run it in the background and give the final solution istantly (thus 0ms); I suppose looking at a 10ms would give little else than a headache. Anyways, I don't really care about it myself.
-
@redrum That last update to the prerelease practically solved the problem! Right now it runs very smooth, just like a small map Unfortunately I have to go to work for 3 days now, so no map working for some days
I felt I had hit a wall in regards to play testing World of War Heroes, but now I really look forward to going back to mapworking@Cernel "I suppose looking at a 10ms would give little else than a headache." The screen camera does not follow the territory picking around when AI is picking territories/placing units. In Star Trek I have never seen this either. Maybe because the human players are not involved in the picking?
I only see the picking on the minimap. But if the engine camera was to follow the picking and placements, maybe a user engine setting could be implemented to set the speed of placements? Or a feature that would automatically turn down the speed of picking territories if humans were also involved in the picking? -
@Frostion Glad to hear the performance improvements worked. Seems like you have a pretty solid start on the map. Let me know if there are any other features or improvements that are needed.
-
@redrum Thx. I think that the plans I have for WoWH at the moment are all doable with the current engine. But who knows, something might come up