KC3Kai / kancolle-replay

Sortie Replay and Simulation by @fourinone41
MIT License
52 stars 33 forks source link

[Feature Request] Sortie time statistics #81

Open ha15224 opened 4 months ago

ha15224 commented 4 months ago

Adding sortie time statistics such as average sortie time, battle duration for each node, and etc would be helpful in optimizing compositions that would benefit from faster runs, such as leveling or ranking.

Gathering the time data for each animation (shelling, aaci, carrier attacks, ....) would be a painstaking job, but I am willing to cooperate if necessary.

X-20A commented 4 months ago

Besides the sheer volume of work, other concerns would include.

Honestly, I can't think of a concrete solution for this.

ha15224 commented 4 months ago

Frankly I have no knowledge of how the internal computation/ source code works within the simulator, but wouldn't an option a user can tick to include the time measurements within the simulator settings be an easy fix?

X-20A commented 4 months ago

It would be easy to prepare a flag and switch. However, a description of the time measurement is required for every operation (either to be added sequentially or to be logged and calculated together).

ha15224 commented 4 months ago

That would be necessary as I can imagine. That being said, I do think the order of computational complexity shouldn't change (e.g. less than double the current speed as it is only doing an additional sum for every existing operation) with this feature. Of course, only users who wish to obtain these statistics would have reason to wait the extra dozen seconds.

X-20A commented 4 months ago

As for latency, there is no other way but to measure it in the end. In fact, it could be that it is hardly a problem. However, it is inevitable that the code will become more complex

fourinone41 commented 4 months ago

It's an interesting idea, but yeah my main concern is the amount of work, not just to start but to maintain (e.g. still need update if devs add something niche like atoll node attacks, Momochi anti-install animation), not sure if that's something I'm willing to maintain for now.

Won't that clutter up the code writing?

My idea is to turn on API generation which is used for Watch a Replay, use that to calculate time (as animations are directly tied to API), all separate from sim code. But yes that would increase sim time and would need a flag.

Of course also can't handle variables such as network latency, asset loading/caching, player's speed clicking yasen button, etc.

ha15224 commented 4 months ago

I would greatly appreciate it if you were to entertain the possibility. Thank you for your attention and feedback.