[Kde-games-devel] Kapman sprite system (also, connecting-tiles systems)

Ian Wadham ianw2 at optusnet.com.au
Thu Dec 11 12:02:52 CET 2008


IIRC there is a SVG standard for animation.  When Mauricio and I were
looking at how to do KGoldrunner animation about two and a half years
ago, we considered it, but there was no support for it in Inkscape nor in
QSvgRenderer, although it was said back then to be just a few versions
away in Inkscape.

So there was no alternative but to hand-draw individual animation
frames, first of all establishing what actually happens when a person
runs - a subject on which there was not much info on the web (plenty
on walking though).  Mauricio sweated blood to produce the first
workable set of runner animations - an effort compared with which
the labelling and invisible outlining of the frames would have been
but a minor part I am sure.

If others followed the lead Mauricio set in KMahjongg and KGoldrunner
SVG graphics, it was because the approach worked well, even though it
had some laborious aspects.  And we had all the way to go, as a group,
with making the loading, rendering, cacheing and display of SVG
graphics (still or animated) fast enough and efficient enough for games
and animation.  That was a *major* effort.

I think your idea might have merit.  FYI the original KGoldrunner graphics
in KDE 1, 2 and 3 used an array of pixmaps for the animation and the
tile feature in QCanvas, the predecessor of QGraphicsView, *required*
tiles to be in an array.  However, even when you have ironed out whatever
performance and coding problems there may be in your proposal and have
given us a convincing proof of concept in some game (as Mauricio did),
I will not be in a position to adopt it, I am sorry to say.  The reason is
that I am all SVG'd and graphics'd out and I wish to concentrate on other
issues, such as sound, gameplay, new rules and new levels.

But if you really want to make your mark, library-wise, why not look at
the SVG animation standard and what is needed to implement it in
a KDE/Qt/Inkscape environment?  It is ridiculous that artists have to
hand-draw or clone every animation frame in KDE Games.

On Wed, 10 Dec 2008 03:28:49 pm Matthew Woehlke wrote:
> Ok, so in fiddling with Kapman graphics, I ran into some problems with
> the sprite system, mostly in the set of assumptions it makes (only one
> enemy graphic, number of animation frames or lack thereof), and the
> kdegames-wide item that has been the bane of my existence since 4.0,
> requiring every bloody thing to have an id.
>
I think you have got off on the wrong foot by taking this rather negative
line.  And how can said IDs be the "bane of your existence since 4.0"
when you are not on the list of KDE Games maintainers and you do
not AFAIK have a KDE Game of your own authorship?

If you would like a game where you can have a free hand, as author,
how about reviving and re-writing KSokoban, from KDE 3 Games?
It is currently in a "black hole" somewhere in the SVN repository.
That would be better, IMHO, than stirring things up in Kapman.

> So I came up with an action plan (README, attached), and applied it to
> the "simple" theme I am working on and will probably use as fodder to
> implement this and the tile system.
>
> Let me say it again. I *hate* assigning id's to every blody thing. I
> also hate having to group, and I really, *REALLY* hate having to make
> invisible objects so that id'd things are the right size.
>
I almost switched off and stopped reading at this point.  If you really
want us to "see the light", as you put it, start by being positive, do the
work and give us a demonstration of your ideas, e.g. in KSokoban.

Personally, I find grouping and invisible objects to be a rather elegant
way of protecting against accidental editing and maintaining precise
alignments of the whole picture and all parts of it within the frame.  In
your example SVG the drawings could accidentally "float" and make
the animation look odd - perhaps not a problem with simple animations
like the Kapman player, but definitely one if there are physical
"reasonableness" constraints, such as "feet on the ground".

All the best, Ian W.


More information about the kde-games-devel mailing list