[Kde-games-devel] KBreakout

Aaron J. Seigo aseigo at kde.org
Wed Jun 20 19:05:15 CEST 2007


On Wednesday 20 June 2007, Fela Winkelmolen wrote:
> Hi all,
> I'm not to responsive lately as I've quite some exams to do. I've started
> to write a breakout clone however (if anybody has a more interesting name
> than the one in the subject let me know :-).
> As soon as I think I've got the design right I'll apply for a KDE account
> and put it in playground. Now I would like your opinion about some ideas I
> have:
>
> 1. Svg caching.

> The problem is how to do it, QGraphicsScene is independent from the size of
> the View, maybe the View could be passed to the QGraphicsSceneItems so that

just set the scene to be the same size as the view and keep the two in sync 
and you have no problems. this is a cleaner and less problematic way of 
achieving the same end.

> it can calculate the size of the pixmap to create and eventually load it
> from the cache instead of rerendering it.

the simple mechanism is to just save out the rendered pixmaps on exit and load 
from there. this is what we will be doing in Plasma::Svg. the icon cache that 
rivo is working on as part of his SoC project will come to good use here as 
well.

> But I'm not sure it would work. 
> This is also why for now I'm writing the game engine independent from the
> QGraphicsScene, even it it makes the engine more complicated.

not sure you'll get a good ROI there, but it is your call =)

> 2. Theming.
> I can think of two ways to support theming:
> - there is a certain number of objects (including a background), for each
> of which there should be provided a svg in the theme, if a certain object

instead of loading a huge number of svg's, one per on screen element, i really 
recommend putting all the elements in one svg and rendering named elements. 
this makes it easier on artists, is faster to load and kinder on resources.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20070620/cd701ded/attachment.pgp 


More information about the kde-games-devel mailing list