Love Byte
-
- Prole
- Posts: 19
- Joined: Mon Dec 19, 2011 11:17 pm
Love Byte
Hey, got kind of bored an decided to create a Love2D bytecode compiler. Why you ask? well it allows your games to run faster and if you don't want anyone tinkering with your source the created .lua files are lua bytecode making them practically impossible to read. I dubbed this tiny (25 kb) program Love Byte and it is written in a few lines of c. It is currently only working on windows but I included the source file so any of you osx or linux users could probably port it pretty easily. It is command-line and is used like such: "LoveByte first.lua second.lua etc..." all the created bytecode files are put into a newly created folder called "compile" in the same directory as the program. The program is reliant on luac so you need to have it in the same directory (included in the zip). Anyway, tell me what you think.
- Attachments
-
- Love Byte.zip
- (112.26 KiB) Downloaded 253 times
Re: Love Byte
Don't use sprintf. It doesn't range-check the length of the buffer you supply it. Use snprintf instead.
Also, some side advice on the subject of code obfuscation, which I mentioned in the "Comment and Space Remover" thread:
For games that aren't commercially distributed, it encourages a lack of trust in the community. We were all newbies once, and still newbies on some facets of our experience. One of the ways we learned was through reading and understanding other's code. The community should remain friendly and when someone else learns from or uses your code, it should be considered flattery rather than theft. Our Libraries have such inviting names for a reason
Also, some side advice on the subject of code obfuscation, which I mentioned in the "Comment and Space Remover" thread:
For games that aren't commercially distributed, it encourages a lack of trust in the community. We were all newbies once, and still newbies on some facets of our experience. One of the ways we learned was through reading and understanding other's code. The community should remain friendly and when someone else learns from or uses your code, it should be considered flattery rather than theft. Our Libraries have such inviting names for a reason
Re: Love Byte
Inny You do have a good point there: non-commercial or debugging code should be left in the open; if need be with a license that help protect your assets and ideas, or if compiled, a source file supplied or linked to.Inny wrote:Also, some side advice on the subject of code obfuscation, which I mentioned in the "Comment and Space Remover" thread:
For games that aren't commercially distributed, it encourages a lack of trust in the community. We were all newbies once, and still newbies on some facets of our experience. One of the ways we learned was through reading and understanding other's code. The community should remain friendly and when someone else learns from or uses your code, it should be considered flattery rather than theft. Our Libraries have such inviting names for a reason
I do however take a small exception to the fact that you've take the opportunity of using the first reply to AlgidPlasma to somewhat rain on his parade.
AlgidPlasma didn't say that everyone should start using it to hide their source, and even byte-code can be decompiled if need be; they merely stated the case for increased load speed and that code obfuscation was another effect.
All tools, positive or negative should be available, it's up to the programmers themselves to be responsible (especially seeing as this is not the only byte-code implementation available and certainly not the only way to obfuscate Lua code) with those tools.
AlgidPlasma: Good job on the Luac Bytecode Compiler, once you fix the sprintf problem it'll be great for a couple of projects I have that I'll be selling on a few online stores
My Development Diary - http://shanegadsby.info
Re: Love Byte
Respectfully noted. The last thing I want to do is start a fight while trying to get everyone into a group hug.I do however take a small exception to the fact that you've take the opportunity of using the first reply to AlgidPlasma to somewhat rain on his parade.
-
- Prole
- Posts: 19
- Joined: Mon Dec 19, 2011 11:17 pm
Re: Love Byte
Updated version with snprintf() to prevent buffer overflows.
- Attachments
-
- LoveByte.zip
- (158.44 KiB) Downloaded 261 times
Who is online
Users browsing this forum: No registered users and 1 guest