Game Speed
-
I would like to learn what game files affect the game speeds, calculation/editing durations on the Lobby or PBEM. What is the suggested size of XML files or whole zip size to have overall the lowest lag considering average RAM's and internet speeds.
Thanks.
-
Is this directed to the development side of Triplea?
https://forums.triplea-game.org/topic/2583/how-to-contact-the-development-team
Is this directed towards the map maker community?
-
Presuming the latter, that this is a question about map making.
Overall RAM and game speed are related but not directly related. The size of a game file after being parsed (observable after saving a game) does impact various aspects of the game as that is internally copied and transmitted over network.
The dominating factor there is the overall size of the map and the graphics. Bear in mind that the minimap works by rendering the full map at full scale and then shrinks that image down to fit the minimap.
Generally the smaller the XML, the smaller the images, the better. The size of the XML is not necessarily linear to the size of the resulting game objects as one can use for-loop and so forth that generate lots of game objects or vice versa, certain XML structures produce very few game objects. The parse speed of a XML file is now linear relative to the size of the XML and is relatively fast (it used to be super-linear). Once a XML is parsed, again, the game objects that are loaded from that do determine other performance characteristics.
One cannot really control much of the performance from a XML perspective other than creating a game-object footprint that is overall smaller. Different game-objects have differing weights to them that are significant at different times. Furthermore, there is a point where it is the underlying code that is a bottleneck. For example there are a lot of locks in the game that cause the game to just pause everything while it is waiting for something. At this point it is the code design that is preventing better performance. Generally most performance considerations are at this level.
TL;DR, generally the set of allowed XMLs should be handled in an efficient way by the game engine. If that is not the case, avoiding that XML or applying some other trick is not really the right solution and instead the code & game design should be looked at.
-
So, it's complicated as mentioned above. More pragmatically the following have been anecdotally observed to slow the game down:
- XML variables
- the total size of graphics
- total number of territories
- total number of game units
- generically the total number of game entities (triggers, territories, units, etc)
-
@LaFayette Its too bad you never go into any details when you provide explanations!
-
@LaFayette I think the two most extreme games to test game file (XML) limits are "War of the Relics" and "270BC Wars" (both extensively use triggers with chances to cause random events). Both maps of these games are also quite small and simple, so they should impact little.
On my system, with TripleA 2.5.22294, War of the Relics takes 2 seconds to load and 270BC Wars takes 4 seconds. I mean the time between clicking "OK" in the "Select a Game" window and having the game loaded. Any other map, instead, takes less than 1 second (or about 1 second for "Total World War").
By the way, War of the Relics used to take more han 30 seconds to load! Not sure why it is so much faster now.
As as example, a user affirms he cannot use the battle-calculator when playing my "270BC Wars" on local but he can if it plays it in someone else's host or an automated one (bot).
This is a discussion in a privae host, so I changed the names of the players with "User1" and so on for privacy:
(22:26:45) User1: still I can't understand why game works so slow in my computer when its nowhere as big as other giant sized maps
(22:27:08) Cernel: the gamefile is the biggest in triplea
(22:27:14) Cernel: so this game is the biggest in triplea
(22:27:26) Cernel: the game, not the map
(22:27:36) User1: according to lafayette xml is not the only factor
(22:28:19) User2: oh
(22:28:29) User2: Edit Syracuse to Messana plz
(22:29:21) Cernel: btw what do you mean by slow exactly User1?
(22:29:26) User1: wow sorry after noticing yoru xml is even 7 times bigger than TWW
(22:29:30) Cernel: when it is slow?
(22:29:46) Cernel: only 7 times
(22:29:49) User1: just in every aspects, move, undo, calculations etc...
(22:29:50) Cernel: ?
(22:30:03) User2: yeah
(22:30:13) User2: I can't even run a battle calc when I host a local game
(22:30:29) User1: TWW=2.54 MB 270bcw=18.5 MB
(22:30:33) Cernel: ah
(22:31:01) Cernel: well I'm sure you could if you would increase your ram
(22:31:15) User2: I wish I knew how
(22:31:20) User1: thats insane one barbarian feature massively overwighted all very complax TWW codes
(22:31:50) Cernel: when you have your program "TripleA" installed in Programs there is a file called "vmoptions" where there are the values set
(22:32:28) User2: I have a cousin that is a software engineer. Next tiem he is over I will have him help me with it
(22:32:33) User2: time*
(22:35:23) Cernel: if only I could convince the developers to have it 4G default instead of 2G there would be no need
(22:35:34) User2: why don't they?
(22:35:43) User2: are they worried some computers won't support that?
(22:35:49) Cernel: I guess because almost no game need it
(22:35:54) User2: yeah
(22:35:54) Cernel: very unlikely
(22:36:06) User1: I think the opposite they should set a max. cap
(22:36:19) Cernel: there is a max cap
(22:36:21) Cernel: it is 2G -
@LaFayette If you are talking about AI speed, my experience is that the number of units is the big factor determining speed.
-
I only play against the AI. I would agree with RogerCooper the more units the slower the AI. I would add that if a lot of the units move 2+ this will also slow the game down.