Thursday, December 31, 2009

ViruZ update 8

So, I guess another time was today. Because I fixed the huge FPS lag.
cairo_scale seems to be a slow operation (or at least drawing on it after such a transformation). I had a buffer with a single blue circle, then would loop over it a few times to draw it.
The circles would be small at first and become bigger till they reach a certain size.

I tried out some different stuff, and it proved to be the fastest way when I just re-draw the circle each time it gets bigger, instead of scaling a buffer.
The performance-hit is now about 5FPS per core (since that drawing is not threaded (yet?)).

Here's a screenshot of it:

There's a nasty bug atm, which leads the program to just stop rendering after a time. I'm pretty sure the time is bound to the FPS, so it stops after a certain amount of rendered frames.
At first I thought it would be a memory-overrun somewhere, but that looked fine in the performance-monitor. So I began checking the code and the drawing-functions are executed properly. Then I suspected that maybe my timer would reach its max and stop counting, but that would just lead to an overflow and cause weird moving-behavior for one frame. Plus, I calculated that it will have to run over 500 years before it overflows.
I tried commenting out the drawing of my serum and the viruses (as well the update-function-calls), but it still just freezes.
I'm very clueless, but search will go on.


This post is, compared to the other ViruZ updates, quite early. This is due to tomorrow being the year 2010. I'm going to a friends New Years party in about 10 minutes, so I was searching for something to do and remembered, that I will probably not be able to post an update within the next few hours and that it would kill most of the time I wanna kill.
So, here it is. yaaaaaaaaaaaaaaaaay[/noemotion][/sarcasm]

No comments: