KDE Games/Porting: Difference between revisions
→Porting status: - populate "Sounds" column of porting table |
|||
Line 27: | Line 27: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="background-color:#FFABAB" | Phonon | |||
|- | |- | ||
| bovo | | bovo | ||
| style="background-color:#ABFFAB" | QGraphicsView | | style="background-color:#ABFFAB" | QGraphicsView | ||
| style="background-color:#FFFFA0" | QGraphicsSvgItem | | style="background-color:#FFFFA0" | QGraphicsSvgItem | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
Line 37: | Line 39: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#FFFFA0" | KgTheme+custom | | style="background-color:#FFFFA0" | KgTheme+custom | ||
| style="background-color:#ABFFAB" | KgSound | |||
|- | |- | ||
| kajongg | | kajongg | ||
Line 42: | Line 45: | ||
| style="background-color:#ABFFAB" | libkmahjongg | | style="background-color:#ABFFAB" | libkmahjongg | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="background-color:#FFFFA0" | custom | |||
|- | |- | ||
| kapman | | kapman | ||
Line 47: | Line 51: | ||
| style="background-color:#FFFFA0" | QGraphicsSvgItem | | style="background-color:#FFFFA0" | QGraphicsSvgItem | ||
| style="background-color:#FFABAB" | KGameTheme | | style="background-color:#FFABAB" | KGameTheme | ||
| style="background-color:#ABFFAB" | KgSound | |||
|- | |- | ||
| katomic | | katomic | ||
Line 52: | Line 57: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="text-align:center" | N/A | |||
|- | |- | ||
| colspan=" | | colspan="5" | kbattleship ''(see knavalbattle)'' | ||
|- | |- | ||
| kblackbox | | kblackbox | ||
| style="background-color:#ABFFAB" | QGraphicsView | | style="background-color:#ABFFAB" | QGraphicsView | ||
| style="background-color:#FFFFA0" | QGraphicsSvgItem | | style="background-color:#FFFFA0" | QGraphicsSvgItem | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
Line 64: | Line 71: | ||
| style="background-color:#FFFFA0" | QGraphicsSvgItem | | style="background-color:#FFFFA0" | QGraphicsSvgItem | ||
| style="background-color:#FFABAB" | KGameTheme | | style="background-color:#FFABAB" | KGameTheme | ||
| style="background-color:#FFABAB" | Phonon | |||
|- | |- | ||
| kbounce | | kbounce | ||
Line 69: | Line 77: | ||
| style="background-color:#FFFFA0" | KPixmapCache | | style="background-color:#FFFFA0" | KPixmapCache | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="background-color:#FFABAB" | Phonon | |||
|- | |- | ||
| kbreakout | | kbreakout | ||
Line 74: | Line 83: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="background-color:#FFABAB" | none | |||
|- | |- | ||
| kdiamond | | kdiamond | ||
Line 79: | Line 89: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="background-color:#FFABAB" | KNotify | |||
|- | |- | ||
| kfourinline | | kfourinline | ||
| style="background-color:#ABFFAB" | QGraphicsView | | style="background-color:#ABFFAB" | QGraphicsView | ||
| style="background-color:#FFFFA0" | PixmapCache (client pattern) | | style="background-color:#FFFFA0" | PixmapCache (client pattern) | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
Line 89: | Line 101: | ||
| style="background-color:#FFFFA0" | KPixmapCache | | style="background-color:#FFFFA0" | KPixmapCache | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="background-color:#ABFFAB" | KgSound | |||
|- | |- | ||
| kigo | | kigo | ||
Line 94: | Line 107: | ||
| style="background-color:#FFFFA0" | KPixmapCache | | style="background-color:#FFFFA0" | KPixmapCache | ||
| style="background-color:#FFABAB" | KGameTheme | | style="background-color:#FFABAB" | KGameTheme | ||
| style="text-align:center" | N/A | |||
|- | |- | ||
| killbots | | killbots | ||
Line 99: | Line 113: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="text-align:center" | N/A | |||
|- | |- | ||
| kiriki | | kiriki | ||
| colspan="2" style="background-color:#FFFFA0" | QWidget with pre-rendered PNG | | colspan="2" style="background-color:#FFFFA0" | QWidget with pre-rendered PNG | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
Line 107: | Line 123: | ||
| style="background-color:#FFABAB" | QWidget | | style="background-color:#FFABAB" | QWidget | ||
| style="background-color:#FFABAB" | QSvgRenderer | | style="background-color:#FFABAB" | QSvgRenderer | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
Line 113: | Line 130: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="background-color:#FFABAB" | KNotify | |||
|- | |- | ||
| klines | | klines | ||
| style="background-color:#ABFFAB" | QGraphicsView | | style="background-color:#ABFFAB" | QGraphicsView | ||
| style="background-color:#FFFFA0" | KPixmapCache | | style="background-color:#FFFFA0" | KPixmapCache | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
Line 122: | Line 141: | ||
| style="background-color:#FFFFA0" | KGameCanvas | | style="background-color:#FFFFA0" | KGameCanvas | ||
| style="background-color:#ABFFAB" | libkmahjongg | | style="background-color:#ABFFAB" | libkmahjongg | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
Line 128: | Line 148: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="text-align:center" | N/A | |||
|- | |- | ||
| knavalbattle | | knavalbattle | ||
Line 133: | Line 154: | ||
| style="background-color:#FFFFA0" | PixmapCache | | style="background-color:#FFFFA0" | PixmapCache | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="background-color:#FFABAB" | Phonon | |||
|- | |- | ||
| knetwalk | | knetwalk | ||
Line 138: | Line 160: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="background-color:#FFABAB" | KNotify | |||
|- | |- | ||
| kolf | | kolf | ||
Line 143: | Line 166: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="background-color:#FFABAB" | Phonon | |||
|- | |- | ||
| kollision | | kollision | ||
Line 148: | Line 172: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="background-color:#FFABAB" | Phonon | |||
|- | |- | ||
| konquest | | konquest | ||
| style="background-color:#ABFFAB" | QGraphicsView | | style="background-color:#ABFFAB" | QGraphicsView | ||
| style="background-color:#FFFFA0" | KPixmapCache | | style="background-color:#FFFFA0" | KPixmapCache | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
Line 158: | Line 184: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#FFFFA0" | KgTheme+KCardTheme | | style="background-color:#FFFFA0" | KgTheme+KCardTheme | ||
| style="background-color:#ABFFAB" | KgSound | |||
|- | |- | ||
| kreversi | | kreversi | ||
Line 163: | Line 190: | ||
| style="background-color:#ABFFAB" | KGameRenderer | | style="background-color:#ABFFAB" | KGameRenderer | ||
| style="background-color:#ABFFAB" | KgTheme | | style="background-color:#ABFFAB" | KgTheme | ||
| style="background-color:#FFABAB" | none | |||
|- | |- | ||
| kshisen | | kshisen | ||
Line 168: | Line 196: | ||
| style="background-color:#ABFFAB" | libkmahjongg | | style="background-color:#ABFFAB" | libkmahjongg | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="background-color:#ABFFAB" | KgSound | |||
|- | |- | ||
| ksirk | | ksirk | ||
Line 173: | Line 202: | ||
| style="background-color:#FFFFA0" | QGraphicsSvgItem+KPixmapCache | | style="background-color:#FFFFA0" | QGraphicsSvgItem+KPixmapCache | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="background-color:#FFABAB" | Phonon | |||
|- | |- | ||
| kspaceduel | | kspaceduel | ||
| style="background-color:#ABFFAB" | QGraphicsView | | style="background-color:#ABFFAB" | QGraphicsView | ||
| style="background-color:#FFFFA0" | QGraphicsSvgItem | | style="background-color:#FFFFA0" | QGraphicsSvgItem | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
| ksquares | | ksquares | ||
| style="background-color:#ABFFAB" | QGraphicsView | | style="background-color:#ABFFAB" | QGraphicsView | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
Line 188: | Line 220: | ||
| style="background-color:#FFFFA0" | KPixmapCache | | style="background-color:#FFFFA0" | KPixmapCache | ||
| style="background-color:#FFABAB" | KGameTheme | | style="background-color:#FFABAB" | KGameTheme | ||
| style="text-align:center" | N/A | |||
|- | |- | ||
| ktron | | ktron | ||
Line 193: | Line 226: | ||
| style="background-color:#FFFFA0" | KPixmapCache | | style="background-color:#FFFFA0" | KPixmapCache | ||
| style="background-color:#FFABAB" | KGameTheme | | style="background-color:#FFABAB" | KGameTheme | ||
| style="text-align:center" | N/A | |||
|- | |- | ||
| ktuberling | | ktuberling | ||
Line 198: | Line 232: | ||
| style="background-color:#FFFFA0" | QGraphicsSvgItem | | style="background-color:#FFFFA0" | QGraphicsSvgItem | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="background-color:#FFABAB" | Phonon | |||
|- | |- | ||
| kubrick | | kubrick | ||
| style="background-color:#ABFFAB" | QGLWidget | | style="background-color:#ABFFAB" | QGLWidget | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
Line 207: | Line 243: | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="background-color:#FFFFA0" | QPixmapCache | | style="background-color:#FFFFA0" | QPixmapCache | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|- | |- | ||
Line 213: | Line 250: | ||
| style="background-color:#FFFFA0" | PixmapCache (client pattern) | | style="background-color:#FFFFA0" | PixmapCache (client pattern) | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="background-color:#FFABAB" | none | |||
|- | |- | ||
| palapeli | | palapeli | ||
| style="background-color:#ABFFAB" | QGraphicsView | | style="background-color:#ABFFAB" | QGraphicsView | ||
| style="text-align:center" | N/A | |||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
| style="text-align:center" | N/A | | style="text-align:center" | N/A | ||
|} | |} |
Revision as of 23:24, 14 April 2012
Targets of porting
- Graphics stack: QGraphicsView is currently the recommended solution. Some games still use KGameCanvas; these should be ported to QGraphicsView. In the future, we likely want to move to Qt Quick instead, but this needs proper investigation and changes in libkdegames.
- Rendering method: Current solutions commonly include usage of a QSvgRenderer, combined either with QGraphicsSvgItems or with (Q/K)PixmapCache. It is suggested to migrate to KGameRenderer instead. Integration with QGraphicsView is available through the KGameRenderedItem and KGameRenderedObjectItem classes. Integration with KGameCanvas is available through the KGameCanvasRenderedPixmap.
- Theme selection: When one game supports multiple themes, the KGameTheme class has commonly been used. Starting with the 4.9 release, the new KgTheme class supersedes KGameTheme.
- Sounds: Some games used Phonon, some KNotify. Both libraries are bad because of their commonly high playback latencies. The new KgSound classes in libkdegames are specialized on low-latency playback of small sound samples.
- (more to come)
Porting status
The second column shows which graphics stack (e. g. QGraphicsView, KGameCanvas) is used by the application. The third column shows the rendering method.
If you want to take part in porting, pick an app, contact the author or the kde-games-devel mailing list to coordinate your effort, read into the KGameRenderer APIDOX and start hacking! Please note that this porting effort is mainly about porting rendering code to KGameRenderer. Usage of outdated graphics stacks should not be changed because this might cause severe and non-trivial bugs.
Warning: It is advised not to use the primaryView property of KGameRenderedObjectItem class in new ports. The existing ports using it (KDiamond and Klickety/KSame) made it clear that the primaryView property has design flaws (concerning performance), so it will probably be removed again.
Application | Graphics stack | Rendering method | Theme selection | Sounds |
---|---|---|---|---|
bomber | KGameCanvas | KGameRenderer | KgTheme | Phonon |
bovo | QGraphicsView | QGraphicsSvgItem | N/A | N/A |
granatier | QGraphicsView | KGameRenderer | KgTheme+custom | KgSound |
kajongg | QGraphicsView | libkmahjongg | N/A | custom |
kapman | QGraphicsView | QGraphicsSvgItem | KGameTheme | KgSound |
katomic | QGraphicsView | KGameRenderer | KgTheme | N/A |
kbattleship (see knavalbattle) | ||||
kblackbox | QGraphicsView | QGraphicsSvgItem | N/A | N/A |
kblocks | QGraphicsView | QGraphicsSvgItem | KGameTheme | Phonon |
kbounce | KGameCanvas | KPixmapCache | N/A | Phonon |
kbreakout | KGameCanvas | KGameRenderer | KgTheme | none |
kdiamond | QGraphicsView | KGameRenderer | KgTheme | KNotify |
kfourinline | QGraphicsView | PixmapCache (client pattern) | N/A | N/A |
kgoldrunner | KGameCanvas | KPixmapCache | N/A | KgSound |
kigo | QGraphicsView | KPixmapCache | KGameTheme | N/A |
killbots | QGraphicsView | KGameRenderer | KgTheme | N/A |
kiriki | QWidget with pre-rendered PNG | N/A | N/A | |
kjumpingcube | QWidget | QSvgRenderer | N/A | N/A |
klickety | QGraphicsView | KGameRenderer | KgTheme | KNotify |
klines | QGraphicsView | KPixmapCache | N/A | N/A |
kmahjongg | KGameCanvas | libkmahjongg | N/A | N/A |
kmines | QGraphicsView | KGameRenderer | KgTheme | N/A |
knavalbattle | QGraphicsView | PixmapCache | N/A | Phonon |
knetwalk | QGraphicsView | KGameRenderer | KgTheme | KNotify |
kolf | QGraphicsView | KGameRenderer | KgTheme | Phonon |
kollision | QGraphicsView | KGameRenderer | KgTheme | Phonon |
konquest | QGraphicsView | KPixmapCache | N/A | N/A |
kpat | QGraphicsView | KGameRenderer | KgTheme+KCardTheme | KgSound |
kreversi | QGraphicsView | KGameRenderer | KgTheme | none |
kshisen | QWidget | libkmahjongg | N/A | KgSound |
ksirk | QGraphicsView | QGraphicsSvgItem+KPixmapCache | N/A | Phonon |
kspaceduel | QGraphicsView | QGraphicsSvgItem | N/A | N/A |
ksquares | QGraphicsView | N/A | N/A | N/A |
ksudoku | QGraphicsView | KPixmapCache | KGameTheme | N/A |
ktron | QWidget | KPixmapCache | KGameTheme | N/A |
ktuberling | QGraphicsView | QGraphicsSvgItem | N/A | Phonon |
kubrick | QGLWidget | N/A | N/A | N/A |
libkmahjongg | N/A | QPixmapCache | N/A | N/A |
lskat | QGraphicsView | PixmapCache (client pattern) | N/A | none |
palapeli | QGraphicsView | N/A | N/A | N/A |