Rule Check - Highscore Tables

Problem with that is, they have to be logged in before playing the game.

I think “Type your player name to submit highscore” is the best way.

There will be some penalty in terms of bytes in doing highscore, but I don’t think it will be enormous.

In that case can we do as described above and have the library pop up a joptionpane instead - can customise the look and feel to fit the site and add all that good stuff (geolocation etc), maybe even add the top 10/5 scores to it.

Kev

Ok, it’s ready and working.

I’m gonna have jojoh peer-review it with me tomorrow before I release it in the open, hard to change afterwards, so better get it right the first time. Then tomorrow night I’ll put up the option in the game edit/submit where you can enable this feature, and I’ll also publish the jar.

The method is:

public static String[][] p(Applet caller, String name, int score) 

returned is a two dimensional array, list of results, where each row is: 0 = playername, 1 = score
or it returns null on any exception.

The invocation would go something like:


String[][] results = HScore.p(this, "appel", 999);
if(results != null) { ... show results.. } else { ...oops!... }

The reason for applet reference is to retrieve an applet property.

Mocking this will be mostly up to you.

Hmmmm… need to think about this, but getting too late here now.

Have a method in the highscore.jar that calls out to JavaScript with the score. JS would display an animated GIF for a few seconds to get the user’s attention and show a submit button. If the user is not logged in it would allow them to specify their name, which could be remembered with a cookie. It would also allow them to specify a password, so we can both accept their high score submission and create a new account in one go. Unregistered users could be annotated in the high score list to differentiate them from real users. Finally, the JS would submit the score via AJAX and refresh the high score table, all without the user leaving the page.

Oh, that’s nice. I’ll look into that.

Yup, that suggestion sounds like it combines the best of all ideas.

I’ve decided to expand a bit on the idea, so it won’t be ready until by tomorrow or saturday. ty.

Yaaay! What do I win? :smiley:

At my work, if you come up with a good idea… it means that you get to implement it :wink:

Booo, way to stifle innovation! :slight_smile:

How’s it coming?