Flash Highscore Component using Php and MySql
Talking about Flash and Reviews.
Probably one of the main reasons people play casual games in internet is the challenge they provides with their highscore tables.
In my case, getting my name close to the top players in a game gives me the will to make another attempt and play the game again.
Unfortunately, building an highscore table in flash is not so easy… this is due to a security problem.
The first thing we need to know is that Flash+PHP is totally insecure. What can we do? We have to encrypt data in order to make cheater’s life very hard. In order to do this, a solid knowledge about backend scripting, encryption, php and MySql is required.
This is where Flash Highscore Component (FHC from now on) by Components for Flash (CF from now on) comes to save our lives.
It help us with an easy to use highscore system that does not require any knowledge about backend scripting or encryption. Just send the players name and score to the component and it will take care of the rest.
Henrik from CF sent me the component to make this review. I have not tested it already, as I am writing the review as I am opening the zipped file.
Let’s see how does it work.
The documentation
I really liked FHC docs, provided in a detailed swf file with a smart use of colors to highlight the must reads and the extra information. It makes the package look more professional than the usual install.txt file.
According to the first page of the docs, I should be able to have an Highscore up and running in 20 minutes… we’ll see…
Installation
The flash-side installation took 3 seconds: the time to locate the installer on the package and double-click on it.
To install the web-side part, you need to have a hosting plan that provides Php and MySql. In Web 2.0 age, this is a very common thing.
I uploaded the php files included in the package and run the installation. It’s very simple: input your database data, confirm, and have the installation completed.
The only issue I noticed, the installer told me to delete the installHighScore.php file for security reasons.
In the version I have, this file does not exists, so I removed the install.php file. I think this is a typo that will be fixed once CF guys will read this review :)
And the installation is completed. Time spent: 5 minutes, 4 of them spent backupping my site, you know… safety first.
Connecting the Component to the Database
Once in Flash, you will have to drag the components to the stage. In order for this component to work, you will need the ScrollPane and UIScrollBar components to be dragged too. I think these components are included in almost every latest Flash versions
Setting up a highscore system is very easy, as you can see from this example I made in less than 5 minutes.
Simply enter your name and press the “Submit” button. A random score from 0 to 100,000 will be generated and if you are lucky enough, you will enter in the top 100 hall of fame.
There are more functions to let the player know if he entered the hall of fame or not, and I will use them in one of next tutorials I will made. This raw version took my about 2 minutes.
Browsing the MySql table, I found a column with the timestamp of the highscores. That’s very useful because you can create your own frontend showing when a score was submitted, how long it resisted, movers and shakers, and whatever thing you may imagine if you know a bit of mysql.
Final considerations
With its inexpensive cost of only $29.95, this component is a must buy. Moreover, one single license allows you to use the component for a unlimited amount of both commercial and private projects, so it’s positively a great component.
Both installation and connections are very easy to do even if you don’t know php and mysql… but if you know both languages you will enjoy this component even more.
The layout is customizable with the colors your prefer and you will be able to make your custom highscore table in much less than the 20 minutes as described on the manual.
The only thing I did not understand in those few minutes (but, hey, I am talking about minutes while doing a highscore table by myself would take days) is how to prevent the players to delete scores, since the admin interface component allows players to delete scores and without such component the table will not work.
But I am sure this question will have a reply shortly… I am amazed of this component and I am sure I will talk you about it again.
Take a look to www.componentsforflash.net and seriously consider buying this component.
Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.