[Kde-games-devel] KReversi and KMahjongg

Mauricio Piacentini mauricio at tabuleiro.com
Thu Aug 17 05:13:05 CEST 2006


>> Well, I am volunteering to gradually evaluate and propose graphic
>> enhancements to kdegames for KDE4. I was discussing this already with Ian
>> for Kgoldrunner, but I believe I should start with something simpler, like
>> the Kmahjongg vector tile support.
> Sorry for not-so-fast replying to such a good news :).

Well, guess it is a nice way to spend a self-imposed sabbatical year :)
BTW, I have registered for Akademy. I believe it could serve as a focal
point for some of the efforts we have been discussing for the past two
or three weeks. Are you guys planning to attend?

> Well, as I'm not a designer at all maybe you can look at kreversi and tell me 
> what do you think of it's graphics? If you didn't noticed yet, currently I'm 
> busy with rewriting it so it is a good opportunity to introduce such kind of 
> changes.

To be honest, the graphics are functional, and at least the game already
have zoom in/zoom out capabilities. So it is in better shape compared
with others in the tree, imo. But there is room for improvement, of course.

What we probably need is just a svg version of the game pieces, and
change the blitting code to use QSvgRenderer to get a scaled version of
them, or draw directly to the background. I also believe that the wood
background is a bit heavy, but this is true for all kind of
heavy-textured backgrounds, imo. We could probably use a nice SVG
background as well, something that matches the plasma proposed color
palettes (ref at http://plasma.kde.org/cms/1091). In this same page,
look at the plasma logo on the top. We could use simple game pieces with
the kind of graphic treatment displayed there. I can send you a
preliminary draft version in two or three days, one background and two 
pieces, for testing.

The worst part in Kreversi is probably the arrangement of the widget
that displays the piece count. It leaves an awful white space below it, 
completely wasted. We should probably change the design a bit to 
integrate this information over the background, and in an arrangement 
that does not waste that much space. It is a nice exercise,
I will work on something during the weekend and will send it to you (and
the list) for review.

> Actually it doesn't matter from where to take the sources (from trunk or from 
> branch) as they share same graphics artwork.
> 
> Btw, kreversi_rewrite is already running and playable!
> The only thing that left from old kreversi is computer brain in Engine.
> {cpp,h} :).

Good. Nice work!

I am working on SVG tiles for KMahjongg, spent the last two afternoons
reading the code and mapping possible changes. There are two ways to
implement it: the relatively easy one, and the perfect one :) Feedback 
is welcome!

The easiest way is to continue to use the existing bitmap-based drawing,
but offer more scaling options, and pre-rendering the bitmap tiles from 
an  SVG tileset. This way we would have minimal code changes, and the 
nice (and complicated) existing code that draws realistic shadows would 
remain intact. Apart from being something that GMahjongg does not have, 
the shadows really make a lot of difference visually. But with this 
approach we sacrifice antialias between tiles, and between tiles and 
background.

Another approach (more complicated) would be to change all the drawing 
code to draw directly from SVG elements. This is a more complex change, 
and we would probably loose the  existing tilesets and themes if we did 
not adapt them. Performance will probably be affected adversely as well.

I am still not sure about which approach to take, but I believe I will
try the first one so we can have results quickly, and discuss possible
directions using this first version as a starting point.

One feature I would like to implement (maybe before Akademy, or during 
it) is the integration of KNewStuff. This seems a perfect fit for this 
game, enabling the sharing and automatic installation of new tilesets, 
backgrounds and layouts. What do you guys think?

Regards,
Mauricio Piacentini
Tabuleiro



More information about the kde-games-devel mailing list