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 »

Actually, you're wrong. Compiled lua bytecode is portable, and linux/mac users can just run the love file appended to the exe, all they have to do is change the extension, or run it manually.
User avatar
subrime
Citizen
Posts: 76
Joined: Thu Nov 13, 2008 6:18 pm
Location: Australia

unable to read a post... epic fail

Post by subrime »

If you read my post and its title, you would know I'm not wrong at all...

Let's try again shall we? Does "merge with love.exe" give you a hint?

How many platforms will a windows-binary-merged-abomination run on?

Requiring special interventions by non-windows users is not portable.

And since you want to speak about bytecode, lets look at that too.
Beginning Lua programming (Kurt Jung, Aaron Brown), from page 303:
Bytecode is not portable. A bytecode generated on one machine can only be used on another if the second machine has the same byte order (little-endian versus big-endian) and word size (32-bit versus 64-bit, for example). Byte order just refers to the order in which multiple-byte numbers are laid out in memory.

Also, because the virtual machine is nothing more than a means of implementing Lua, bytecode is not portable between different versions. Therefore, Lua 5.0 bytecode won't work on Lua 5.1 and vice versa.
Should linux/mac users just fire up vi and chop-out-every-other-byte/swap-the-byte-order-by-hand?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: unable to read a post... epic fail

Post by Robin »

subrime wrote:Should linux/mac users just fire up vi and chop-out-every-other-byte/swap-the-byte-order-by-hand?
I don't think swapping it by hand is necessary. The most pain you get from it is running a script.
Help us help you: attach a .love.
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 »

Still, the exe behaves as a normal .love, only difference is bigger file size. I do agree we shouldn't start compiling stuff..
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Highscores script.

Post by appleide »

Set up vars like this:
local a='a', b='b'....z='z'
then
local pwdToBeSent=a..f..y..b..s..w..h
which is sent to the server.

Have all your lua files compiled.
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 »

appleide wrote:Have all your lua files compiled.
You really like that part? I'd say: only compile what you need to compile.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Highscores script.

Post by Robin »

bartbes wrote:I'd say: only compile what you need to compile.
First rule: don't compile.
Second rule: don't compile yet.
How'bout that?
Help us help you: attach a .love.
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: Highscores script.

Post by ljdp »

Theres a way you can package your game with love on the mac, not sure how youd combine it on linux but im sure theres a way. anyway that steps not crucial.
Post Reply

Who is online

Users browsing this forum: No registered users and 83 guests