love2d supports leapmotion?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
elizeumatheus
Prole
Posts: 3
Joined: Thu Jul 23, 2015 2:16 am

love2d supports leapmotion?

Post 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
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: love2d supports leapmotion?

Post 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
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: love2d supports leapmotion?

Post 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.
When I write def I mean function.
elizeumatheus
Prole
Posts: 3
Joined: Thu Jul 23, 2015 2:16 am

Re: love2d supports leapmotion?

Post 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 :(
elizeumatheus
Prole
Posts: 3
Joined: Thu Jul 23, 2015 2:16 am

Re: love2d supports leapmotion?

Post 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
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: love2d supports leapmotion?

Post 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.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests