love-android-sdl2 (native, 0.9.2)

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

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

Post by Nixola » Thu Apr 16, 2015 6:09 pm

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 » Thu Apr 16, 2015 8:08 pm

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: 1935
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Post by Nixola » Fri Apr 17, 2015 7:26 pm

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

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

Post by Fang » Fri Apr 17, 2015 8:58 pm

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.
~ Fang

User avatar
Positive07
Party member
Posts: 999
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

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

Post by Positive07 » Wed May 13, 2015 7:28 pm

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 103 times
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(Github.com/Positive07)

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 » Thu May 14, 2015 3:29 am

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: 999
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

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

Post by Positive07 » Fri May 15, 2015 4:07 am

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/Positive07)

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 » Tue May 26, 2015 1:23 am

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:

http://i.imgur.com/G5o3E5R.png

In-Game:

http://i.imgur.com/ynF3ubG.png

User avatar
Positive07
Party member
Posts: 999
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

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

Post by Positive07 » Tue May 26, 2015 7:09 pm

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/Positive07)

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 » Tue May 26, 2015 11:07 pm

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 1 guest