[Kde-games-devel] kdegames maintainer list update

Eugene Trounev eugene.trounev at gmail.com
Sat Dec 6 03:24:42 CET 2008


Well either shouldn't be difficult to do.
For the rotation (or any other animation on hover) you simply need to add an 
animation loader for each element[N] which, while loading a theme would test 
whether element with id element[N] exists inside an SVG file, and if it does - 
load it into the next array element (alternatively this can be accomplished 
using .desktop file which would define animation length). Then add onhover 
sensor for each element you want animated. You can check out klines code for 
example.
To do *Join* effect is a bit trickier then that. Each element in SVG file 
would then have 5 frames to it: a) element itself (square, round, triangular, 
whatever; b) 4 possible connections sub elements. The trick here is that the 
element's visible body is always smaller then the sprite itself, and each 
subelement is like a full sprite, yet it's actual body is absent, and only a 
connection element present. The code doesn't use an actual element body 
sprite, but rather a copy of it, so an actual sprite will always be there for 
later use. When peace falls the code would check if the other peace siting 
next to it, below, or above is of the same type, then if it is the code would 
blit (or whatever it's called in QT) the necessary subelement on top of the 
element copy. So, now you have not just a circle, square, or triangle, but 
that with a connector element sticking out :) Add the same element to the next 
peace and it will seem as if they are connected/merged. (I've attached a 
sample image as an illustration)

On Friday 05 December 2008 17:26:21 Matthew Woehlke wrote:
> Parker Coates wrote:
> > Because Klickety used square pieces, it could "join" connect pieces of
> > the same colour into "blobs". This too was a nice effect, but I'm not
> > sure if something similar could be done in KSame because it uses
> > balls.
>
> I see no reason why other themes couldn't do this, aside from it's more
> code to write (and more art to draw). It's just the connected-wall
> problem which I dealt with years ago in Hatman (and would be coded into
> kapman except that tile-based mazes were repeatedly rejected).
>
> --
> Matthew
> Please do not quote my e-mail address unobfuscated in message bodies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20081205/92ac4011/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rotate-join.png
Type: image/png
Size: 34568 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20081205/92ac4011/attachment-0001.png 


More information about the kde-games-devel mailing list