The making of the Novamedia map viral
You may have seen our UK map game that we launched recently. You haven't? Well here it is: http://www.novamedia.co.uk/ukmapgame/. Warning: it's mildly addictive.
The idea came to me one day that it might be something that we can put together quite quickly that will afford some diversion to our clients (a few minutes away from your busy schedule never hurt anyone) whilst at the same time showing off our web application building skills. Add in a bit of subtle marketing for Novamedia and it's a winner all round. (The marketing aspects will change over time having received some pertinent advice from fellow business people).
You may be interested in how we put this together and how it all works. We've been building web applications for 13 years and we're pretty good at it now. So much so that this map game took less than a week from start to finish.
As with all web applications it relies on a database in the background and a web application 'language' in the code to interact with that database. Our preferred solutions are MySQL: for the database and ColdFusion for the web application development.
There are two database tables, one for all of the places on the map and another to hold the results. The places table is very simple. It just contains the town or city name, its X and Y co-ordinates on our map and its level of difficulty: easy, medium or hard.
We had to make sure that the co-ordinates were accurate. We didn't want people coming back to us and telling us that we'd got our location wrong. To do this we downloaded a free Ordnance Survey large scale map of the UK which contained thousands of place names. We used this map to produce our blank graphic map and then developed a formula to convert the co-ordinates from the large scale map to the co-ordinates required for our online map and therefore our places database. We added over 300 places in all and this was probably the longest part of the job.
Designing the user interface is important in any online application and we gave this a lot of thought in order to make it as user-friendly as possible. When the user has selected their level of difficulty, the system takes them through a series of 10 places and the results of their guesses are shown in a table that builds up on the right.
Working out the results was quite simple. You remember the Pythagorean theorem from your school days? Of course you do! The square on the hypotenuse is equal to the sum of the square of the other two sides. By using a right-angled triangle from where you clicked to the actual co-ordinates of the location, it's easy to work out the straight line distance between the two points. Multiply this by a factor that converts pixels to miles and bingo, you have your result.
These results are held in memory until you have completed all 10 guesses. Then they are added to the results database table. Again it's a simple table. It contains your score, the level of difficulty and a timestamp to show when you played the game. It also contains your IP address. This is just there to show us how many different people are playing to give us some idea of the popularity of the game.
Knowing your score and level of difficulty, it's then easy to work out where you rank in the list of people who have played the game at that particular level. We can show you your position and a sad, neutral or smiley face depending on how you fared compared to your fellow players.
We've built many web applications over the years mostly a lot more complex than the map game but I hope that this little look 'under the bonnet' gives you a small idea of what goes on behind the scenes when building an online application.

01689 822500


