[Kde-games-devel] KGameRenderer porting

Stefan Majewsky kdemailinglists at bethselamin.de
Sun Aug 8 01:40:00 CEST 2010


On Sunday 08 August 2010 01:30:19 Lindsay Mathieson wrote:
> Got my KDE Trunk
build & env setup, can anyone suggest a simple game to
> start
with?

Combining the output of sloccount with my knowledge about the games,
I think that KLines and KMines are good candidates. Their rendering code is
AFAIK quite clean and in fact nearly identical because both games were
ported to KDE4 by the same developer.

The basic workflow is:
1. replace an
existing renderer class by a global KGameRenderer instance
2. replace
QGraphicsPixmapItems using pixmaps from the old renderer class by
KGameRenderedItems which request their pixmap from the global KGameRenderer
instance

Have a look at the docs, or at Killbots for how to use
KGameRenderer and KGameRenderedItem. (The other ported games are KSame and
KDiamond, but these use KGameRenderedObjectItem which has, in certain
situations, a different coordinate system definition.) Feel free to ask back
if you run into problems. (I'm not on IRC that much, but I'm checking mails
about daily.)

Greetings
Stefan


More information about the kde-games-devel mailing list