954,193 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help with new online game project

Hello, i'm currently working on an online game (browser based), and obviously, since all of the contents is meta-data, I have loads of DB-related work.

Recently I came into a brick wall while trying to figure out how to make one of the more important features of my game to work.

This is the situation:
Each player has a "game_id" and "score" columns; "score" is always recalculated, depending on the stats of the player (And indexed).
"Game_ID" is to seperate stronger players from weaker ones.
The higher the "game_ID", the higher the score.
So my goal, is every X days to recalculated the "Game_ID" field for all of the players in my game, so that the power balance will be relatively the same.
Also, each "game_id" should contain the same amount of players, so let's say I have 1005 players, so every 50 players will have the same "game_id", and the remaining 5 will be at the last game, meaning we have 20 "game_ids".

I.E.
table before recalculation:
ID | game_ID | score
1 | 1 | 5000
2 | 1 | 1000
3 | 2 | 6000
4 | 2 | 1500
5 | 2 | 400

table after recalculation:
ID | game_ID | score
1 | 1 | 5000
2 | 2 | 1000
3 | 1 | 6000
4 | 2 | 1500
5 | 2 | 400

Help anyone? :eek:

rejwan
Newbie Poster
1 post since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You