I was looking for various opportunities to get my game logic running in compiled C to help improve performance, and came across this - http://lua-users.org/wiki/LuaToCee
Does anyone know if Love would be able to work with a file created by this? Would it be possible to include all game logic without love-related calls into one file, to run in a compiled form? It seems like it would help efficiency, but maybe I am confused as how this compiled API would work.
Thoughts?
Could Love read files converted by Lua to Cee?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- TylertheDesigner
- Citizen
- Posts: 80
- Joined: Sat Apr 10, 2010 2:27 am
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Could Love read files converted by Lua to Cee?
LÖVE can speak with libraries of compiled C. They take the form of a .dll file in windows. I never remember the extension for the win/mac versions. But they are different. So you would have to compile the C code three times, once per platform. I'm sure it's possible, but I don't know how to do that, and I'm sure it'll be a complex process.TylertheDesigner wrote:I was looking for various opportunities to get my game logic running in compiled C to help improve performance, and came across this - http://lua-users.org/wiki/LuaToCee
Does anyone know if Love would be able to work with a file created by this? Would it be possible to include all game logic without love-related calls into one file, to run in a compiled form? It seems like it would help efficiency, but maybe I am confused as how this compiled API would work.
Thoughts?
Do you have any efficiency problem? If you show us your Lua code maybe we can help you make it better without trying such a drastic measure.
When I write def I mean function.
Re: Could Love read files converted by Lua to Cee?
.so for shared libraries, .a for static libraries in Unix.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Could Love read files converted by Lua to Cee?
You did read that it decreases performance at the moment, right?
Honestly, I doubt it will speed the code up any reasonable amount, since you're not cutting out lua, worse, you're travelling through the api with every single instruction, no wonder it's slower. If you wanted speedup, you'd try to cross the lua/c boundary less often, or more efficiently (see luajit's ffi).
Honestly, I doubt it will speed the code up any reasonable amount, since you're not cutting out lua, worse, you're travelling through the api with every single instruction, no wonder it's slower. If you wanted speedup, you'd try to cross the lua/c boundary less often, or more efficiently (see luajit's ffi).
Re: Could Love read files converted by Lua to Cee?
If you tell us what exactly you are trying to speed up, we could potentially help you write more efficient code. That would be a lot easier than including native functions.
- TylertheDesigner
- Citizen
- Posts: 80
- Joined: Sat Apr 10, 2010 2:27 am
Re: Could Love read files converted by Lua to Cee?
While I appreciate the offers of help from everyone, this wasn't for any specific code. If anything, I would have used it mostly for helper functions and any continuation of the math library (distance formula, vector math, etc). I have some larger project ideas that I am wary of starting in Lua do to the issues in efficiency, so I'm always looking for ways to boost performance.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 4 guests