Page 1 of 1

love2d supports leapmotion?

Posted: Thu Jul 23, 2015 2:53 am
by elizeumatheus
Hello everyone, I am a connoisseur of recent love2d, and was producing some stuff in it. Now I'm trying to make a popular game, the old pong. But I wanted to do something more, putting the leap motion functionality to it where when I made a move with my hand, the bar would move, making the movement go up and go down.
I'll be leaving just below a picture for better understanding of what I plan basically I want to move the bar with my hands. It is possible ? Grateful ;)
Image

Re: love2d supports leapmotion?

Posted: Thu Jul 23, 2015 4:56 am
by Davidobot
I have never personally hooked in an API into LÖVE, but I recall someone doing something like that. It shouldbe pretty easy if you know what you're doing.
Here's the C++ (löve's source code using c++) implementation of the Leapmotion API: https://developer.leapmotion.com/docume ... index.html

If you use Nön (a Java implementation of löve), you can hook in Leapmotion's Java API without even modifying the source code: https://developer.leapmotion.com/docume ... index.html

Re: love2d supports leapmotion?

Posted: Thu Jul 23, 2015 1:35 pm
by kikito
I am not 100% sure, but maybe there is the possibility of connecting to the leapmotion API using vanilla LÖVE using LuaJIT's FFI interface. Maybe.

Re: love2d supports leapmotion?

Posted: Fri Jul 24, 2015 5:24 am
by elizeumatheus
elizeumatheus wrote:Hello everyone, I am a connoisseur of recent love2d, and was producing some stuff in it. Now I'm trying to make a popular game, the old pong. But I wanted to do something more, putting the leap motion functionality to it where when I made a move with my hand, the bar would move, making the movement go up and go down.
I'll be leaving just below a picture for better understanding of what I plan basically I want to move the bar with my hands. It is possible ? Grateful ;)
Image
Sorry, I have no idea how to do that yet :(

Re: love2d supports leapmotion?

Posted: Fri Jul 24, 2015 5:38 am
by elizeumatheus
kikito wrote:I am not 100% sure, but maybe there is the possibility of connecting to the leapmotion API using vanilla LÖVE using LuaJIT's FFI interface. Maybe.
'm doing this to make the bar movement, from what I understood of jit moon is that it has C functions already made that I can use, right? But would have something for movement integrating leap motion?? Image

Re: love2d supports leapmotion?

Posted: Fri Jul 24, 2015 7:31 pm
by s-ol
The luajit ffi C bindings allow you to call any C function from a binary. Theoretically binding to leapmotion should be possible, but the SDK is in C++, so you will have very weird symbol names.