rudimentary framerate benchmarking (turning it on will make the game run significantly slower)

This commit is contained in:
minjaesong
2022-10-15 01:09:51 +09:00
parent 8533f92274
commit 93af194c8a
6 changed files with 44 additions and 4 deletions

View File

@@ -581,7 +581,7 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
// some sketchy test code here
KeyToggler.forceSet(App.getConfigInt("debug_key_deltat_benchmark"), false)
}// END enter
@@ -819,6 +819,10 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
WORLD_UPDATE_TIMER += 1
if (KeyToggler.isOn(App.getConfigInt("debug_key_deltat_benchmark"))) {
deltaTeeBenchmarks.appendHead(1f / Gdx.graphics.deltaTime)
}
}