x


Making a Top 10 score page

I was wondering if any out there has made a "Top 10" page? The problem I am running into now is that I have named profiles, which keeps the player's sex, best time to complete a level and their current level. In order to check the data from other users I would have to search all of the other profiles and check to see if the player's new time should appear on the top 10 list. I figure this approach would be very lag heavy. Does anyone know of a simpler solution to this problem?

more ▼

asked Jul 20 '10 at 11:48 PM

Ed gravatar image

Ed
22 8 8 14

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

I'm assuming that you have a database running in the backend for that, and in that case, unless you have very massive amounts of users, doing a little select for that shouldn't hurt too badly. If it does, you could help yourself with the right indexes.

If that still doesn't help, you could simply keep a separate table into which you store the result of the main query maybe every few minutes and then get your data from there.

Have you seen the entry about high scores on Unifycommunity Wiki: Server Side Highscores. While this is different from what you need it still may give you some nice inspirations.

more ▼

answered Jul 21 '10 at 08:20 AM

jashan gravatar image

jashan
10.1k 25 40 116

(comments are locked)
10|3000 characters needed characters left

Wouldn't you just check the 10th time? If it's not better than that, it wouldn't get into the top 10 anyway.

more ▼

answered Jul 21 '10 at 12:01 AM

Eric5h5 gravatar image

Eric5h5
80.1k 41 132 519

Exactly, I dont really see the problem with this. Maybe check the fifteenth time (which isn't displayed) to avoid bugs when two people get into the highscores at the same moment.

Mar 23 '11 at 11:35 PM Joshua
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5057
x1999
x794
x436
x34

asked: Jul 20 '10 at 11:48 PM

Seen: 1633 times

Last Updated: Jul 21 '10 at 12:12 AM