Page 1 of 8
love-java-android/love-native-android: project information
Posted: Thu Nov 17, 2011 9:55 pm
by hagish
Goal:
Getting Löve2D to work on android phones.
There are 2 version right now (native/non-native).
löve2d source port to android - love-native-android
Port of the Love2D source to android using ndk.
Repository:
https://github.com/hagish/love-native-android
Download:
http://www.brightidea.eu/games/love-native-android.apk -
if unsure download this
Current state:
love 0.7.2 works in many parts but there are still some major issues (like filesystem...).
löve2d api reimplementation in java - love-java-android (deprecated)
Port of the Love2D api to Android using LuaJ and OpenGLES
* old and not actively being developed anymore
* love.phone api for multitouch and sensors
Repository:
https://github.com/hagish/love-android
License:
same as löve
Current state:
working prototype
More informations:
http://ghoulsblade.schattenkind.net/wik ... 2d-android
Download:
http://ghoulsblade.schattenkind.net/lov ... ndroid.apk
If you want to try it, just place an unzipped game or a .love file onto the sd card ( /mnt/sdcard/love is the path apk searches for games )
Video:
Re: love-android: project information
Posted: Thu Nov 17, 2011 10:23 pm
by KaanErturk
Nice one.
Re: love-android: project information
Posted: Thu Nov 17, 2011 10:36 pm
by Taehl
I want to see this go places! I wish you the very best of luck!
Re: love-android: project information
Posted: Thu Nov 17, 2011 10:46 pm
by Jasoco
Wow. What kind of performance do you get? And how does it deal with different resolution devices?
Re: love-android: project information
Posted: Thu Nov 17, 2011 11:11 pm
by ghoulsblade
performance depens on device, but good enough for small games it seems =)
there's prolly still lots of room left to optimize, but that's not a priority right now, still a lot of the api is missing.
resolution : by default it rescales/squashes the default or requested resolution into the phone screen,
this is to be able to test unmodified .love files that are not aware of phone stuff.
if you're making a game that is aware of phone stuff,
you can add t.android_native_screen = true to conf.lua to disable this rescaling,
and use love.graphics.getWidth() and getHeight() to get the current resolution, which currently changes depending depending on how you hold the device.
( i'm trying to figure out how to disable this nice but annoying feature atm
)
we could also add a orientation-change notification-callback to the love.phone.* custom api if there's interest for that.
Re: love-android: project information
Posted: Fri Nov 18, 2011 1:55 am
by Jasoco
I really want to test this on my bottom of the line Android phone. Is there a sample project I can try rather than this one which might be a bit too much? Time to do some research.
Edit: Okay.. well it's running. But it won't recognize the sample project I put in the folder it expects:
Code: Select all
function love.load()
x = 0
end
function love.update()
x = x + dt * 100
if x > 300 then x = 0 end
end
function love.draw()
love.graphics.circle("fill", x, 100, 30)
end
I'm not sure what I'm doing wrong. I get the blue screen with the logo and the titlebar but I can't load any projects?
Re: love-android: project information
Posted: Fri Nov 18, 2011 2:28 am
by ghoulsblade
the project must be in your downloads folder or in the sdcard/love/ folder
you might need to create the love folder on your sd card, and copy the .love files there, e.g. sdcard/love/mygame.love
much of the api isn't implemented yet, including love.graphics.circle
try drawing images, that should work
try the demos on the love2d.org main website first :
https://bitbucket.org/rude/love/downloads/demos.zip
a bunch of them still have issues (like particle system, physics and fonts), but at least the clouds demo should work well.
also worth a try, even if it still has font problems (damn power-of-2 image size)
http://love2d.org/wiki/In_Your_Face_City_Trains
http://github.com/downloads/SimonLarsen ... iyfct.love
Re: love-android: project information
Posted: Fri Nov 18, 2011 2:42 am
by Jasoco
Well that's misleading because I put it in a folder called love inside a folder called sdcard inside a folder called mnt.
Now I moved the LOVE folder to the root of the SDCARD and it works... well, it shows it.
I'm not getting a circle on the screen though. Gonna check out the samples.
Re: love-android: project information
Posted: Fri Nov 18, 2011 2:44 am
by ghoulsblade
i updated the apk, now it shows info including full file paths if no games are found =)
Re: love-android: project information
Posted: Fri Nov 18, 2011 2:54 am
by Jasoco
Well, the sample projects do semi work.
Passing clouds works the best.
Lovalanch doesn't work at all. (No Box2d yet?)
Particles also has no particles.
Sinescroller has no font, but it works fine. Slower than the computer and no audio, but it sines.
And NO works pretty well. Audio works great. But it's slow on switching screens and not responsive much.
But hell, it works!
Now to try and make my own working project to show my friend at work. He wants to look into programming and I suggested Löve and told him about Mari0 being programmed in Löve. To show him something I made myself and that he could get to work on his own Android (I'd be curious to watch something I made on both devices and how different they are. Mine is a low-end Android, his is the mid-end version of the same model and much better so...)
Next, let's get this on iOS so I can do the same thing on my iPad.
OH, by the way. You should look into implementing DropBox support so we can keep projects there and edit them from our computer and not have to keep switching between USB Disk mode and Phone mode or swapping SD cards.