Hi,
I've bought chika script few days ago. Now it's time to share some of my experience with it.
Generally speaking: good looking and nice solution... but... it has some bugs which are usually invisible to most of us.
First - 3 things about high scores saving (function that is most important to me):
1. when registered and logged in user plays high score enabled game, high score saves each time the game is played - even if in high score table there is better score than new one. I really think that is not the idea of high score system.... and only HIGH SCORES should be (over)written to db.
SOLUTION: in file scores_save.php you have to add some code to check if there were better results in current game for current user.
2. THE BIG BUG - High score is saved with gameid and userid that are taken form $_SESSION. Each time script saves a high score two variables are taken from session table:
$userid = $_SESSION['UserId'];
$gameid = $_SESSION['gameId'];
Now imagine what will happen if a user open high score enabled game in new page, and just after that another high score game in another new page. If a user will play first opened game - on high score submission he will write his score from game1 AS A SCORE FROM GAME2 - that's because $gameid was overwritten when the second game page was displayed! An easy way to cheat high scores...
SOLUTION: some work in scores_save.php....--> find a game id basing on referer (which is in db as game file name...) and rewrite $_SESSION['gameId'] with the id of the game that the score was posted.
3.High score value as integer...
That is completely... wrong. Scores from 'time records' games are written as integers: let's say you've just played a game 100m running and have a high score 10.84 - it will be written as 11...
SOLUTION: change data type in db and remove (int) from (scores_save.php):
$score = (int)$_REQUEST['gscore'];
_______
that's all for now:). I've found also some other bugs but will write about them some other time.
regards.
