lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, Jun 03, 2011 at 09:36:57PM +0800, Xavier Wang wrote:
> 2011/6/2 Rob Kendrick <>
> >
> > > maybe I need to have a try :) but, do you think it's appropriate to put
> > > plain script text in a game release?
> >
> > Sure, why shouldn't it be?  If you're actually worried, through it
> > through something like LuaSrcDiet or one of the other source
> > compressors; their output is often smaller than luac's anyway.
> >
> > luac is really only useful if you're running Lua where there is so
> > little space you can't include the compiler.  It does not solve any
> > obfuscation or script size problems at all.
> >
> I have tried LuaSrcDiet, thats great, but can't solve my problem completely:
> It changed the code info e.g. line number, it makes debug difficult. .luac
> file will hold file information such as line number, variable name etc. but
> they are dropped by LuaSrcDiet.
> are there any other way to solve this problem? thank you all the same.

I think the problem is that we don't know what your problem is :)  It's
totally appropriate to ship script sources with games; many games do
this.  Pre-compiling them protects you against nothing.

Perhaps there is a source compressor (like LuaSrcDiet) that maintains
line numbers and such, and just removes empty space and comments?

If you're concerned about script size, just gzip your scripts.