Hi! For a while, I’ve been wanting to implement a high score system in my game, where you can compete with other players. I thought about doing this through a website I own, where, to check if you beat the highscore, it would send a request to the website, and look for a page called “score” and test the score there to the one you have. If you beat it, then the “score” page would have your number instead.
Is this possible? And let me know if the text was confusing in anyway.
Yes, it is possible, but it requires some server side scripting, of course
But how could you make code access the server application?
Sure you could do that with a SQL DB PHP/ASP and http.request(). You could keep more then one score. Have the project try to get high scores when it’s launched then save them locally. So if the user is not online he can still see a fairly recent copy of high scores.
@Briarfox is there any way, with python or java, to allow the app to change those scores? Or would I just come in every once and awhile, and change them manually ?
Use codeas http.request() You can send data to the website and receive data. You use GET and POST. You could have a page:
local url = "http://www.yoursite.com/newscore.php"
Setup a mySQL DB to store them and sort them. You can have a highscores.php to return them.
@Briarfox sorry, I have no experience in website usages with apps, but I think I see what your saying but I have two questions, would the app be checking for the score inside the URL address, or on that page, and secondly, will I have to learn php? (I’m open to learning it)
@prynok - it is simply not worth your while learning all that stuff just to record high scores. I would try something easier, just in Codea.
@prynok If all you plan to do is high scores I would not bother. I thought maybe you had some experience with web development. If you are looking at releasing on the App Store, I believe you could use gamecenter, but I do not have any experience with that.