[Kde-games-devel] A new highscore manager - KScoreManager
Matt Williams
matt at milliams.com
Tue Apr 29 12:48:36 CEST 2008
On Tuesday 29 April 2008 03:59:16 Parker Coates wrote:
> 2008/4/28 Matt Williams <matt at milliams.com>:
> > Attached is the current API for the class (named KScoreManager).
> >
> > Comments? Complaints? Insults?
>
> Hello Matt,
>
> I'm glad to see that you're giving the high score system some
> attention. Whatever you decided to do, I'm sure it'll come out better
> in the long run. After reading your header, I have a couple thoughts.
>
> First, I think it'd be nice to have a static setting for the number of
> scores to to save and display. I got thinking about this because there
> are options to make the score table as wide as you want, but the
> length is constant. I realise ten is a pretty reasonable default, but
> it think it'd be neat to be able to ask for only 5 scores or maybe as
> many as thirty. If it turns out to be a pain to implement than it
> might not be worth the effort, but if we're rewriting the thing from
> scratch now would be the time to try it.
I should be simple enough to allow the game to specify how many scores they
want to display. The function would have to be called before any show() or
addScore() but apart from that, it shouldn't be a problem.
> Second, it'd be great to make the KScoreManager as useful as possible
> to those implementing other score UIs. I assume you plan to use a
> KScoreDialog very similar to the one we already have to display the
> scores, but it might be a good idea to consider other options. I don't
> think anyone has done so yet, but I know there was talk at one time of
> implementing a highscore listing directly on the game canvas. In such
> a case, it'd be convenient to leverage the KScoreManager code wherever
> possible. Some potentially useful functions could be:
Ah, yes. Thankyou for reminding me. Mauricio had said he was going to have a
look into this but I guess he hasn't started work on it yet. How about, in
addition to the show() function (which presently displays a QDialog with the
scores displayed) there's a function which would return a QGraphicsWidget
which would be a widget displaying the scores much like the QDialog? This
would then be embedded in an QGraphicsView
> - A form of addScore that didn't show the score dialog.
With the way the KScoreManager will do it, addScore() will never show the
score table. You will always have to explicitly call show(). Name entry will
be done through a separate popup. Do you think that's a good idea?
> - ScoreInfo getScore( int index, const QByteArray& groupKey )
> - QList< ScoreInfo > getScores( const QByteArray& groupKey )
> - QStringList scoreGroupNames() //This will probably need to be more
> complex in light of the recent i18n changes.
> - etc.
While these functions make sense since they are getters for the setters
already there, I can't really see a need for them. If someone could give me a
usecase for these functions I'd be glad to add them but I'm trying not to add
functions which aren't necessary.
Thanks,
Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20080429/d7bf4847/attachment.pgp
More information about the kde-games-devel
mailing list