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

Parker Coates parker.coates at kdemail.net
Sat Aug 7 13:11:22 CEST 2010


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


Hello Stefan. So far it looks quite good, although to be honest, I'm not sure I can really give a thorough review until we get to see some UI to understand how it all comes together. ;) I see the motivation of posting the model for review before moving on, however, and thus far nothing sticks out as obviously wrong/restrictive/inflexible. :)


/trunk/KDE/kdegames/libkdegames/kscore2/dataset.h
<http://reviewboard.kde.org/r/4919/#comment6741>

    I'm not sure if DataSet is the best name for this class. The word "set" implies plurality, which makes me think that it would represent a group multiple scores.
    
    In the previous (failed :D) KScore rewrite, the equivalent class was called an Entry, which I think is a bit more descriptive. I also notice that you use the term entry in the Engine API. Other potential names are Submission, Record, or Attempt.



/trunk/KDE/kdegames/libkdegames/kscore2/model.h
<http://reviewboard.kde.org/r/4919/#comment6742>

    s/tabl/table/



/trunk/KDE/kdegames/libkdegames/kscore2/model.h
<http://reviewboard.kde.org/r/4919/#comment6743>

    None of these setters have getters. I can see why providing them for the sorting setters would be a pain, but I think adding a behavior() getter is probably wise for completeness, if only because it should be easy to do.


- Parker


On 2010-08-06 21:30:15, Stefan Majewsky wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4919/
> -----------------------------------------------------------
> 
> (Updated 2010-08-06 21:30:15)
> 
> 
> Review request for KDE Games.
> 
> 
> 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:
> * the implementation for 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
> -----
> 
>   /trunk/KDE/kdegames/libkdegames/CMakeLists.txt 1159806 
>   /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 
> 
> 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/a8804b85/attachment-0001.htm 


More information about the kde-games-devel mailing list