State of the attempt to natively port love to android

A project to port LÖVE to Android handhelds
Locked
Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Re: State of the attempt to natively port love to android

Post by Moe »

I have not yet made any tests with that one. There are only two possibilities: Store the data in the apps folder or on SD-card (or any other external device). All other storage places will require a rooted device. Besides that we should be able to support the full Love-filesystem-API.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: State of the attempt to natively port love to android

Post by T-Bone »

Moe wrote:I have not yet made any tests with that one. There are only two possibilities: Store the data in the apps folder or on SD-card (or any other external device). All other storage places will require a rooted device. Besides that we should be able to support the full Love-filesystem-API.
I think that what you call the "apps folder" is probably the best option. I believe this is what's called an app's "data" by Android, and will be removed if you remove the app, which is preferable, SD-card also has problems with phones that don't have them (although some of them have data partitions called "/sdcard" anyway). Also, if you store it in the app data, it will probably be stored on the SD card anyway with Android's native App2SD functionality which all games should use.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: State of the attempt to natively port love to android

Post by T-Bone »

There hasn't been much activity here on the forums lately. Please just tell me the project isn't dead :) I've got pretty far into making what I seriously think is a great game for Android that I'd love to be able to test on an actual device and sell some day :)
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: State of the attempt to natively port love to android

Post by miko »

T-Bone wrote:There hasn't been much activity here on the forums lately. Please just tell me the project isn't dead :) I've got pretty far into making what I seriously think is a great game for Android that I'd love to be able to test on an actual device and sell some day :)
And I have almost bought an android-based tablet ;) Just waiting to see love2d working on android.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
hagish
Citizen
Posts: 85
Joined: Thu May 01, 2008 12:51 pm
Contact:

Re: State of the attempt to natively port love to android

Post by hagish »

No it is not dead. Due to a job change I didn't have much time the last 2 month but now things settled and it is time to continue with this project.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: State of the attempt to natively port love to android

Post by T-Bone »

hagish wrote:No it is not dead. Due to a job change I didn't have much time the last 2 month but now things settled and it is time to continue with this project.
Great :neko:
Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Re: State of the attempt to natively port love to android

Post by Moe »

T-Bone wrote:There hasn't been much activity here on the forums lately. Please just tell me the project isn't dead :) I've got pretty far into making what I seriously think is a great game for Android that I'd love to be able to test on an actual device and sell some day :)
So take the native port, test your game, and make bug reports. :)
Coincidental, I will also start a new job soon, and that was a time killer, too. Hopefully I will have more time for the port in the next weeks, too.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: State of the attempt to natively port love to android

Post by T-Bone »

Moe wrote:
T-Bone wrote:There hasn't been much activity here on the forums lately. Please just tell me the project isn't dead :) I've got pretty far into making what I seriously think is a great game for Android that I'd love to be able to test on an actual device and sell some day :)
So take the native port, test your game, and make bug reports. :)
Coincidental, I will also start a new job soon, and that was a time killer, too. Hopefully I will have more time for the port in the next weeks, too.
I didn't know the native port was ready enough for that. I will totally do! Are there any instructions for how to do that? I know I need Eclipse with the Android SDK as well as love-android's source code, but how do I do the import? What should I change to get it to run my game?

EDIT: I just went ahead and tried to import it into Eclipse. I manage to install it in the emulator, but I doubt it worked bacause the emulator claims the entire app love-native-android is 24,00 KB large, and crashes instantly if you try to run it. I get the following error message:

Code: Select all

