bairy
08-24-2006, 10:00 PM
After my arcade had been installed for while I found that all the high scores were practically unbeatable.
I wanted a way to make them beatable again.
I thought about the possibility of just removing the top 5 high scores, but that wouldn't be fair on the winners.
I thought about resetting all the scores but that wouldn't be fair on any of the players.
Then I came to a perfect compromise: Reduce the scores. All the ranks are kept in tact but the high scores are achievable again. As a bonus, it increases competitiveness when the previous top scorers get beaten.
It's all done by a single cron job.
Upload arcadescores.php to /includes/cron
Set a new scheduled task. This one runs on the first of each month:
Day of week: *
Day of month: 1
Hour: 0
Minute: 4
Log: up to you
Filename: ./includes/cron/arcadescores.php
By default the scores are reduced by 15%. If you want to change this percentage, change the 15 to whatever you like on lines 11, 15 and 19 of the script.
Important note: This script will reduce the scores by 15% each time you run it manually or on cron. That means if you install it and want to play around with it, you might want to make a backup of the arcade_games, arcade_sessions and arcade_news tables.
Version 1.01
- Updated to account for games that have reverse scoring
- Now includes table_prefix
- Made the change percentage easier to change
Version 1.02
- Fixed a tiny bug I created in 1.01: If you had no reverse-scoring games it errored.
I wanted a way to make them beatable again.
I thought about the possibility of just removing the top 5 high scores, but that wouldn't be fair on the winners.
I thought about resetting all the scores but that wouldn't be fair on any of the players.
Then I came to a perfect compromise: Reduce the scores. All the ranks are kept in tact but the high scores are achievable again. As a bonus, it increases competitiveness when the previous top scorers get beaten.
It's all done by a single cron job.
Upload arcadescores.php to /includes/cron
Set a new scheduled task. This one runs on the first of each month:
Day of week: *
Day of month: 1
Hour: 0
Minute: 4
Log: up to you
Filename: ./includes/cron/arcadescores.php
By default the scores are reduced by 15%. If you want to change this percentage, change the 15 to whatever you like on lines 11, 15 and 19 of the script.
Important note: This script will reduce the scores by 15% each time you run it manually or on cron. That means if you install it and want to play around with it, you might want to make a backup of the arcade_games, arcade_sessions and arcade_news tables.
Version 1.01
- Updated to account for games that have reverse scoring
- Now includes table_prefix
- Made the change percentage easier to change
Version 1.02
- Fixed a tiny bug I created in 1.01: If you had no reverse-scoring games it errored.