Page 1 of 1
Extending LÖVE
Posted: Mon Nov 05, 2012 2:39 am
by racarate
Hi gang! Forgive me if this is someplace obvious, but is there a tutorial on extending LÖVE? It's been a long time since I wrote a C function and exposed it out to the LUA runtime and I can't quite remember all the steps.
Specifically, I'm trying to make a function love.getTouchpoints() that will read the multitouch input on my Apple trackpad.
Any guidance would be great!
-Nick
Re: Extending LÖVE
Posted: Mon Nov 05, 2012 11:59 am
by Robin
I don't think so. Cool feature, though. Maybe other people can make Windows and Linux implementations so it can be added to vanilla LÖVE? (With an extra possible enum value for isSupported or something.)
Re: Extending LÖVE
Posted: Mon Nov 05, 2012 2:07 pm
by spir
racarate wrote:Hi gang! Forgive me if this is someplace obvious, but is there a tutorial on extending LÖVE? It's been a long time since I wrote a C function and exposed it out to the LUA runtime and I can't quite remember all the steps.
Specifically, I'm trying to make a function love.getTouchpoints() that will read the multitouch input on my Apple trackpad.
Any guidance would be great!
-Nick
First, maybe (re)watch the Lua manual (
http://www.lua.org/manual/5.1/) & ref (
http://www.lua.org/pil/index.html). If "It's been a long time" then probably there's some valuable info to (re)discover in there. The chapters of the manual on htis topic --a who;le section, actually-- are great (if still a bit obscure at times).
Denis
Re: Extending LÖVE
Posted: Mon Nov 05, 2012 2:08 pm
by spir
spir wrote:
First, maybe (re)watch the Lua manual (
http://www.lua.org/manual/5.1/) & ref (
http://www.lua.org/pil/index.html). If "It's been a long time" then probably there's some valuable info to (re)discover in there. The chapters of the manual on htis topic --a who;le section, actually-- are great (if still a bit obscure at times).
Denis
Sorry, inverted the links up there...
Re: Extending LÖVE
Posted: Tue Nov 06, 2012 1:27 am
by racarate
Ah, it was worth a shot -- thanks for pointing me to the right place in the docs, though!
Also you totally got my hopes up with "watch", I thought there was a Lua movie for this sort of thing.
Re: Extending LÖVE
Posted: Tue Nov 06, 2012 10:03 am
by Robin
spir wrote:Sorry, inverted the links up there...
Ever heard of the edit button?
Re: Extending LÖVE
Posted: Tue Nov 06, 2012 7:04 pm
by qaisjp
I'm sure you can use require() to do this...?