Access to website, then changing it.

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.

Thanks,

Prynok

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:

http://www.yoursite.com/newscore.php?player=briarfox&score=1000000

--Codea call
local url = "http://www.yoursite.com/newscore.php"
http.request(url.."?player="..playerName.."&score="..playerScore)

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 you will probably have yo learn html, javascript and php… Unless you find exactly what you want already written somewhere. If you have ever been on my web site exposing some codea projects, you can see the number of downloads is visible and updated. Well i have used a php tutorial project to start, but it took me quite some time to tune it the way i wanted to. So it is not going to be a piece of cake.

@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.