Loading...
  OR  Zero-K Name:    Password:   

Performance in recent engine

9 posts, 935 views
Post comment
Filter:    Player:  
sort
chaplol
Sometime in the past two releases, it seems that endgame drags to a complete halt on my machine. The biggest identifiable pattern is "lots of stuff happens on the screen", but that's not helpful information. So, I'd like to have a hack at trying to figure out what's going on myself. That said, I'm hitting roadblocks in building testing methodologies, logging information for post-hoc analysis, non-familiarity with existing testing toolchains, etc and could use some pointers to set me in the right direction.

To start, maybe y'all can answer some questions:
  • What's a good methodology for consistently building performance metrics, generally? I figure that running a known replay would work, but I don't have enough familiarity with ZK's engine to know if there are hidden nuances that would make that a good or bad test.
  • How can I collect detailed logs of performance of ZK? I tried the FPS logger widget, but I'm interested in (at least) all information found in the /debug screen, but I'm sure there's more helpful queryable info to pull. Really, the more data, the better -- I'm not shy to loads of perf data. If I need to modify or create a widget, that's fine.
  • Is there a decent/documented way to read replays programatically so that I can correlate a past game's game-state with logged performance logs? Ideally, I'd also like to modify (or build from scratch) replay files and run tests on top of those. (I realize that's probably not as simple as just inserting client/server commands into a save file, but I'm willing to learn the file spec to the Nth degree to find a way.) https://github.com/dansan/spring-replay-site/blob/master/srs/parse_demo_file.py looks like it's a good start, but I'd like to understand gotchas first before just diving into that so that I don't waste too much time.
  • What's the best source of low-level documentation of the spring engine? If you can hold off a "Look at the code" answer so that I can at least have a starting point, I would appreciate it. If the documentation's non-existent or just bad, pointing me to some important components would be helpful.
  • What toolchains exist to launch a ZK game from start to end, either from CLI or some other automation? My goal would be to collect metrics against different config settings changes, changing engine number, adding AIs.. things like that.

If a dev would be able and willing to work with me for an hour or so one of these nights in doing a brain dump of sorts, I'd love to chat.

Cheers.
+4 / -0


2 years ago
It will be good for someone with the issue to track it down.

The only profiler I'm aware of is the one that runs in chobby. It takes config files and replays, runs the replays some number of times, and prints out the stats collected during the replays. ZK doesn't print out stats by default, so I run the profiler on replays generated with a mod and start script. The start script uses the campaign system to create and run a minute of "battle".

The most recent files are here: https://github.com/ZeroK-RTS/Benchmarks/commit/42a9fb689214da33b376a3fe049bfcaa9818fc6c
  • The 'game' has to be turned into a mutator.
  • The config in luaMenu/scripts should be placed in that path.
  • Go to Help -> Benchmarks (possibly with devmode enabled) and click the unique button that says something like 'Generate Replay'.
  • Put the config in benchmarks in benchmarks.
  • Edit this config to point to the replay you created.
  • Run the appropriate benchmark in Help -> Benchmarks.
I have probably missed some things but can't write much now. I can clarify things later.

This channel in BAR is probably the best for engine-level discussion/questions, although BAR doesn't seem to have standardised profiling: https://discord.com/channels/549281623154229250/724924957074915358

+4 / -0
chaplol
2 years ago
That's really neat stuff, thanks for explaining all that.

I won't be able to play around with this for a couple more days, but I'll have some updates for ya either later this week or early next.
+0 / -0

2 years ago
A good initiative!

I've had the same happen on a i5-4570 & Radeon RX550 machine which has previously been pretty solid in ZK. The slowdown seems to be a CPU issue and not GPU, as the machine an arm's length away does fine, and the GPU there is roughly similar while the CPU is stronger ... i9-10850K & GeForce GT 1030.

Incidentally, there was a recent angry thread about wind turbines and performance which was posted immediately after a game that lagged to hell, in which there was a lot of turbines. The poster and myself where on the losing side. The lag didn't really set in for me until there was a big army moving in the south. The replay is Multiplayer B1326066 23 on Twin Lakes Park 1.2 but its kind of a big game so probably you don't want to watch it. I think a number of players were really suffering during that game, and towards the end it went full slideshow for me on the i5-4570 box.
+0 / -0
i'm unable to play at all.

edit
fixed
+0 / -0

2 years ago
Try turning on "compatibility mode" in the graphics settings. It made a huge difference on my system. RX550 is fairly weak like my GPU (iGPU in 2400G), it seems some of the new graphical tweaks bog down on older AMD GPUs.
+0 / -0


2 years ago
Can you run the benchmark I mentioned two months ago?
+0 / -0

2 years ago
quote:
Can you run the benchmark I mentioned two months ago?


I'm willing to try, but TBH I'm lost at step 1: "The 'game' has to be turned into a mutator."

Are there instructions on a (e.g.) wiki page somewhere, or is it best to jump into Discord?
+0 / -0


2 years ago
Ok, I'll see about making a package for it.
+1 / -0