Highscores script.

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Highscores script.

Post by bartbes »

That makes some sense...
User avatar
whitebear
Citizen
Posts: 86
Joined: Sun Mar 15, 2009 1:50 am

Re: Highscores script.

Post by whitebear »

Does Löve read compiled lua files? That would make it more secure. I would like to try this with my mySQL database but I do not fancy sharing the passwords in public internet.
User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: Highscores script.

Post by osgeld »

it should read compiled lua files

but you can just as easily decompile lua scripts and in the comments will be more or less the original script, i think theres a way you can strip those out on compile but then you loose almost all your debug info (so make sure its right!)
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: Highscores script.

Post by ljdp »

Hmmm, if love reads compiled lua then I'll make it so each game can sign up for their own password
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Highscores script.

Post by bartbes »

Yes, LÖVE reads compiled scripts, just remember that if you compile main.lua it still has to be called main.lua, not main.luac.
Reason why LÖVE reads compiled scripts: because the lua API handles that all by itself.
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: Highscores script.

Post by ljdp »

problem is, if you store the password as a string you can see the password easily in a text editor :(
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Highscores script.

Post by bartbes »

What if you change the order around and then use some sort of algorithm to decode it at runtime? (probably with a code stored in the file as well)
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: Highscores script.

Post by ljdp »

Surely anyone could copy the compiled lua file, link it to their own project which sends whatever score they want.
The best I can think of is just merging the .love with the love.exe.
You could still go into a hex editor but you'd have a hard time finding the password, it should at least deter most people.
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: Highscores script.

Post by ljdp »

Oky doke.
Here's a new version:
highscore2.lua
Highscore2.lua compiled
(11.1 KiB) Downloaded 120 times
Before you use it you need to register your gamename at
http://locofilm.co.uk/highscore/newgame.php

and in load

Code: Select all

highscore.init( "gamename", password )
--make sure password is an integer not a string.
You will also need to compile main.lua before you distribute it.

Code: Select all

luac -o main.lua main.lua
For added deterence merge the .love with the love.exe.
And yes there is 'other' security measures in place other than compiling the code, i'm just not gonna tell anyone what they are :P
User avatar
subrime
Citizen
Posts: 76
Joined: Thu Nov 13, 2008 6:18 pm
Location: Australia

merge with love.exe... epic fail

Post by subrime »

And so how do you think your frankensteinish abomination will work on anything but your original hardware and software platform? (hint: it won't)

A big part of the attraction of love compared with other game systems is that a single game file can run across all supported systems.
Post Reply

Who is online

Users browsing this forum: No registered users and 79 guests