[Kde-games-devel] libkdegames

Ian Wadham ianw at netspace.net.au
Thu Aug 17 10:06:35 CEST 2006


From: "Dmitry Suzdalev" <dimsuz at gmail.com>
Sent: Monday, August 14, 2006 12:19 AM
> On Sunday 13 August 2006 17:32, Jaison Lee wrote:
> > Adding the nifty new features we're discussing to libkdegames. There
> > is definately something to "if you build it they will come" mentality.
> One more thing to mention is that while discussing new features to add,
> let's discuss also is there something to remove.
> I know we've already discussed KGameIO* here and everyone (including me)
> agreed that this is a useful concept.
> But... IIRC it's used in only 2 (or even one) games from all of kdegames.
> If it's useful but almost no one uses it, then maybe we should rethink its
> usage? Useful != usable_and_applicable sometimes.
> The same applies to KGame/KPlayer. Search kdegames for the games that
> use it and you'll see what I mean. Two or three of them.
>
> What is used from libkdegames is KStdGameAction, Highscore's, KChat.
> Though through what I've seen they all need to be polished too :).
>
Some possible reasons why people do *not* use libkdegames ...
Most are or were once applicable to my work, so I have only
ever used KStdGameAction as it turns out.

1. Don't (didn't) know the library exists.
2. Don't want to lose Qt portability to other platforms.
3. Can't find the documentation (still true).  Even kdelibs
    doco I can find only by firing up KDevelop and using
    its doco tab.
4. Lack an overview that will tell me what functionality
    is in the library and how it may be useful (not so true
    since Martin and Andi's book came out).
5. Already wrote something that does the job.
6. Can't understand the documentation.  It tends to use
    terms that are not explained and tends to be fragmented
    and lack continuity (it's Doxygenated?).
7. Worried that the library will keep changing and
    deleting items (as opposed to adding) and will thus
    cause ongoing (unnecessary IMO) maintenance work.

Had a look at the highscore source code (the Doxygen
comments mainly - see point 6).  I would be very interested
in there being a KDE Games web page where high scores
are kept (perhaps with country of origin?) ;-)  I'm dying to
know if I am world champion at KGoldrunner :-)

IMHO the highscore code could perhaps be moved to a
much higher level of functionality, with two basic methods:

  showHighScores(), with options for personal best, local
  host/LAN or international (KDE Games page),

  checkHighScore() (or challengeHighScore() maybe), which
  would compare the result of a game with existing high score
  data and insert the score into the table at the appropriate
  place, if the score is high enough.

Both would depend on an attribute list and values that defined
what items are significant in the game's scoring (points, time,
level reached, etc).  For each attribute we would need to know
the internal key, the column heading (i18n) for showHighScores,
the attribute value, the type of attribute display (integer/time),
how and whether to sort on the attribute (ascending/descending/
no sort).  Some of these could be defined at constructor time.
There would also be attributes that are pre-defined and prompted
for, such as player's name and country, and others that are
internally generated (date/time, etc.).  If this is what the library
already does, my apologies, but see points 3, 4, 6 above.

There might also be a method to merge highscore tables (e.g. if
your personal best is good enough for international rating).

All the best, Ian W.



More information about the kde-games-devel mailing list