After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 509690 - Online highscores for GNOME Games
Online highscores for GNOME Games
Status: RESOLVED INVALID
Product: gnome-games-superseded
Classification: Deprecated
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gnome-games-general-maint
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-15 16:42 UTC by Andreas Røsdal
Modified: 2012-11-14 01:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Andreas Røsdal 2008-01-15 16:42:37 UTC
Online highscores would be a good addition to GNOME Games, I think.
Most GNOME desktops are probably connected to the Internet, so submitting
highscores to a centralized highscores database would be possible.

As we have already "outsourced" the networking support in GNOME Games to GGZ,
perhaps it would also be useful for others if such functionality would be implemented in GGZ?

KDE Games and some other OSS games already has something like this.

All games (except Sudoku) use the common highscores code in libgames-support,
so there shoudn't be that much work modifying each individual game to an improved highscores system.

One problem/challenge I see is to verify that the submitted highscores are valid and attempts at cheating. This is in particular a challenge because GNOME Games is open source. Is there good way to do this, eg. using cryptography?
Comment 1 Josef Spillner 2008-01-15 18:19:32 UTC
Rankings are recalculated on the fly in the GGZ SVN version. In addition, a <toprankings> tag was implemented which can retrieve the top-N players for you. However, this feature hasn't been tested much yet and is likely buggy. There isn't even a ggzmod interface for it AFAIK. For the time being, only the ggz-community web interface is a good way to have a look at such statistics. A ggzmod interface for it should be added soon, hopefully before the snapshot release even.

About cheating: I don't think it can really be prevented. The best way forward is probably to just say that we have to trust the players, and implement other community means (such a Karma systems) to sort out those who don't play fair. The current algorithm in ggz-community also incorporates the time since registration so that evil people don't get advantage of re-registering always again. But then again the value is only shown and not used yet for filtering out such players.
Comment 2 Josef Spillner 2008-01-15 19:17:34 UTC
OK, at least the ggzmod interface has been added in GGZ SVN trunk now. Just like the rest of the rankings code it is totally untested and will eat your cat and the neighbour's cow along with it.

http://svn.ggzgamingzone.org/trac.cgi/changeset/9543
Comment 3 Thomas Andersen 2008-01-16 23:30:42 UTC
This is by far the feature ranking highest on my wishlist for gnome-games :) We are past feature freeze so unfortunately this will have to wait until 2.23.

I think there is very little we can do technically to avoid cheating. We could add clever things like cryptography, confirming the hash of the executable of the game, etc but in the end you can easily modify the source to work around stuff like this. I think the karma based solution sounds like a great way to do this. 

A more crackful idea could be to record the moves of e.g. a game of klotski and send the list of moves together with the score. That way the score can be verified at the server. It's probably a lot more work than it is worth tough... 

I'm all for giving the users the benefit of the doubt and trust that they don't cheat. If they do we can see if the karma system works. 
Comment 4 Jason Dorje Short 2008-01-16 23:44:55 UTC
We need to be specific in what you're looking for.

Having all games played (single-player) be reported to a metaserver is rather easy.  This is not something GGZ would do however.  And it would not only easy to cheat, but easy to cheat en masse without even playing the game (i.e. if it's an XML metaserver you can just telnet in and report your fake scores by hand).

Any game played on the GGZ server will be recorded.  If the game setup is done properly this will record all highscores.  It will include single- and multi-player games by default.  Cheating will be less of an immediate issue here but modifications to the client are impossible to detect (whether this allows cheating may depend on the game implementation).  Cryptography nor any other means will help.
Comment 5 Andreas Røsdal 2008-02-10 22:40:00 UTC
>Having all games played (single-player) be reported to a metaserver is 
>rather easy.  This is not something GGZ would do however.

I think the idea of a "GGZ highscore metaserver" would be very interesting.
This could be a new niche for GGZ. I would imagine that both gnome-games, 
kdegames and GGZ would be interested in having online highscores, and to me 
it seems like GGZ is the perfect place to implement it. 

I think it would be possible even for single-player gamer to send 
game moves to a "GGZ highscore metaserver", and calculate the score on that server. This would make cheating en masse more difficult.

Comment 6 Josef Spillner 2008-02-11 07:48:48 UTC
We already have a dedicated XML-based highscore metaserver in playground, called GGZ Collector: http://svn.ggzgamingzone.org/trac.cgi/browser/trunk/playground/ggzcollector

Like jdorje said, even though there are several protections against cheating involved, one could never rule out fake entries. On the other hand, I know of some games having submitted highscores to some SourceForge PHP page for some time now, with less protection, and it has worked without major incidents from what I know:
http://ksirtet.sourceforge.net/stats.php?view=scores

Anyway, such a metaserver for single-player games would only be a drop in the bucket, and we should spend most of our efforts on really good scoring support for game servers. Nevertheless I think that, cheating issues aside, having ggzcollector installed somewhere would be fun for the players of even dull games such as moon-buggy which only provide a system highscore at the moment. One could easily make it invite-only for friends, for example. Social networks are all the rage nowadays, even though it's supposedly easy to crack Facebook and its ilk every couple of months, these sites sell for millions and people flock to them in the billions. Or the other way around :)
Comment 7 Andreas Røsdal 2008-02-11 19:43:13 UTC
GGZ Collector looks like a very good starting-point. Currently it acts like a proxy script to insert highscores into the matches table in the database, but not much more yet.

- There is no authentication, as far as I could tell. ggzcollector doesn't actually check the player's GGZ username and password in the batabase before inserting it into the database.

- I think that ggzcollector (or some webserver in the same package) should
report highscores back to the game clients, so that after the highscore has been submittet to ggzcollector, a nice GUI will show how the submitted highscore compares with other highscores.

- Good integration with ggzcommunity is important.

- Using the Twisted library for Python could make it easier to write clients in other languages.

- mysql support would be nice.


As you say, ksirtet is a good example of how a online highscore system works in practice. Improving it, and making it more polished and userfriendly, then I think we have something which will be quite good.
Comment 8 Christian Persch 2008-03-25 12:09:01 UTC
Re-assigning to new default owner.
Comment 9 Andreas Røsdal 2008-04-06 10:02:31 UTC
Now, I'll try to hack together a prototype for online highscores,
like we talked about in the IRC meeting...
Comment 10 Robert Ancell 2012-11-14 01:27:44 UTC
Please open against each game module if still appropriate.