[aquaria] Patch to run Lua scripts as threads
achurch+aquaria at achurch.org
Wed Jul 7 23:53:58 EDT 2010
>For the PSP, is there any reason we can't just precompile the scripts?
>Use luac to convert it down to bytecode, and then load the bytecode
>files instead of the .lua versions (or perhaps, compile to bytecode the
>first time you see that file is missing or outdated).
Yeah, I'd been thinking about that as well. Since you pretty much have
to use a package file on the PSP, I could just luac everything in the
packaging step, and keep a .lua fallback for mods. I haven't actually
profiled map changes yet, so I don't know how much time is spent
compiling the scripts vs. loading them into memory; it could be that the
I/O savings from not having to pump hundreds of seek/read calls through
the OS will trump everything else. I'll definitely look into it, though.
Out of curiosity, do you know if there's a standard file extension for
compiled Lua bytecode (like .pyc instead of .py for Python)? It hardly
matters since I can make the code check for any extension, but I figure
that if there's a standard, I might was well keep to it.
achurch at achurch.org
More information about the aquaria