DanTheTerrible wrote:Could you recommend an entry level resource (book, by preference, but a website will do) for learning about Lua?
The Lua flavor used by sis is 5.2, but the parser is pretty heavily modded. For learning basic Lua concepts and patterns, the standard reference book would be the third edition
of Programming in Lua
. However, to understand the eccentricities of the Lua parser in sis, you'll actually need to look at the patch notes on my personal page
on the Lua users wiki.
All that said -- Lua, as a programming language, is really unusually flexible in terms of what kinds of structures and patterns you can use with it. And one of it's biggest strengths is that it interfaces very easily with C code. The problem with this, from a modder's perspective, is that while you can read all of the Lua sources in SiS, you can't actually read the C sources that interface with them, which means that big chunks of the game code are "black boxes" that may not be easy to figure out.
For example, SiS supports an undo/redo system, and at a high level, the reason that exists is that Lua's metatable
system makes implementing such a thing relatively easy. But, while reading Programming in Lua will leave you with a general high level understanding of how such systems can be put together, 99% of the actual implementation of all the undo/redo logic is done in C++ code, so, if you want to really understand how some aspect of it works, your only option is probably to ask me for the relevant details.
If you've programmed, even casually, in assembly, you'll probably find the Lua language easy enough to understand. What's more likely to prove frustrating, I'd imagine, is all the ways in which the programming environment for SiS is undocumented.