[Kde-games-devel] A new highscore manager - KScoreManager

Matt Williams matt at milliams.com
Tue Apr 29 14:20:07 CEST 2008


On Tuesday 29 April 2008 13:07:14 Dmitry Suzdalev wrote:
> On Tuesday 29 April 2008 15:52:31 Mauricio Piacentini wrote:
> > I am not really a fan of this idea, because in some cases you want to
> > dismiss the dialog and see the end position of the game. Maybe it could
> > be added, but with a flag in the constructor to make it optional?
> > BTW, in some games I added a 0.5 second delay between the game end and
> > the popup of the KScoreDialog. This is more pleasant imo, as you have
> > time to see the "Game Over" message before it pops up. Previously you
> > would get it (in KMines for example) before you had a chance to realize
> > the game was ended
>
> I said this a couple of times to different people, but let me repeat that
> I'm not a fan of popping up some dialog at the end of the game at all :)
> It always annoys a gamer in me. What if i just don't care about highscores?
> Why the game insists on me doing some actions just to continue playing?!
>
> Instead I would suggest to simply show some unobtrusive popup-message like
> "Congratulations! You've made a new highscore!"
>
> And *if user wants* he can go to the menu or toolbar and select "Show
> highscores" action. That is not that compex for him at all :)
>
> The only problem is perhaps how to get the user name by default if we have
> no dialog to ask for it.
> This is a separate issue though and should be discussed on itself. What i'm
> talking about is that i feel that current way of showing a highscore dialog
> not caring if user wants it is not a smartest thing the game could do :)
>
> Any thoughts on that?

With the API that's currently unfolding for KScoreManager, if you do:

KScoreManager::self()->setAskName(false);
KScoreManager::self()->addScore(playerScore);

and don't then call show() then no boxes at all will be displayed at all. The 
name entered into the table will be the last entered name (if there is one) 
otherwise the name from KUser will be used. Otherwise you can explicitly pass 
a name to addScore() through a ScoreInfo object. The game can retrieve 
whether the player got a highscore by looking at the return value of 
addScore() and display a "you got highscore" in whatever subtle way they 
want.

Does that sound ok?

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/7f5348a0/attachment.pgp 


More information about the kde-games-devel mailing list