[Kde-games-devel] KBreakout
Fela Winkelmolen
nimatar at gmail.com
Wed Jun 20 15:27:08 CEST 2007
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.
It takes a bit for most games to start mostly due to rendering of the svg
images. I was wondering if it isn't possible to cache the rendering for the
last window size used somewhere on disk. Of course resizing will always
remain a bit slow.
The reasoning behind it is that usually users will resize the game only the
first time they start it (and maybe not even that if it has a sane default
window size). My guess is that more than 80% of the times a game is started
it won't be resized.
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
it can calculate the size of the pixmap to create and eventually load it from
the cache instead of rerendering it. 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.
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 isn't
present there could be a fallback to the default theme for that object.
- each level or levelset has it's own theme
I personally like the first idea, although the second one makes the levels
more different. There could be a combination of the two, like each level has
it's own background, but that would cause an inconsistent look in some
situations.
Let me know what your opinions are...
cheers,
- Fela
--
Hello! I'm a signature virus. Copy me to your signature, ^^ pleeeeease!!!!!!
More information about the kde-games-devel
mailing list