Disclaimer: I don't know if this name has been used before, and I will be very angry if anyone points out if it indeed has been.
As a direct response to the support thread Online high score tables, I have created a server-client combination for global high scores.
It is very easy to "hack", but as was discussed, this is a given.
-- sample client code
require("highscore")
highscore.new(942, "bestest player", "normal") -- submit a score of 942 as "bestest player" to the "normal" category
scores = highscore.get("normal", 10) -- get the 10 best scores in the "normal" category
for _, score in ipairs(scores) do
print("global position: " .. score[1])
print("score: " .. score[2])
pritn("player name: " .. score[3])
end
Note that you need an always-on computer with a Lua intepreter to act as the server.
Anyway, I'll play with this and see if I can figure it out. I don't have my own server, but I have my own website hosted at HostGator with MySQL and whatever other random crud I could need. I assume this will work anyway?
Edit: If you want to change the name now, I think Leaderböard would be a good name.
Edit 2: Wait a second, how am I going to get my site to have a Lua interpreter?
If it were me, I'd make a web server with PHP and a SQL table and have Löve submit the data to that. But I don't know how to post data to a web site in Löve.
Jasoco wrote:If it were me, I'd make a web server with PHP and a SQL table and have Löve submit the data to that. But I don't know how to post data to a web site in Löve.
Jasoco wrote:If it were me, I'd make a web server with PHP and a SQL table and have Löve submit the data to that. But I don't know how to post data to a web site in Löve.
In my experience as a web developer, the concept of passing data through a URL is pretty widely grasped. Certainly not everyone gets it, but a lot of people do. POST, being largely invisible to the user, is much more magical and unknown to the general populace.
Remember that a lot of score fakers will probably start by examining their recent network traffic. URLs are guaranteed to be listed. Postdata, not so much.
The best anti-cheat highscore system I've ever read is a replay type thing (I think I read about it in Super Meat Boy). The server gets a score and a list of events and it replays it to validate it. This doesn't prevent people from botting perfect scores, but it at least doesn't allow you to just insert a huge number for the score and send it over. However, I'm guessing this method requires a constant dt.