Khaligufzel / Dimensionfall

A survival game inspired by Cataclysm: Dark Days Ahead and Bright Nights.
MIT License
13 stars 5 forks source link

Character window performance improvement (when running) #251

Closed snipercup closed 4 months ago

snipercup commented 4 months ago

Requires #250

Made a change so that the characterwindow (v) is updated only when visible. The player was updating the character window every frame while running, due to the athletics skill getting XP every step. Now it only updates when the characterwindow is visible. Meaning you could still get performance degredation if you run with the window open, but this is an improvement nonetheless.

There are other strategies, like aggregating the gained XP and updating periodically, or updating only the label of the skill instead of rebuilding the entire characterwindow.