03-09 11:52:00.417: D/dalvikvm(780): Not late-enabling CheckJNI (already on)
03-09 11:52:00.557: I/dalvikvm(780): Turning on JNI app bug workarounds for target SDK version 7...
03-09 11:52:01.377: D/libEGL(780): Emulator without GPU support detected. Fallback to software renderer.
03-09 11:52:01.377: D/libEGL(780): loaded /system/lib/egl/libGLES_android.so
03-09 11:52:01.427: D/gralloc_goldfish(780): Emulator without GPU emulation detected.
03-09 11:52:01.457: I/System.out(780): java: init
03-09 11:52:01.457: W/dalvikvm(780): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lnet/schattenkind/nativelove/LoveJNI;
03-09 11:52:01.467: W/dalvikvm(780): threadid=11: thread exiting with uncaught exception (group=0x409c01f8)
03-09 11:52:01.467: E/AndroidRuntime(780): FATAL EXCEPTION: GLThread 93
03-09 11:52:01.467: E/AndroidRuntime(780): java.lang.ExceptionInInitializerError
03-09 11:52:01.467: E/AndroidRuntime(780): 	at net.schattenkind.nativelove.LoveRenderView$1.onSurfaceChanged(LoveRenderView.java:25)
03-09 11:52:01.467: E/AndroidRuntime(780): 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1455)
03-09 11:52:01.467: E/AndroidRuntime(780): 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
03-09 11:52:01.467: E/AndroidRuntime(780): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load ogg: findLibrary returned null
03-09 11:52:01.467: E/AndroidRuntime(780): 	at java.lang.Runtime.loadLibrary(Runtime.java:365)
03-09 11:52:01.467: E/AndroidRuntime(780): 	at java.lang.System.loadLibrary(System.java:535)
03-09 11:52:01.467: E/AndroidRuntime(780): 	at net.schattenkind.nativelove.LoveJNI.<clinit>(LoveJNI.java:7)
03-09 11:52:01.467: E/AndroidRuntime(780): 	... 3 more
03-09 11:52:02.567: I/dalvikvm(780): Rejecting re-init on previously-failed class Lnet/schattenkind/nativelove/LoveJNI; v=0x0
03-09 11:52:16.867: D/libEGL(800): Emulator without GPU support detected. Fallback to software renderer.
03-09 11:52:16.877: D/libEGL(800): loaded /system/lib/egl/libGLES_android.so
03-09 11:52:16.897: D/gralloc_goldfish(800): Emulator without GPU emulation detected.
03-09 11:52:16.917: I/System.out(800): java: init
03-09 11:52:16.917: W/dalvikvm(800): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lnet/schattenkind/nativelove/LoveJNI;
03-09 11:52:16.917: W/dalvikvm(800): threadid=11: thread exiting with uncaught exception (group=0x409c01f8)
03-09 11:52:16.917: E/AndroidRuntime(800): FATAL EXCEPTION: GLThread 96
03-09 11:52:16.917: E/AndroidRuntime(800): java.lang.ExceptionInInitializerError
03-09 11:52:16.917: E/AndroidRuntime(800): 	at net.schattenkind.nativelove.LoveRenderView$1.onSurfaceChanged(LoveRenderView.java:25)
03-09 11:52:16.917: E/AndroidRuntime(800): 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1455)
03-09 11:52:16.917: E/AndroidRuntime(800): 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
03-09 11:52:16.917: E/AndroidRuntime(800): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load ogg: findLibrary returned null
03-09 11:52:16.917: E/AndroidRuntime(800): 	at java.lang.Runtime.loadLibrary(Runtime.java:365)
03-09 11:52:16.917: E/AndroidRuntime(800): 	at java.lang.System.loadLibrary(System.java:535)
03-09 11:52:16.917: E/AndroidRuntime(800): 	at net.schattenkind.nativelove.LoveJNI.<clinit>(LoveJNI.java:7)
03-09 11:52:16.917: E/AndroidRuntime(800): 	... 3 more

Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Re: State of the attempt to natively port love to android

Post by Moe »

The SDK is not enough, you will also need the NDK. So get it and install it (your error message complains, that a library is missing - and it is only compiled if the NDK is available).
But before you can compile, you have to change the game file. Open jni/love.cpp and search for

Code: Select all

	argv[1] = new char[strlen("/mnt/sdcard/love/no.love")+1];
	strcpy(argv[1], "/mnt/sdcard/love/no.love");
Change the file name and path to the location of your file.
Open "Project"->"Properties"->"Builders", select "ndk-build" and click "Edit...". Change the path at "Location:" to the place of the NDK's script "ndk-build". Save the settings and launch the application. It might take a while, the NDK will compile a large set of libraries :cool:

If you have a real Android device somewhere around, you should use it. It is much more fun than the emulator :)
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: State of the attempt to natively port love to android

Post by T-Bone »

Moe wrote:The SDK is not enough, you will also need the NDK. So get it and install it (your error message complains, that a library is missing - and it is only compiled if the NDK is available).
But before you can compile, you have to change the game file. Open jni/love.cpp and search for

Code: Select all

	argv[1] = new char[strlen("/mnt/sdcard/love/no.love")+1];
	strcpy(argv[1], "/mnt/sdcard/love/no.love");
Change the file name and path to the location of your file.
Open "Project"->"Properties"->"Builders", select "ndk-build" and click "Edit...". Change the path at "Location:" to the place of the NDK's script "ndk-build". Save the settings and launch the application. It might take a while, the NDK will compile a large set of libraries :cool:

If you have a real Android device somewhere around, you should use it. It is much more fun than the emulator :)
Thanks a lot, will try first thing tomorrow. I will try both in emulator and on my good ol' HTC Desire.

Just wondering, is it possible to run the .love-file from within the actual app or does it have to be on the sd-card?

This is awesome :neko: Love your work guys!
Locked

Who is online

Users browsing this forum: No registered users and 2 guests