lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


----- Original Message -----
From: Roberto Ierusalimschy
Date: 4/27/2010 10:07 AM
I can see it now: "You may only use .plist files for loading your
data, but you may not interpret that data in a way that would cause
it to call a callback in your application..."
Do you know what that means?
Other than being a joke, because the whole situation is ludicrous, I'm not sure what this all means. If I use XML (or Apple's on .plist format) for my data formats and the parser reaches the Width and Height data, my code is written like so:

<Width>5</Width>

if (key == "Width")
    SetWidth(value);

I just wrote a scripting language! I interpreted the XML data and had it call a function in my iPhone application!

As near as I can figure, the only way I can ship levels for a game is to embed them as raw C code in my application's executable, because the mere act of interpreting the data is bad.

Just to drive the point further home:

<HappyHappy>You'll love this...</HappyHappy>

if (key == "HappyHappy")
    FormatAllDataOnMyIpod();

Regardless, this is now off topic.

When I make my iPhone game, I will have a Lua binary data format, because using Lua for data is awesome (barring the number of constants limitation). If they freak out over that, I'll write a custom reader for the Lua binary format that does the same thing as the existing Lua code.

Josh