Sorry for the delay, I was a bit busy yesterday evening.
http://svgames.pl/trash/netscores.zip
I hope everything's commented clearly enough. As for the FP side, the game was made using SDL, so I went with SDL_net.
Sorry for the delay, I was a bit busy yesterday evening.
http://svgames.pl/trash/netscores.zip
I hope everything's commented clearly enough. As for the FP side, the game was made using SDL, so I went with SDL_net.
Did you take security into account, so that not anyone can open the link and add nonsense-scores?
In the downloadable script there's no such thing. In my game I used a simple hash that was calculated by the game and attached to the values sent, the script then calculated the hash again and checked if they matched.
Very cool topic!
If you had purchased a web hosting package you could use the domain and access the database server that the hosting uses. There are a lot of libraries that will allow you to access various database servers. PHP is not really necessary unless you want to add some interaction with the game it's self and a website. ie. displaying highscores or some kind of weekly or monthly stats on a site you designed for the game.
You can however do a lot of neat things if you did setup a databse to receive data from your game such as hosting exciting screenshots from players once they hit a new top highscore and create user accounts for your game kind of like Blizzard does.
Free hosting can be a problem if you want stability so you should consider the low cost of paying a more solid hosting provider if you try this option.
Besides the web hosting options they do have other highscore/award system services for different platforms such as iOS, Mac OS X (with the new Mountain Lion 10.8 version) and Android. Using these would depend on the API or libraries they provide to developers to use. Only C-based headers/libraries would of course mean translation too.
BTW Would anybody be interested in such a library/service if it were provided to Pascal game developers as a simple library file they could add to their games?
Yes, I thought about using it on my web host (not free but paid).
And I would be very interested in such a simple library!
Best regards,
Cybermonkey
Or if you would rather have your web host do all the database work, you could do some PHP script that would take either POST form data or URL Query and process it to go into your database. The problem then is getting the data back as a file your game can process.
I think if your PHP is bad or non-existent, you're better off with learning the MySQL-based Pascal library.
Plus having a script like that could open it's self up to security leaks or falsely given data. Cheating and hacking.
Bookmarks