Page 2 of 3
Re: help on standalone game
Posted: Thu Nov 15, 2012 3:17 pm
by T-Bone
If you want to do anything serious with it, you probably want to compile it yourself, if only to be able to tweak the Android Manifest to fit you game by for example forcing the orientation you want for your game (probably landscape).
Re: help on standalone game
Posted: Thu Nov 15, 2012 3:29 pm
by utunnels
Yeah, it seems the android port supports dynamic orientation change. Though I need to configure my phone to enable that.
And perhaps you also need to disable screen lock otherwise it turns black every few seconds if you don't touch a thing.
Re: help on standalone game
Posted: Thu Nov 15, 2012 3:47 pm
by dudeabot
here are the configs i have been using for my games:
Code: Select all
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
since i dont want screen rotation is fine for me.
Re: help on standalone game
Posted: Thu Nov 15, 2012 4:13 pm
by Petunien
Here are the steps I've done:
1) Import love-native-android-master into Eclipse Juno.
2) Fix the "Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead."-error.
3) Inserted my game, modified LoveNative.java and AndroidManifest.xml.
4) Now, on building, I get only "Errors during build", no more information.
Did I forget something, what was wrong?
Re: help on standalone game
Posted: Thu Nov 15, 2012 5:41 pm
by dudeabot
well i got a lot of errors trying to compile , but most of them is because eclipse was just being plain dumb..
first you might want to get ride of the ndk-builder(if you already have the native libs thats it, inside libs folder), right click on the project then go to the builders option, and remove ndk-build.
delete folders bin and gen - these are dynamically created, then choose Prokect->clean then, "refresh" the project [right->click refresh]
if the error still persists, close and open the project.
yuo might want check what android ndk version you have, i only had the newer so i changed local.properties file (root directory) to android=15. If you download full sdk you wont have any problems..
If there are still errors, check problems tab, and copy paste them here.
[]'s
Re: help on standalone game
Posted: Tue Nov 27, 2012 8:39 pm
by Moe
dudeabot wrote:meanwhile i found this hack that doenst require messing with NDK code, only java:
http://stackoverflow.com/questions/4447 ... -to-sdcard
the idea is to copy the .love game to assets folder then use that code to copy to sdcard and pass its location to JNI. the obvious fallback is that requires sdcard, also duplicates the game in memory..
Cool!
We had the same idea, but we did not like of doubling the love file. You can also copy it to the internal application memory. But this is more a hack than the way we want to go. Maybe we should skip the love file and put the data to a subfolder called love within the apk... I need to try this one.
The main problem is that PhysFS does not support recursive data like love within apk....
Re: help on standalone game
Posted: Sat Dec 01, 2012 11:47 pm
by hagish
I found a way to start an apk bundled game without extra copies. Putting an extracted love file into the assets/ folder, a modified startup code and a small hack in the filesystem modul did the job (branch filesystem).
I only need to cleanup and extend love so that it is possible to set a root path within a love file. I'm planning to finnish this tomorrow.
Re: help on standalone game
Posted: Sun Dec 02, 2012 12:29 pm
by dudeabot
cool i did some hacks on the file system, where PHYSfs coUld find the love file but the system would not kick in, i think i lacked some knowledge of love internals
gla y ou got it working!
Re: help on standalone game
Posted: Mon Dec 03, 2012 1:34 pm
by T-Bone
hagish wrote:I found a way to start an apk bundled game without extra copies. Putting an extracted love file into the assets/ folder, a modified startup code and a small hack in the filesystem modul did the job (branch filesystem).
I only need to cleanup and extend love so that it is possible to set a root path within a love file. I'm planning to finnish this tomorrow.
This is awesomesauce. If only I had some more time on my hands, I'd release a LÖVE game on Play just to show that it can be done
Re: help on standalone game
Posted: Mon Dec 03, 2012 3:26 pm
by hagish
I'm still working on this. But the good solution turned out to be more complicated than expected
I ended up adding a new archive to physfs (apk files that are chrooted into the assets/ folder) because all other solutions where incredibly ugly. Code is done but does not work %). So next step is debugging.