|
Thanks for the link Walter, I only wish I shared your confidence :( The
game code for all our iPhone games (Puzzle Quest etc) are programmed
entirely in Lua as well. One of the technologies I've been working on which I've talked about here before is a modified version of the Lua compiler that spits out C code instead of compiled Lua. The concept is simple enough: you convert all your Lua functions to C functions and substitute each op code with the equivalent C instructions from the VMs inner loop. In return you get much faster execution by eliminating the VM loop mechanics and taking advantage of the C compilers optimizer. You have to pull a few tricks along the way to detect and handle things like tail recursion and coroutines, but overall it works perfectly and integrates seamlessly without having to modifying the Lua code base in any way (it moves all your code to the program segment too, which can be handy on very low-end devices). The question is, does this voilate Apples new SDK guidelines? As far as I can tell it almost certainly does because the original code is still Lua and it's basically doing the same thing as the CS5 cross-compiler. If the Apple certification process does a binary scan on our executable then they're still going to detect large segments of the Lua VM in there, you can't get around that without rewriting the entire thing from scratch. In any case for many developers it probably won't matter anymore...Apple have thrown such a curve-ball with this announcement that many will simply write off iPhone as being too risky given that it's not a profitable platform for most developers anyway, coupled with the fact that Apple are now demonstrating a new willingness to drastically change the game rules without notice at their sole discretion. Any companies that do stick it out may find that programmers like myself, who previously had their hands raised for iPhone/iPad development, no longer want to do tedious ports of Lua code. Mark Feldman Walter Luh wrote:
This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect. |