Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easiest way to create server for storing list of highscores for javascript game? [closed]

Alright, so I'm doing a school project where I have to implement Space Invaders with JavaScript. It's basically done but the teacher wants that there's a score list. I just want a server where I can post player's score with jQuery and fetch existing scores from the server after the game has ended. Basically I was thinking to implement it like this (may not be the wisest solution):

  1. Player plays the game
  2. Game is over -> fetch all scores from the server as an array
  3. Add current score to the array
  4. Sort array into descending order
  5. Splice array so that there will be only 5 best scores
  6. Show score list to player
  7. Post current score to the server
  8. Repeat

So any suggestions how to create this kind of a simple server (post scores & get scores)? I'm not really familiar with this stuff.

like image 539
Kenny Roberts Avatar asked Dec 20 '12 18:12

Kenny Roberts


1 Answers

Seems this tutorial on Parse was created just for you! (The example is even a high scores example.)

Parse is a persistence library that allows you to get by without writing any server code.

like image 57
Lukas Avatar answered Oct 20 '22 22:10

Lukas