[Kde-games-devel] kpat issues (in recent svn)

Parker Coates parker.coates at gmail.com
Sat May 23 17:53:06 CEST 2009


On Fri, May 22, 2009 at 9:49 PM, Ian Wadham wrote:
> On Sat, 23 May 2009 9:14:46 am Parker Coates wrote:
>> On Fri, May 22, 2009 at 6:15 PM, Ian Wadham wrote:
>> > So what exactly would you like me to test (before I update libraries)?
>>
>> I find it easiest to reproduce when playing Golf. Maxmise the window
>> and just hit Space a bunch of times. It won't happen everytime, so you
>> might have to deal out the entire deck and restart a few times before
>> you get it. Dealing cards in rapid succession also seems to help. Deal
>> a new card before the last one has stopped.
>>
> Rock-solid here!  I've tried clicking the mouse quickly, pressing the
> spacebar rapidly, using the spacebar with 25/sec and 50/sec auto
> repeat ... with Golf, Klondike (1-card flip) and Klondike (3-card flip).
> Always the top card of the stock pile stays steady.  Theory below.

Okay. I'd think it's safe to say that this is a definitely a regression in Qt.

>> >> I've also been able to determine that it is much more likely to happen
>> >> at bigger window sizes. I've also changed my local copy of KPat to use
>> >> a QGLWidget in the QGraphicsView, and that stops the issue.
>> >
>> > I tend to play with KPat maximized on a 1280x800 laptop display.
>> > Is that big enough?
>>
>> That's plenty big enough.
>>
> Larger window-size would make for larger card-size and hence more
> re-painting when you flip a card maybe.
>
> I noticed that there is a very fast animation as a card flips over, so fast
> as to be hardly perceptible to the naked eye.  I checked the KDE 3.5
> version of KPat and that animation seems much slower --- quick, but quite
> perceptible.  I also noticed that the card that flips over appears briefly in
> front of the deck beneath and so would clip it.
>
> So my theory is that the animation is too fast for QGraphicsView 4.5, it
> gets its knickers in a knot when trying to optimize and forgets to "un-clip"
> the stock pile.  Its job would not be any easier if, as I believe someone
> mentioned, all the pixmaps of the cards in the stock pile are lying
> there on top of each other.

I think the real trick may be that we're translating, transforming
*and* replacing the pixmap all at once. Mid flip, we replace the
backside pixmap with the frontside pixmap, and I wouldn't surprised if
the clipped area is the last area covered before the pixmap
replacement.

> Maybe you could try (in the source code) bypassing the animation,
> slowing it down or reducing the graphics for the stock pile to one
> card-back pixmap and see what effect that has.  Maybe just
> remove the animation ...  If the eye cannot follow it, why have it?

I have to agree with Matthew that getting rid of the animation seems
like a bad idea. Everything else in KPat is animated, and even if we
only get four frames of animation, I still feel it gives a better
sense of motion. I debated with slowing the animation down, but that
obviously can't be taken too far, or players will get grumpy waiting
for cards.

>> Thanks a lot for volunteering Ian. I owe you one.
>>
> No worries.  The Euro is strong right now ... :-)

I'm not sure I see how the Euro enters into it, but it seems one
dollar Canadian will get you a buck twelve Australian, so I guess
you'd still come out ahead by a bit. :)

Thanks again. Go ahead with your upgrade.

Parker


More information about the kde-games-devel mailing list