Extending LÖVE

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
racarate
Prole
Posts: 34
Joined: Wed May 02, 2012 12:37 pm

Extending LÖVE

Post 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
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Extending LÖVE

Post 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.)
Help us help you: attach a .love.
spir
Citizen
Posts: 76
Joined: Wed Oct 17, 2012 1:12 pm

Re: Extending LÖVE

Post 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
... la vita e estrany ...
spir
Citizen
Posts: 76
Joined: Wed Oct 17, 2012 1:12 pm

Re: Extending LÖVE

Post 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... ;)
... la vita e estrany ...
User avatar
racarate
Prole
Posts: 34
Joined: Wed May 02, 2012 12:37 pm

Re: Extending LÖVE

Post 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. :)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Extending LÖVE

Post by Robin »

spir wrote:Sorry, inverted the links up there... ;)
:huh: Ever heard of the edit button?
Help us help you: attach a .love.
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Extending LÖVE

Post by qaisjp »

I'm sure you can use require() to do this...?
Lua is not an acronym.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests