• Advertisement
Sign in to follow this  

[web] storing highscores

This topic is 2555 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

I've been tricking around with HTML5's canvas and some javascript to make a snake clone, I'd like to be able to store the high scores but I'm not sure how to do it. A few links I've found online all refer to using a mysql database hosted on a server. I have access to a unix server to host my game but I don't have access to any databases. Would it be feasible to use XML?

I'd really appreciate any tips or advice.

Thanks,

Theodore

Share this post


Link to post
Share on other sites
Advertisement
This is an excellent use for a cookie (for single users). If you want high scores for EVERYBODY,you certainly don't need a database for that. Just store the results in a tab-delimited text file. Manipulate the text file with a server-side script of your choice (PHP, Perl, shell...). Trigger the server-side script to run with a simple AJAX query.

Share this post


Link to post
Share on other sites
I know this is months after my original post, and I had intended to reply sooner but I totally forgot.

What I ended up doing was going with a local high score so that the player is only trying to beat their own score each time rather than a global score board.

I used local storage that I'd read up on in this tutorial and it worked really well.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement