my KDExperiments

Programming, KDE and more

Putting KGameCanvas to sleep. Forever. July 31, 2007

Filed under: Uncategorized — FeticcioFelino @ 1:48 pm

KGameCanvas is a small and lightweight canvas that i had written in Qt 4.0/4.1 times, when QGV was not yet available or still very buggy, because we needed a very simple canvas to use in KBoard (now Tagua), and we did not need complex optizations for handling milions of items that actually resulted in a noticeable slowdown in many games and game-like tests. Something very much like the canvas in Qt 3, even if i’d say probably somewhat better. That said, KGC would never deserve to exist in a perfect world, and even in our unperfect world looks like that QGV finally catched up what was missing and is now working very well in small games with many animated items, outperforming KGC because it can avoid clipping the painter (and this can be a quite expensive operation if the region is complex). A small test program writtem by Paolo Capriotti can be found in the git repository at, a flag in CMakeLists.txt can be set to chose between KGC and QGV, just run and click to add a new item.

I feel very happy that we are now ready to get rid of KGC, in the unix philosophy there should generally be only one tool to do one job, and that tool will do its job well (even if i’d say that Qt is not following this philosophy very much because they are reinventing the wheel in many places, but well, they are just doing their best for something that is being sold and this can sometimes be the best choice to avoid complex dependencies). And it will probably be nice using a few of QGV’s advanced features in Tagua, such as event handling, transformations, etc. The only thing that i may want to complain is that i’ll now have to do some work to port the exisiting code 😀