Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Access to website, then changing it.

edited September 2013 in Questions Posts: 577

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

Comments

  • IgnatzIgnatz Mod
    Posts: 5,396

    Yes, it is possible, but it requires some server side scripting, of course

  • Posts: 577

    But how could you make code access the server application?

  • BriarfoxBriarfox Mod
    Posts: 1,542

    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.

  • Posts: 577

    @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 ?
    :-/

  • BriarfoxBriarfox Mod
    edited September 2013 Posts: 1,542

    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.

  • Posts: 577

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

  • Jmv38Jmv38 Mod
    Posts: 3,297

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

  • IgnatzIgnatz Mod
    Posts: 5,396

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

  • BriarfoxBriarfox Mod
    Posts: 1,542

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

Sign In or Register to comment.