Jump to content
  • Latest updates

  • Newest Posts

    • well looks like you wouldn't even need a mod to do this. You could do the following (and I'd be curious on the results): Set up a match with combat demo huge (in scenarios, demo maps) and choose different values with Engine.SetTurnLength(x); @phosit are the backticks included when typing this in the js console?
    • Regarding these charts: Can someone explain what the x-axis stands for in both left and right charts? The screenshot seems to be cropped just where it is written. I can't understand the meaning of these charts without it. If someone can explain it would be great.   If the turn rate can be changed in JS, then maybe @Atrik idea of doing a quick mod to test it could be worth. The only question would be if there is a way that the host can communicate the selected turn rate every time a new game starts. Else the mod would have a hard coded turn rate, which would not allow us to test different values on different games.
    • What do you mean by that?
    • Discussion about the overkill situation brought me to this vague idea: consider more units at an equal range, so that units spread out their damage a little. Ideally, a target precision value could be stored in the templates (higher for archers, lower for skirms for example) and then used to influence the 'EntityDistanceOrdering' on certain calls to the range manager. (Things like choosing the closest unit don't need to be super precise and maybe shouldn't be wrt overkill). https://code.wildfiregames.com/source/0ad/browse/ps/trunk/source/simulation2/components/CCmpRangeManager.cpp#:~:text=class EntityDistanceOrdering,}%3B Perhaps some replacement for .CompareLengths() could be used with an optional precision value (0.1,0.5,1,3,5,10). Since stable_sort is used, maybe this would also be faster with more 'equivalent' values?
    • Just a quick note another big performance improvement in A27 will be with the removal of spectre and meltdown mitigations in spidermonkey which slow considerably the js execution. wraitii did a few other improvements iirc but not sure which got it and which got reverted. The one about messages could potentially be good if it worked ^^"
    • It's okay. Perserverance is all you need Regarding your interrogation I think by default everything is INVALID_PLAYER = -1 You might also print this.entity so you know which is which. Ideally in one statement warn("entity: " + this.entity + " Owner: " + cmpFoundationOwnership.GetOwner()); Or use string interpolation warn(`entity: ${this.entity} Owner: ${cmpFoundationOwnership.GetOwner()}`);   Maybe we forgot the edge case of QueryOwnerInterface not having an actual player    
    • For the first part: Yes it would be good to implement that. There is a ticket: #5323 For the second part: There is also a ticket #3752 Most computation isn't executed every turn (or in a constant turn interval), like a builder deciding what to do when a field is placed. Still some computation does that, like the AI deciding what to do. IIRC An AI only executs each 8th turn. With more frequent turns the constant-turn-interval tasks could be spaced out more. So the average computation is roughtly indipendant of the turn length. Engine things (rendering, network...) Isn't done per turn but per frame. In a cpu intensive game there is a turn every frame. So engine things could be seen as constant-turn-interval tasks. (This entirely refutes my previous argument )   There isn't one magical thing which makes the game run fast (in a single thread (multithreading really is magical (that's a joke magic doesn't exist ))) If you only care about game speed (your complain 1) you want do as few constant-turn-interval tasks. Thus longer turns. If you only care about a responsive UI (your complain 3) you want to do as few sim-things per frame as possible. Thus shorter turns. About your 2. complain: I think in such a situation the fast clients repeatetly have to wait for the slowest client. When a fast client ends it's turn it has to wait's for the slow client to finish the turn. In this time the fast client shows an interpolation (IIRC 5 frames) to the user. When the slowest client is really slow thous 5 frames aren't enough. A solution (which just came to my mind, it isn't elaborate) would be to space thous "interpolation-steps" out, like one interpolation-step each second frame. The interpolation-step / frame ratio should be dynamic to the expected speed of the slowent client. Maby also the interpolation-step count could be dynamic. (I'm just thinking loudly at this point)   We head in the direction of decreasing turn length even more:   Hosts can already specify the turn length by typing `Engine.SetTurnLength(100);` in to the js console. (yes the feature is hidden) I'd like to see the results of your experiments .
×
×
  • Create New...