Hello, this my first time here, so, I could introduce myself a little, I'm a French dev who work with Löve since now 6 month, and i very like this engine, but, I encounter my first problem that I can't solve, and all the search I've made didn't resolve anything.
So, my problem is that I want to obfuscate my code from the eyes of the user, because I don't want the player easily can access to everything in the code, and change anythings, or find how to access for example, to the network data who can be use in a online game.
I've planned to use LuaC, but ... I didn't success to do what I want. I havn't success to use love.filesystem.load or dofile.
For love.filesystem.load(file)(), it say that the bytecode isn't compatible, and I don't know how to solve this.
For dofile(path), I havn't succesfuly get the path, so, I can't use it.
Have you anything to suggest to solve my problem, I'll be very happy and thanksfull !
PS : I absolutely want to obfuscate a little, even if it reversible, because it will be less easier to do for the user.
[SOLVED] Problem for distribution
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
[SOLVED] Problem for distribution
Last edited by Chloro on Wed Aug 20, 2014 1:13 pm, edited 2 times in total.
- slime
- Solid Snayke
- Posts: 3162
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Problem for distribution
LÖVE uses LuaJIT 2.0 by default. Lua bytecode is incompatible between different Lua versions (and different architectures if you don't use LuaJIT.)
This page shows how to generate LuaJIT bytecode using the standalone LuaJIT interpreter, or via LÖVE if you use string.dump on the function returned by love.filesystem.load'ing a regular Lua file, and then save it using love.filesystem.write. If you make the generated files have the .lua extension then they'll work with 'require', too.
This page shows how to generate LuaJIT bytecode using the standalone LuaJIT interpreter, or via LÖVE if you use string.dump on the function returned by love.filesystem.load'ing a regular Lua file, and then save it using love.filesystem.write. If you make the generated files have the .lua extension then they'll work with 'require', too.
Re: Problem for distribution
Thanks to you, it work perfectly !
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest