Page 2 of 2

Re: SaveGame

Posted: 26 Apr 2009, 13:27
by SpliFF
Great tip Beherith, thanks.

Did some benchmarking using /skip

The limiting factor in the end wasn't strictly unit count, but unit pathing. There was only a marginal speed different between 10 units and 500, however speed falls off by approximately 100x if all 500 land units are patrolling. Both tests were strictly single player (no active AI) so measurements do not include projectiles, attack manuevering or AI logic.

For a "reality check" test I downloaded this replay which is a 1h 38m 8-way CA on The Hunders v3. Skipping to the end took about 10 - 15 minutes (I left the room and missed the end of the countdown). I doubt most people would be patient enough to use this on a regular basis.

The only solution I can see would be a major rewrite of the pathing system and possibly the projectile system as well. Since replays have the benefit of hindsight there may be some opportunities for caching or selective processing. One example would be to store the results of expensive computations in the replay. For example you could store a bitfield value of 1 each time a projectile has an effect on the sim state (ie, interacts with something other than terrain). That way you could remove projectiles that miss from further computation. This would have to be done with utmost care to ensure no side-effects with Lua or interceptors (like missile defense).

On the positive side I did notice that my CPU usage never went over 55% during playback so there may be opportunities to improve CPU usage (especially across multiple cores).

I think this more or less explains why this hasn't been done. On one hand you have a hit-and-miss attempt to store important state statically and on the other you have potential loading times that exceed the actual playing time of your average game.

Re: SaveGame

Posted: 05 May 2009, 21:41
by el_matarife
SpliFF wrote: For a "reality check" test I downloaded this replay which is a 1h 38m 8-way CA on The Hunters v3. Skipping to the end took about 10 - 15 minutes (I left the room and missed the end of the countdown). I doubt most people would be patient enough to use this on a regular basis.
That's a a lot longer than most regular games though. If the 10x realtime number you're getting there is accurate, I think it might be viable to pause/resume or join games in progress up to 30 minutes in with no problems.

Re: SaveGame

Posted: 06 May 2009, 15:14
by YHCIR
FWIW, I have found that if I run a replay above 4x or 5x speed, after a minute or two, it has a massive delayed response to input, and I can't slow it down.

Re: SaveGame

Posted: 06 May 2009, 19:50
by zwzsg
But at least now pause works.