Love2d has api mobile support?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
juniorbnusc
Prole
Posts: 1
Joined: Thu Dec 01, 2016 2:54 pm

Love2d has api mobile support?

Post by juniorbnusc »

Example, camera access, screen rotation, etc?
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Love2d has api mobile support?

Post by davisdude »

There is no official API, but Positive07 has made a file which you can find here which allows you to implement your own orientation handling.

As for camera, I believe you would need to do FFI for that (and maybe compile the .apk with camera permissions?), but I'm not sure.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Love2d has api mobile support?

Post by raidho36 »

I don't think camera API comes any time sooner than general USB cam support on PC.

The framework has all the basic features needed to build a mobile game, but not so much in terms of mobile-specific features that are not detrimental.
User avatar
slime
Solid Snayke
Posts: 3163
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Love2d has api mobile support?

Post by slime »

Screen orientation works on iOS. To allow the screen to always rotate to the device's orientation, enable the resizable window flag in love.conf or love.window.setMode. Otherwise the game will use the aspect ratio of the window dimensions you specify in love.conf/love.window.setMode to determine whether it's portrait or landscape.

The above isn't implemented in SDL's Android backend yet, unfortunately.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Love2d has api mobile support?

Post by Positive07 »

Slime could you please give me a link on where in SDL2 is that feature implemented? I may be able to do something for Android when I get some free time
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests