slime wrote:Robin wrote:slime wrote:The point of most game source content obfuscation/encryption isn't the same point as most traditional computer security. It's simply to discourage most users from viewing or distributing the original source and/or art assets, rather than completely preventing anyone from ever accessing them
No practical security system can completely prevent everyone from doing something forever. Like I said, security is about trade-offs, and for the reasons I stated earlier, I think that a trade-off like we're discussing here is fruitless.
I think the question we'd answer differently is: If your goal is to discourage people from viewing your original code and art and you discourage 90% of the people, is that worth it or not?
Now, what if the effort was already done for you by being built into LÖVE?
I think the more important question, though, is: should LÖVE provide an easy choice for game developers to make themselves (assuming an implementation would work out internally), or should the game developers have to search for their own solutions every time, possibly requiring knowledge of C++ and LÖVE's source?
This question is more pertinent as we start to think about the ramifications of potential mobile versions of LÖVE: the reasons for wanting game source content obfuscation/encryption are orders of magnitude more relevant on those platforms compared to on the desktop.
It's also worth mentioning that LOVE is one of the few popular Lua game frameworks (or game frameworks in general) that does not have any such security in place for devs. I realize that this mainly has to do with the community around LOVE (which is very open-source-centric, as opposed to the communities of frameworks/engines like Polycode, Corona, Moai, etc... [even though some of those engines themselves are open source]) and the general direction of the project, so I'm not criticizing it here. It's just that, from a "LOVE competing with other engines" point of view (whether this point of view is flawed or not), LOVE has a big disadvantage here.
While I don't know how practical something like this is because of how cross-platform deployment works with LOVE, I'd love for such securities to be provided as part of LOVE. Most importantly, I'd love for them to be optional - I think that this would truly make everybody happy. All of "open source crowd" could keep things open source (which is great!), and the community could encourage newbies and such to release their source, etc.. At the same time, the more protective or commercial minded users could easily keep things closed if they so desired. And, as slime mentioned, this would be a huge (if not essential) asset on mobile platforms.
It seems to me that one possible path, at least for code, would be an optional LuaC compiler and packager. I know that there are some compatibility and portability issues with LuaC though. If any LOVE devs/contributors are interested in looking into this, you may want to contact Ivan of the Polycode project, as I believe he is working on a way around this (
currently in Polycode, another framework with Lua scripting, you can publish to a "polyapp" format which is run by a platform-specific player, like LOVE, that is automatically packaged for each platform you publish to. Currently, also as with LOVE, the "raw" Lua scripts and assets are in a disguised ZIP file. He has mentioned that he is implementing the ability to compile the Lua to bytecode for multiple platforms from one; e.g., you could publish compiled Lua and everything to Linux, Mac OSX, and Windows, all from a Windows computer). Not sure what his progress is on this, or that I'm even remembering correctly (haha), but it might be worth contacting him since both projects are open source.
EDIT:
As far as whether or not source and asset obfuscation is outside of the scope of LOVE...well, that's up to the the devs (and community?) I suppose, but I would say it's not. If LOVE was simply middleware or something, then I would agree that it is. But LOVE isn't really "sold" as something to be expanded on; it's basically sold as an easy-to-use, one-stop-shop. And, unlike some other Lua frameworks like Moai, LOVE is definitely not geared towards "if you want more features, go modify the source!" As opposed to that, it seems like it is closer in design philosophy to frameworks like Pygame, engines like Flixel and Flashpunk, and even "game makers" like Game Maker and Construct.
EDIT AGAIN:
As far as compiled Lua...while LOVE is chiefly based on vanilla Lua, LuaJIT's string.dump feature would be very useful here.
string.dump(f [,strip]) generates portable bytecode
...
The generated bytecode is portable and can be loaded on any architecture that LuaJIT supports, independent of word size or endianess.
http://luajit.org/extensions.html#string_dump