love-android-sdl2 (native, 0.9.2)

A project to port LÖVE to Android handhelds
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: love-android-sdl2 (native, 0.9.2)

Post by Nixola »

A flag in setMode ("portrait", "landscape", "default", "auto") would be quite nice and handy
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Frohman
Prole
Posts: 21
Joined: Sat Dec 08, 2012 12:32 pm

Re: love-android-sdl2 (native, 0.9.2)

Post by Frohman »

I~=Spam wrote:
Frohman wrote:Edit:
Hadn't occurred to me that you'd likely do this in the packaging step, so for basic testing with .love's and main.lua's, should I rebuild the apk myself with the orientation specified?
Yeah I think that is how you have to do it... Seems silly to have to rebuild the entire apk for just that but I think that is the only way unless something hackish can be done instead... :\
Well, I can't rightly think of a reason why you'd need to force-change orientation settings mid execution, especially for a game etc, which leaves just inconveniencing testing. I suppose one could compile a couple of apk's to run in different modes, so you're not locked in while testing.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: love-android-sdl2 (native, 0.9.2)

Post by Nixola »

Letting the user decide the desired orientation seems like a good reason to me
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Fang
Prole
Posts: 9
Joined: Sat Apr 13, 2013 4:31 pm
Contact:

Re: love-android-sdl2 (native, 0.9.2)

Post by Fang »

Quick question, is the love.thread module supported? Haven't found any specific mention of it so I'd assume it is.
EDIT: Had the time to run a quick test. It's supported.
~palfun-foslup
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: love-android-sdl2 (native, 0.9.2)

Post by Positive07 »

Nixola wrote:Letting the user decide the desired orientation seems like a good reason to me
Use a camera library, like gamera, then just turn your screen 90 degrees, also I have made some test and you can use the accelerometer to detect orientation
Attachments
example1.love
(3.65 KiB) Downloaded 2262 times
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
I~=Spam
Party member
Posts: 206
Joined: Fri Dec 14, 2012 11:59 pm

Re: love-android-sdl2 (native, 0.9.2)

Post by I~=Spam »

Positive07 wrote:
Nixola wrote:Letting the user decide the desired orientation seems like a good reason to me
Use a camera library, like gamera, then just turn your screen 90 degrees, also I have made some test and you can use the accelerometer to detect orientation
I suppose that works too. Although, I am pretty sure that there is a speed penalty for that though...
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: love-android-sdl2 (native, 0.9.2)

Post by Positive07 »

I~=Spam wrote:I am pretty sure that there is a speed penalty for that though...
Actually it is two love.graphics.translate and one love.graphics.rotate... so really no impact!
Of course if you use a full fledged camera library you may have more of an impact, but I recommended that because you can use it for the game AND the screen, if you just need the screen, maybe something simpler will do (also take into account that then you have to also adapt the x,y coordinates of the mouth to be correct, gamera already handles this I think, not sure)
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

Re: love-android-sdl2 (native, 0.9.0)

Post by TurtleP »

slime wrote:It shouldn't translate the game window if you give setTextInput x/y/w/h arguments that would be completely visible on-screen even with the keyboard visible as well.
Sorry for the late reply on this, but I've tried it just now and it still translates the window.

Code:

https://love2d.org/imgmirrur/G5o3E5R.png

In-Game:

https://love2d.org/imgmirrur/ynF3ubG.png
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: love-android-sdl2 (native, 0.9.0)

Post by Positive07 »

TurtleP wrote:-snip-
There it says 242*scale in the y argument, so it is translating your game screen 242*scale pixels up...
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

Re: love-android-sdl2 (native, 0.9.0)

Post by TurtleP »

Positive07 wrote:
TurtleP wrote:-snip-
There it says 242*scale in the y argument, so it is translating your game screen 242*scale pixels up...
Thanks, I must have read the documentation wrong or something.
Locked

Who is online

Users browsing this forum: No registered users and 2 guests