[Kde-games-devel] Kapman

Ian Wadham ianw2 at optusnet.com.au
Fri Mar 21 08:10:39 CET 2008


On Fri, 21 Mar 2008 12:00 pm, Pierre-Benoit Besse wrote:
> In fact I forgot it but there is another thing which can slow down the
> game: having it sized too big.
>
> It's a bug we know for a while but we haven't been able to solve yet.
> I've tried anew this evening and there is something like a x2 factor on
> speed between a too-big sized window and a rightly-sized one.
> Talking about that, we would greatly appreciate any help :)
>
Presumably you are doing as little as possible inside QTimer slots.

Otherwise look carefully at any library stuff you call there,
especially graphics stuff.  There are quite large overheads in
anything that re-generates QPixmaps and ships them to
the X-server, for example.  Also try exporting QT_FLUSH_PAINT
and observing how much of your view is being re-painted.
If it is a large area, that could be the problem.  BTW, are you
using QGraphicsView or KGameCanvas or QPainter direct?

You can also insert QTime functions in your slots and use
kDebug() to show a log of where the milliseconds are going.

The "author's debugging tools" in KGr might also be worth
a look, just as ideas.

Please excuse me if I am telling you obvious stuff.  Guys at
school are a lot savvier than in my young day ... :-)>>> and
I do not know how to gauge that.

Cheers, Ian W.


More information about the kde-games-devel mailing list