Flash Highscore Component using Php and MySql

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.

Flash Highscore Component

The only issue I noticed, the installer told me to delete the installHighScore.php file for security reasons.

Flash Highscore Component

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.

Get the most popular Phaser 3 book

Through 202 pages, 32 source code examples and an Android Studio project you will learn how to build cross platform HTML5 games and create a complete game along the way.

Get the book

215 GAME PROTOTYPES EXPLAINED WITH SOURCE CODE
// 1+2=3
// 100 rounds
// 10000000
// 2 Cars
// 2048
// A Blocky Christmas
// A Jumping Block
// A Life of Logic
// Angry Birds
// Angry Birds Space
// Artillery
// Astro-PANIC!
// Avoider
// Back to Square One
// Ball Game
// Ball vs Ball
// Ball: Revamped
// Balloon Invasion
// BallPusher
// Ballz
// Bar Balance
// Bejeweled
// Biggification
// Block it
// Blockage
// Bloons
// Boids
// Bombuzal
// Boom Dots
// Bouncing Ball
// Bouncing Ball 2
// Bouncy Light
// BoxHead
// Breakout
// Bricks
// Bubble Chaos
// Bubbles 2
// Card Game
// Castle Ramble
// Chronotron
// Circle Chain
// Circle Path
// Circle Race
// Circular endless runner
// Cirplosion
// CLOCKS - The Game
// Color Hit
// Color Jump
// ColorFill
// Columns
// Concentration
// Crossy Road
// Crush the Castle
// Cube Jump
// CubesOut
// Dash N Blast
// Dashy Panda
// Deflection
// Diamond Digger Saga
// Don't touch the spikes
// Dots
// Down The Mountain
// Drag and Match
// Draw Game
// Drop Wizard
// DROP'd
// Dudeski
// Dungeon Raid
// Educational Game
// Elasticity
// Endless Runner
// Erase Box
// Eskiv
// Farm Heroes Saga
// Filler
// Flappy Bird
// Fling
// Flipping Legend
// Floaty Light
// Fuse Ballz
// GearTaker
// Gem Sweeper
// Globe
// Goat Rider
// Gold Miner
// Grindstone
// GuessNext
// Helicopter
// Hero Emblems
// Hero Slide
// Hexagonal Tiles
// HookPod
// Hop Hop Hop Underwater
// Horizontal Endless Runner
// Hundreds
// Hungry Hero
// Hurry it's Christmas
// InkTd
// Iromeku
// Jet Set Willy
// Jigsaw Game
// Knife Hit
// Knightfall
// Legends of Runeterra
// Lep's World
// Line Rider
// Lumines
// Magick
// MagOrMin
// Mass Attack
// Math Game
// Maze
// Meeblings
// Memdot
// Metro Siberia Underground
// Mike Dangers
// Mikey Hooks
// Nano War
// Nodes
// o:anquan
// One Button Game
// One Tap RPG
// Ononmin
// Pacco
// Perfect Square!
// Perfectionism
// Phyballs
// Pixel Purge
// PixelField
// Planet Revenge
// Plants Vs Zombies
// Platform
// Platform game
// Plus+Plus
// Pocket Snap
// Poker
// Pool
// Pop the Lock
// Pop to Save
// Poux
// Pudi
// Pumpkin Story
// Puppet Bird
// Pyramids of Ra
// qomp
// Quick Switch
// Racing
// Radical
// Rebuild Chile
// Renju
// Rise Above
// Risky Road
// Roguelike
// Roly Poly
// Run Around
// Rush Hour
// SameGame
// SamePhysics
// Save the Totem
// Security
// Serious Scramblers
// Shrink it
// Sling
// Slingy
// Snowflakes
// Sokoban
// Space Checkers
// Space is Key
// Spellfall
// Spinny Gun
// Splitter
// Spring Ninja
// Sproing
// Stabilize!
// Stack
// Stairs
// Stick Hero
// String Avoider
// Stringy
// Sudoku
// Super Mario Bros
// Surfingers
// Survival Horror
// Talesworth Adventure
// Tetris
// The Impossible Line
// The Moops - Combos of Joy
// The Next Arrow
// Threes
// Tic Tac Toe
// Timberman
// Tiny Wings
// Tipsy Tower
// Toony
// Totem Destroyer
// Tower Defense
// Trick Shot
// Tunnelball
// Turn
// Turnellio
// TwinSpin
// vvvvvv
// Warp Shift
// Way of an Idea
// Whack a Creep
// Wheel of Fortune
// Where's my Water
// Wish Upon a Star
// Word Game
// Wordle
// Worms
// Yanga
// Yeah Bunny
// Zhed
// zNumbers