Page 1 of 1
Love2d has api mobile support?
Posted: Thu Dec 01, 2016 2:56 pm
by juniorbnusc
Example, camera access, screen rotation, etc?
Re: Love2d has api mobile support?
Posted: Thu Dec 01, 2016 8:37 pm
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.
Re: Love2d has api mobile support?
Posted: Thu Dec 01, 2016 11:29 pm
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.
Re: Love2d has api mobile support?
Posted: Fri Dec 02, 2016 4:14 am
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.
Re: Love2d has api mobile support?
Posted: Fri Dec 02, 2016 4:42 am
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