[Kde-games-devel] KBreakout

Ian Wadham ianw2 at optusnet.com.au
Thu Jun 21 04:05:39 CEST 2007


On Thu, 21 Jun 2007 03:05 am, Aaron J. Seigo wrote:
> On Wednesday 20 June 2007, Fela Winkelmolen wrote:
> > 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 =)
>
At the risk of disagreeing with my fellow saurian, I think separating
the game engine, especially AI and physics, from the graphics
would be a good way to go.  It certainly has been with KGoldrunner.
It also allows the engine to work in a co-ordinate system that may
be more convenient for designing and coding game logic (i.e. a
kind of model/view approach).

KGoldrunner has evolved from QPaint-as-you-go in the game engine,
to QPaint in a paintEvent (Qt1 and Qt2), to QCanvas (Qt3), to
QGraphicsView (Qt4) and now KGameCanvas, SVG and themes
(KDE4).  All these changes have had little to no impact on the game
engine, though the graphics classes have had extensive re-writes
(thanks for ever, Mauricio :-)).

BTW, I would suggest you do some "materials testing" on
QGraphicsView (i.e. benchmarks), in case it is not fast enough
for KBreakout.  Mauricio and I found that QGV was fast enough
most of the time, but "stumbled" in some game-levels, especially
where widely separated parts of the view were changing rapidly.
That was in Qt4.0: QGV has probably been improved now.

The "hiccups" in animation were making the game unplayable
in the levels affected, so Mauricio, who had ported the game to
QGV, then converted the graphics to KGameCanvas which is
now in the KDE Games library.

Wishing you every success with your enterprise, Ian W.


More information about the kde-games-devel mailing list