[Kde-games-devel] KBreakout

Fela Winkelmolen nimatar at gmail.com
Wed Jun 20 20:47:29 CEST 2007


On Wednesday 20 June 2007, Aaron J. Seigo wrote:
> 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.

I'm not sure I understand exactly how that would work, I'll have look at the 
icon cache when I'm going to implement caching.

> > 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 =)

Well, now that I know that caching can be archived with QGraphicsScene I won't 
bother anymore :-)

> > 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 tehe elements in one svg and rendering named
> elements. this makes it easier on artists, is faster to load and kinder on
> resources.

Yes, actually I knew that, I didn't explain myself to well, I meant that to 
write a theme you had to make a replacement image for each element, didn't 
mean svg _file_ =)

cheers,
- Fela
-- 
Hello! I'm a signature virus. Copy me to your signature, ^^ pleeeeease!!!!!!


More information about the kde-games-devel mailing list