[Kde-games-devel] Review Request: Add KScore2 framework to libkdegames (implementation incomplete)

Stefan Majewsky majewsky at gmx.net
Sun Aug 8 00:42:25 CEST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4919/
-----------------------------------------------------------

(Updated 2010-08-07 22:42:24.218241)


Review request for KDE Games.


Changes
-------

Nearly complete implementation of the Model class, and many simplifications and extensions in the other classes.


Summary (updated)
-------

KScore2 is a new framework which ought to replace the commonly used KHighscore/KScoreDialog and perhaps also KExtHighscore. The most central class (and the point where you should start reading the APIDOX) is KScore2::Model.

KScore2 makes use of the Model/View concept to create a simple, extensible, yet future-proof API. Contrary to KScoreManager (the other new highscore library which is in playground/games ATM), KScore2 is designed such that no assumptions about the internal data structures are included in the public interfaces. Its API makes simple tasks easy and complex tasks achievable.

Many KDE games have, over the years, grown their own highscore systems. KScore2 allows to accomodate these special needs: The score model can be made to retrieve its data from arbitrary locations by writing a custom KScore2::Engine subclass. Similarly, a KScore2::CategoryModel can be implemented to support custom highscore grouping (e.g. by difficulty, by level, or by levelpack and level).

What I'm presenting here is my current working state. Several things are missing:
* two functions in the KScore2::Model class, and the complete KScore2::Dialog class (which will only be available internally; its whole public interface is KScore2::Model::showDialog)
* unit tests
* integration into the rest of libkdegames (at the very least, this means a KGameDifficulty::CategoryModel which provides grouping of scores by difficulty as we have it already in most KDE games)
* API for gathering game statistics (like KPat and KReversi do; I want input on this one!)
* testing in the form of ported games (KDiamond will likely be my guinea pig again)

The code is also available from my Git-SVN repository at git://git.bethselamin.de/kdegames-work.git (branch "kscore2").


Diffs (updated)
-----

  /trunk/KDE/kdegames/libkdegames/CMakeLists.txt 1160372 
  /trunk/KDE/kdegames/libkdegames/kscore2/categorymodel.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/categorymodel.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/dataset.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/dataset.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/datasetdefinition.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/datasetdefinition.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/engine.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/engine.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/flags.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/flags.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/model.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/model.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/model_p.h PRE-CREATION 

Diff: http://reviewboard.kde.org/r/4919/diff


Testing
-------

At least it compiles. ;-)


Screenshots
-----------

Relation of the different data sources in KScore2
  http://reviewboard.kde.org/r/4919/s/473/


Thanks,

Stefan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20100807/1b60e750/attachment.htm 


More information about the kde-games-devel mailing list