[Kde-games-devel] Review Request: Add KScore2 framework to libkdegames (implementation incomplete)
Stefan Majewsky
majewsky at gmx.net
Sun Aug 8 01:12:47 CEST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4919/
-----------------------------------------------------------
(Updated 2010-08-07 23:12:46.905343)
Review request for KDE Games.
Changes
-------
Implemented the first changes suggested by Parker:
* added getter method KScore2::Model::behavior()
* renamed KScore2::DataSet{,Definition} to KScore2::Record{,Format}
Summary
-------
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/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
/trunk/KDE/kdegames/libkdegames/kscore2/record.h PRE-CREATION
/trunk/KDE/kdegames/libkdegames/kscore2/record.cpp PRE-CREATION
/trunk/KDE/kdegames/libkdegames/kscore2/recordformat.h PRE-CREATION
/trunk/KDE/kdegames/libkdegames/kscore2/recordformat.cpp 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/dcde79b6/attachment.htm
More information about the kde-games-devel
mailing list