[#12782] [Issue] Random lagspikes (fps drop) when playing the campaing
自动翻译暂时不可用
本帖暂时展示 GitHub 原始内容。
Platforms
Windows
Build
160.7 (happens [at least] since 159.7)
Issue
<i>(related to my original bug report #12451; further intel has been gathered, also repoduceable in vanilla; maybe related to #12770)</i>
<b>The Issue</b>
Whenever I play the campaign, seemingly at random the game begins to stutter and has noticeable fps drops. They usually last for a few seconds before everything goes back to normal.
<b>Some information I managed to gather about this problem</b>
Since my first issue report, I tried to gather some useful information about this wierd behavior and this is what I got:
<ul> <li>The issue happens seemingly at random, although there are certain actions that are more likely to trigger it (see below for further info)</li> <li>The issue did not exist during most of the V8 beta and before. (I am not entirely sure when the lag spikes first occured, but it has to be around version 159.7)</li> <li><b>The issue seems to happen exclusively when playing the campaign</b><br> I've tried playing a few custom maps (and importing the "Tar Fields" map directly from this repo) and even after playing ~4 hours in total across 3 different maps, I've not once noticed any stuttering or fps drop, but as soon as i went back into the campaign, the lag spikes and the stuttering returned.</li> <li>The issue seems to affect modded camapigns as well as vanilla campaign (tested only on Serpulo)</li> <li>The issue happens even with all graphic settings set to minimum (i.e. no effects, no screenshake, no bloom, no darkness/lighting, no animated shields/surfaces, no weather graphics); happens both in fullscreen and windowed mode; (VSync was always enabled).</li> <li>The issues happens when all sounds and music is turned off</li> </ul>
I've also noticed that the issue is more likely to occur if one of the following actions is performed:
(However, they are not guaranteed to cause the lag spikes, most of the time they work perfectly fine)
<ul> <li><b>Building blocks</b><br> Happens...<br> ... regardless of the amount of buildings, tho it is more likely if a lot are built in quick succession (eg. conveyors); <br> ... when rebuilding derelict blocks; <br> ... with and without assistance of other units (ie. poly, mega)<br> It does <i>not</i> happen when deconstructing buildings. </li> <li><b>Hitting a lot of units with projectiles or lasers</b><br> Especially noticeable with piercing turrets (eg. Lancer, Fuse) </li> <li><b>Destroying an enemy core</b> </ul>
Performance Meter:
Looking at the build in performance meter during lag spikes, one of the following values is very high (often > 10ms)
<ul><li><code>unitUpdate</code><br> Usually spikes when building (a lot) of blocks or when enemy units are hit by a lot of bullets </li> <li><code>bulletUpdate</code><br> Spikes when enemy units are hit by a lot of bullets </li> <li><code>stateUpdate</code><br> Spikes randomly; was most noticeable when destroying the enemy core (went to about 30ms) </li> </ul>
Hardware Specs: (so that nobody says my device was too weak)
<ul> <li>32 GB of RAM</li> <li>Intel i5-14400F CPU</li> <li>1 TB of SSD storage</li> <li>NVIDIA RTX 3060 GPU (driver version 610.88)</li> </ul>
Other related info:
<ul> <li>Mindustry ran fine during and before most of V8 beta</li> <li>I am playing on the Steam version of Mindustry</li> <li>I've not tested whether this issue occurs on the V9 alpha builds or the bleeding edge builds</li> <li>The issue remained even after Windows did a graphics driver update</li> <li>Even 15 Cyclones with Blast ammo, cryofluid and an Overdrive Dome shooting all the time don't cause the <code>bulletUpdate</code> to even go to 0.1 ms on any custom map</li> <li>As far as I know, no other entry of the Performance Counter (other than the three mentioned in section "Performance Meter") ever goes up segnificantly.</li> <li>Observing CPU, GPU and RAM usage using Windows Taskmanager never showed any of the three to be the problem. (GPU and CPU never got over 20% utilisation and there is more than 20 GB of RAM unused</li> <li>The game runs at 60 fps if there are no lag spikes</li> </ul>
I am pretty sure this is not a device issue since I've only observed the issue while playing the campaign but not during custom games (and especially now that #12770 exists)
Steps to reproduce
Play the campaign and do one of the things mentioned above...
Mods used
none
Save file
https://drive.google.com/file/d/1NB3oVRSR_rm1fgzOiJMNIlmL_vCyEjLn/view?usp=sharing
(I hope this works)
(Crash) logs
no crash; no useful info in the logs
Submission
I have updated to the latest release (https://github.com/Anuken/Mindustry/releases) to make sure my issue has not been fixed.
I have searched the closed and open issues to make sure that this problem has not already been reported.
I am not using Foo's Client.
This issue occurs with no mods enabled.
I have attached a valid save file.
由 MDT GitHub 同步机器人自动同步。