[Kde-games-devel] KGoldrunner

Luciano Montanaro mikelima at cirulla.net
Tue Aug 7 10:25:11 CEST 2007


Il Tuesday 07 August 2007 01:11:30 Ian Wadham ha scritto:
> Hey Luciano!
>
> Welcome back!  Did you have a good trip?

Thanks, and yes, I really enjoyed it. The Grossglockner and surroundings are 
really beautiful, and I finally managed to climb the Stelvio Pass. 

>
> On Mon, 6 Aug 2007 05:55 pm, Luciano Montanaro wrote:
> > How slow is it? If you start kgoldrunner from the command line, it writes
> > one line each time one frame of the animation is drawn. How many frames
> > does it draw?
>
> I didn't want to tell you this before you went away but the level-change
> animation (fade out - fade in) is very slow for me.  That's because I have
> a graphics card but it is not enabled in Linux.  However that has not been
> any disadvantage up till now (my CPU is a 2.4 GHz Pentium 4).
>
> I am getting just 2 or 3 frames on the fade out and about the same on the
> fade in.  I have put a timer into the messages and the frames are taking
> about 0.5 sec to paint, after control goes back to the event loop.  It's
> sad really ... that particular animation used to be really smooth on the
> Apple II.

That's similar to my experience with my desktop computer -- Athlon 2200 with 
Radeon 9250 card. It's not exceptionally smooth but it works at default 
window size, but at full screen (1600x1200) it only manages to draw two-three 
frames. Even with my recent optimization to skip entirely empty areas.

But maybe I have configuration issues, because it has problems also with other 
games: kshisenso, for example is practically unusable: The first tile is 
highlighted immediately, but after selecting the second tile of the pair, I 
have to wait for a few seconds (at least three, maybe more) before I see the 
conecting line and the tiles are removed. The CPU does not seem to be too 
busy, but many games are quite sluggish to play. Kgoldrunner is OK, apart 
from the fadein/fadeout animation.

>
> I've figured out (finally) how to draw a black rectangle with a transparent
> circular hole in it, but it seems to take nearly as long to draw that, save
> it as a pixmap and get KGameCanvas to paint it on top of the play area. Due
> to other work and lack of time, I have not investigated further.
>

Oh, I wanted to try that road too, but wasn't really sure it would help. 
Knowing it doesn't is useful! :)

> BTW, I think 10 msec timeline interval is too short and would not work in
> Windows with any hardware.  There's a warning in Qt doco about that.
>

Yes, I didn't mean to keep it that way; it's commented out now, and I may 
tweak it to be a bit slower than the default. Ten frames per second would be 
OK for it, I think. I added the line to see how fast it could go, and if the 
optimizations were useful; my laptop can draw a very smooth fade-in/fade-out 
animation even with a maximized window.

The good thing about QTimeLine is that it skips automatically frames, though. 
So we can have very smooth animations with fast systems, and whatever the 
system can manage otherwise.

Luciano




More information about the kde-games-devel mailing list