Rogue Survivor Revived: CPU spike at turn 181

Zaimoni
3 min readMar 12, 2021

--

We finally get to turn 179. When Ramon completes his turn, this triggers choosing a new skill:

“SPACE to get wiser skills” is for what would otherwise be save-scumming for skill choices. Inventory slots are arguably one of the most important things to acquire in the early game, after core skills for the playthrough. Ramon chooses Hauler (he is under the maximum [hammerspace] inventory slot limit of 10).

The player also chooses skills for all subordinate PCs, rather than waiting for in-district skill upgrade, so Jacqueline will upgrade now even though she hasn’t had her turn yet:

Jacqueline just needs leadership to become a cop (I made sure to line up her equipment requirements beforehand). She would be found out (with consequences) if this were not an apocalypse.

Jacqueline has effectively gained an inventory slot: the required (activated) police radio is now implicit, rather than explicit. She also needed either a shotgun or a light pistol (the classic police weapons), a police armor (a padded jacket would do, but she actually found a riot armor), a flashlight, and no murders committed.

Then, at turn 181, CPU per turn went wild: ~23.8 seconds for the debug build. That’s far more than long enough to get a good sampling profile baseline. [Release mode tested at ~12.5 seconds].

Unfortunately…nothing “unusual” showed up. And the Visual Studio 2019 recent upgrade to 16.9.1 didn’t add any extra options for profiling already-running programs. The last few days’ commits have been blind micro-optimizations, or warning suppressions.

I do not need to profile game loading, which is ~45 seconds. Rogue Survivor Revived is still on System.Runtime.Serialization, which is known to be O(n²) in the number of C# class instances loaded.

Unfortunately, Microsoft has deprecated System.Runtime.Serialization, with no substitutes fit for purpose available. I do not like having to hand-roll a replacement as an insurance policy against the possibility of removal in .NET 6.0 .

I like Cap’n Proto’s feature set. However, removing obsolete fields from data types is a highly useful tolerance, for a save/load library.

Also: Cataclysm:Z 0.2.5 time-based release was March 1, 2021.

--

--

Zaimoni
0 Followers

This is the development weblog for https://github.com/zaimoni .