UQM-MegaMod icon indicating copy to clipboard operation
UQM-MegaMod copied to clipboard

Tweak for slow machines: Slower planet rotation.

Open clort81 opened this issue 4 years ago • 3 comments

I found that slowing planet/moon rotation, while aesthetically more pleasing, also drops cpu use.

With 3DO FPS (35) and HD on, the current 2021-10-27 git master shows > 95% cpu use: cpu_fastrotate

in planets.h setting: #define PLANET_ROTATION_RATE (ONE_SECOND * 60 / RES_SCALE (PC_MAP_WIDTH)) results in ~20% cpu use (and looks majestic and aesthetic) cpu_slowrotate

This is quite different than either pc or 3do rotation speed, but I share it in case anyone has trouble with old/slow computer, or would prefer a stately planet rotation.

clort81 avatar Oct 27 '21 11:10 clort81

useful. but also taking note that 100% cpu usage means one core, if you have 8 or 16 cores etc, thats not a lot of cpu used, only one pthread (eg 800% is full cpu used on 8 cores) might be good information for a raspberry pi or something, or seriously old like pentium4/amd athlon something without multiple cores.

though i would agree with balancing cpu usage with something arbitrary like spinning planets 35fps seems reasonable for an object like this

arrowgent avatar Dec 05 '21 16:12 arrowgent

i also enabled GL OSD to see the fps i reported 41fps watching planets rotate 80-95% pthread cpu usage -- reported by htop & nvtop

some of the transitions reported up to 180fps briefly example: transistion from solar view to hyperspace view.

i set a GL frame limit of 30fps for the whole game and everything seemed to run fine

arrowgent avatar Dec 27 '21 16:12 arrowgent

@clort81 @arrowgent Hello. As for current version 0.8.2 we have 3 styles for these planets and all 3 have different framerate (DOS being the slowest and 3DO being the fastest). I'm planning to redo/optimize this code for next release, but still, do you have any data on performance of older machines for current version? I would like to know the boundaries

Kruzen avatar Apr 24 '23 13:04 Kruzen

I'm going to close this for now since this is two versions behind and no longer relevant until someone does some testing in 0.8.3 or in the most current commit.

The topic can be reopened if further testing shows this to be the case in the most up-to-date version.

JHGuitarFreak avatar Sep 26 '24 00:09 JHGuitarFreak