[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] Chess game for KDE4
From:       Mauricio Piacentini <piacentini () kde ! org>
Date:       2009-12-04 23:42:47
Message-ID: 90c3da860912041542t627f49a2o3ca1c6917cc236db () mail ! gmail ! com
[Download RAW message or body]

On Fri, Dec 4, 2009 at 8:57 PM, Parker Coates <parker.coates@gmail.com> wrote:
> If you're talking about having a sceneRect that's a different size
> than the QGraphicsView widget, yes, you can do that, but the result
> doesn't look very good. You lose pixel perfection.
>
and
>
> Despite it seeming attractive, you really don't want to use
> QGraphicsSvgItem. Rendering SVG is expensive and you're going to want
> full control of when and how that happens. Almost all the QGV based
> games use QGraphicsPixmapItems that get their pixmaps from a renderer
> class that uses QSvgRenderer and KPixmapCache internally.

Both of these combined, imho, are the reason why KGameCanvas is still
a very good solution for some games, as it already uses pixmaps
(pre-rendered from SVGs) and the scene rect matches the view size. So
you get speed, control and pixel perfect alignment, not to mention the
ability to actually get into the scenegraph code and solve any bugs
directly without waiting for a new release. Sometimes less is more.
In other times, QGV seems to be a good general purpose solution, and
we have several games using it successfully. But check the code for
the existing games in the module first if you are going to use it, to
avoid repeating the mistakes others have already done before you :)

Regards,
Mauricio Piacentini
_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic