love-android-sdl2 (native, 0.9.2)

A project to port LÖVE to Android handhelds
Locked
User avatar
Ratchet
Citizen
Posts: 67
Joined: Mon Apr 08, 2013 10:32 am

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

Post by Ratchet »

Just stared my game on my Android tablet and everything runs fine! That's so damn cool!
Thank you so much.You did a great job. I will release my next game on Android, too ;)
macOS 10.14 Mojave | LÖVE 11.2
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

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

Post by alberto_lara »

Just to notify, some wiki links don't work:
https://www.dropbox.com/s/sbcdt2v8swbrrbu/ss.png
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

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

Post by josefnpat »

alberto_lara wrote:Just to notify, some wiki links don't work:
https://www.dropbox.com/s/sbcdt2v8swbrrbu/ss.png
Could you tell us where the link is instead of the page that it's linking to?
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

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

Post by alberto_lara »

I meant the first 3 links on the wiki section (not really hard to find) but they're fixed now, thanks :)
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 »

I made this test for love-android today, it could make many things possible.
I dont know if it works in every phone but it works in mine (LG Optimus L4 II)
Tell me if it does work on yours.

I wanted to test if I could use the accelerometer to detect whether the phone was on landscape or portrait mode. As I said, this works on my phone but I'm not sure if it works in others.

PS: There is other mode that can be detected, "default" mode (the commented out one). That one is when the phone is lying flat (in a table for example), but it makes the other two modes a little buggy.

PS3: I had some problems while running it in a tablet but couldnt find the error yet. I'll keep trying
Attachments
OrientationFull.love
Orientation detected with Accelerometer
(1.8 KiB) Downloaded 170 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
OttoRobba
Party member
Posts: 104
Joined: Mon Jan 06, 2014 5:02 am
Location: Sao Paulo, Brazil

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

Post by OttoRobba »

This is seriously awesome. :awesome:

Something magical about seeing a game running on a device that is not my own workstation.
User avatar
Mermersk
Party member
Posts: 108
Joined: Tue Dec 20, 2011 3:27 am

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

Post by Mermersk »

Does anybody know how resolution works ? If I set no resolution in config file, will it just readjust to each screen size? I guess what I am asking is: is resolution something I have to think about while developing for android ?
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 »

I use this:

Code: Select all

love.load=function()
	local _, _, flags = love.window.getMode()
	w, h = love.window.getDesktopDimensions(flags.display)
	local success = love.window.setMode( w, h, flags)
	local game={h=768,w=1024}
	scale={h=h/game.h,w=w/game.w}
end
You set your game's height and width and get the height and width of the display (I have already set the window to fullscreen in conf.lua, but I guess this doesn't matter), then you can scale the height and width with scale.h and scale.w. If you dont want to default to fullscreen in other OS you can use love.system.getOS() and use that code just when you are running in "Android"
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
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post by slime »

Mermersk wrote:Does anybody know how resolution works ? If I set no resolution in config file, will it just readjust to each screen size? I guess what I am asking is: is resolution something I have to think about while developing for android ?
If it can't do the resolution you choose (or the default 800x600), then it'll pick the next highest available for the system. If you set 0 for width and height, it'll choose the full size possible.

However, DPI is an issue to be aware of on Android. Two devices might have the same screen size in real life, but one might be twice the resolution of the other - and the user expects content to look "normal" on the one with twice the resolution in the same physical space.

love.window.getPixelScale can help you with that (it's also a feature that will be in the official version of LÖVE 0.9.1.)
User avatar
tio
Citizen
Posts: 61
Joined: Thu Dec 12, 2013 1:04 pm
Location: BR BR?
Contact:

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

Post by tio »

Just downloaded beta2, and couldn't do file association thing (it keeps opening with a text editor app).

Also, it gives me <eof> on a lua file (doesn't happen in LÖVE desktop). Attached .love file.
Attachments
crazy-minecarts.love
(160.23 KiB) Downloaded 130 times
Locked

Who is online

Users browsing this forum: No registered users and 1 guest