Canvas adapter and plasma

I’ve finally finished polishing the code of KGameCanvasAdapter, a hundred lines of straightforward code that stand as a bridge between KGameCanvas code and any QPainter based drawing system, including of course QGV.

The only test case for the adapter is a port of my kollision game to plasma. Porting was very easy: it was just a matter of having the MainArea class inherit from Plasma::Applet and KGameCanvasAdapter instead of QWidget. The resulting applet is not really a game, at the moment: it is just a box with bouncing red balls.
However, I think it’s a good test for both my adapter and plasma, since it can show how well plasma performs with CPU intensive plasmoids. Here is a short screencast of the kollision plasmoid in action.

The code is available in a git repository:

git clone http://kollision.ath.cx/plasma.git plasma

will download the whole patched plasma directory. To compile it, you should move it inside a kdebase/workspace working copy, so that it uses the existing cmake build system of kdebase.

About these ads

4 Responses to “Canvas adapter and plasma”

  1. shamaz Says:

    impressive.

  2. Maurizio Says:

    Really! I could not expect KGameCanvas to be so successful :)

  3. Top Posts « WordPress.com Says:

    [...] Canvas adapter and plasma I’ve finally finished polishing the code of KGameCanvasAdapter, a hundred lines of straightforward code that […] [...]

  4. schilder haarlem Says:

    Excellent website you have here but I was curious if you knew of any
    community forums that cover the same topics discussed here?

    I’d really like to be a part of community where I
    can get advice from other experienced individuals that share the same interest.
    If you have any recommendations, please let me know.
    Thanks a lot!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: