Page 3 of 3

Re: Ally Resource Bars 1.84 Alpha 2

Posted: 08 Nov 2015, 03:59
by Manoa
that's weird, for me it shows DrawScreen and less than 1%

the only function that gets executed constantly from gameframe is updatebars()
that function is the most heavily optimized in the entire code, I cannot see how that function could be the source of the performance leak

here is a test version, try it and tell me if you see any improvement, it contains a micro optimization where it saves 2 arithmetic operations by reusing a computation (it's replacing 4 arithmetic operations with 1 assignment and 1 arithmetic) (Alpha 3)

Re: Ally Resource Bars 1.84 Alpha 3

Posted: 08 Nov 2015, 14:36
by Jools
I think what I did was split the updating into two: update bars and update statistics. Because you don't really need to update both of these 30 times each second, right? And then it's possible to do the drawing with displaylists, but sometimes these do not make it actually better. I think it depends on the user's GPU.

Why don't you put the code in github and we can work on it together?

Re: Ally Resource Bars 1.84 Alpha 3

Posted: 08 Nov 2015, 15:13
by Manoa
yhe, good idee, my email is dead I can't recover my github for now

updateStatics() doesn't run every frame, only when necessary, it's not there the problem