Posted: 7th Nov 2011 17:01
Hi all,

The player of Android is out and is working well on my 2.5 gingerbread HTC desire S.

I am wondering however is there a AppGameKit guide available to compile the app/game for Android since I saw Snake Snacker at the android market.

Example:
-compiling and packaging a .apk guide

If not when will there be a way to do this? I am starting development for Android games now but want a rough estimation when I can publish

Thanks in advance, all comments are welcome!
Posted: 11th Nov 2011 23:58
Yes this will be included for the forthcoming 106 build and is currently been finalised and in the process of being tested. The T1 Android development is as painless as many of the other platforms, but the guide to set-up your own Android development system is quite lengthy. I can see why there are lots of frustrated Android developers out there. So many hoops!
Posted: 12th Nov 2011 14:57
Seems like we will need a lengthy youtube video of how to set up the android dev system then!
Posted: 21st Nov 2011 14:35
I've downloaded and installed the 106 build and I'm struggling to find the instructions for taking a T1 project and building it for Android?

Am I not seeing the forest for the trees or is the guide missing?
Posted: 21st Nov 2011 16:20
To compile the tier 1 interpreter app open cygwin and browse to the android interpreter directory (cygwin is case sensitive and does not allow spaces in your project path), for example in my enironment that would be 'cd "/cygdrive/c/android/AGK/IDE/apps/interpreter_android" then try to compile the interpreter with the path to the NDK installation e.g. "/cygdrive/c/android/android-ndk-r6b/ndk-build 2> log.txt" errors will be put in log.txt in the interpreter_android folder. This compiles all the C++ code into the native library that will be the main part of the Android application.

I dont understand this. How I compile with Cygwin, some command or what?

Everything before this went fine, though I dont understand why Android-sdk has to be so complicated.
Posted: 21st Nov 2011 18:01
Mobiius, it's in the help system, under "Guides"

my local AppGameKit installation path to the file:

C:\Program Files (x86)\The Game Creators\AGK\IDE\Help\guides\33_android.htm
Posted: 21st Nov 2011 19:36
Cheers, I'll check it out later.
Posted: 23rd Nov 2011 23:41
I dont understand this. How I compile with Cygwin, some command or what?


+ Code Snippet
/cygdrive/c/android/android-ndk-r6b/ndk-build 2> log.txt


is the command that compiles the code, you just type all of that out on the command line and hit enter (modified to point to your "android-ndk-r6" install directory of course).

In cygwin paths to items on your hard disk start with /cygdrive/ then follow the normal windows path but with forward slashes instead of back slashes. Also ndk doesn't like spaces in paths.
Posted: 24th Nov 2011 7:09
Check out this guide...

http://mobilepearls.com/labs/ndk-builder-in-eclipse/
Posted: 24th Nov 2011 7:35
Since r6b is hard to find, and r7 is not, you need the following command, if you installed r7:

+ Code Snippet
/cygdrive/c/android/android-ndk-r7/ndk-build > log.txt
Posted: 24th Nov 2011 10:22
how do you compile a Android game? I met many problems.
Posted: 26th Nov 2011 0:30
Thanks Paul, but:

After typing: "/cygdrive/c/android/AGK/IDE/templates/template_android"

-bash: /cygdrive/c/android/AGK/IDE/templates/template_android: is a directory

And when I type: "/cygdrive/c/android/android-ndk-r7/build 2> log.txt"

Android SDK: Could not find application project directory !
Android SDK: Please define the NDK_PRJECT_PATH variable to point it.


Not right, i presume?
Posted: 26th Nov 2011 4:18
The first line is the browsing to the project directory so needs a "cd" in front of it like so "cd /cygdrive/c/android/AGK/IDE/templates/template_android"

The second line is a command and is correct, it just needs to be run from the right directory.
Posted: 26th Nov 2011 13:37
Ah, thanks a lot, got it now.

It's been too long since I've used any command prompt I see.
Posted: 26th Nov 2011 14:35
I've completed the AGK's guide, but I still have no idea how to compile my own tier 1 project into .apk.

Is it coming later in AGK's update?

Sorry for being noobish, it's DBPro's fault, it's so easy!
Posted: 28th Nov 2011 19:05
Once you are able to compile the existing code into an apk (which is saved in the "bin" folder), you can add you bytecode to it using the instructions on publishing which will make an apk containing your tier 1 bytecode.
Posted: 28th Nov 2011 22:38
hi, in tier 2 android how can resources (pics n sounds) be added to the project , i can`t seem to do it in eclipse .

also do they get compiled into the apk ?


thanks chunks.
Posted: 28th Nov 2011 23:37
Make a directory called ASSETS in your android_template project file (or whatever you named your project dir). Put all your sound and pics in there.

In Eclipse press F5 to refresh.

Your media will be bundled into the apk.
Posted: 29th Nov 2011 0:29
Thank you i will try it now

EDIT:

Do you have to add the assets folder to the string when you load the pics eg (agk::LoadImage("assets/red.png")) or just eg (agk::LoadImage("red.png"))

thanks chunks
Posted: 29th Nov 2011 1:04
Just agk::LoadImage("red.png")