Android Port

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
ellis2323
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

Android Port

Post by ellis2323 »

Updated 28 september 2010
Hello, i'm trying to port Irrlicht on Android with the NDK r4b... I use the svn ogl-es branch.

Working:
- GUI
- Most examples

Not implemented: advanced material


I'm searching testers (or coders) for the provided apk.
It is reported that the demo apk is working:
- HTC G1 and Hero
- HTC Desire, Nexus One, Evo 4G, HTC Incredible
- Galaxy Spica (poor performance), Galaxy S
- Archos Gen8 tablets

Code is available on gitorious: Android Irrlicht..

http://gitorious.org/irrlichtandroid/

To test code:
- connect your device with USB cable (real device recommanded)
- install the NDK r4b
- go in android-ndk-r4b/sources/
- get the git repository with

Code: Select all

git clone git@gitorious.org:irrlichtandroid/irrlichtandroid.git

- go in irrlichtandroid/project and compile c++ sources with:

Code: Select all

../../../ndk-build
- compile java part, create the package and install on device:

Code: Select all

ant install
- please put sydney.md2 and sydney.bmp in /sdcard/Irrlicht

When you have problems:
- ndk-build clean: ndk-build have dependency problems (touch IVideoDriver.h and see no rebuild)
- adb logcat: read logs
- use -g in CFLAGS to have debug informations

Others:
- ndk-gdb is not working because of multi-thread
- many android phones have bad drivers. Andreno (GPU of Snapdragon) or PowerVR 5XX have good drivers
- When program is paused, OpenGL context is lost. Please reload all OpenGL status (textures, blending, depth test...)
- Please minimize opengl calls to have good performance. The key is batching.

To test demo apk:
download sydney.md2 et sydney.bmp and put these files in the Irrlicht/ directory of your sdcard.
download and launch the apk.
http://www.scigems.org/downloads/[/b]
Last edited by ellis2323 on Mon Sep 27, 2010 11:13 pm, edited 4 times in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Did you change anything in the Irrlicht sources? Do you use X11 window, or is there some other windoing mechanism?
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

YES! I was waiting for something like this, thank you! Hope the realease soon
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Post by pera »

Hi, nice project.

I tried installing you application on G1 and Hero, but your MinSDK is set to 4 (1.6) and I have 1.5 installed on these two devices. Maybe you can set MinSDK to 3, since there is no much difference between 3 and 4.

I managed to install it on Motorola Milestone that is running Android 2.0
However, when I run it, I see Sidney stiff (not animated) and it moves away from camera rapidly until it becomes very small.... is that expected behavior? :)
EDIT: When app is run again, Sydney is still in the distance and moving away! I had to reinstall to see it again close.

I will try to build it from NDK later. I looked at the Java code, just initializing renderer, how do you plan to organize JNI layer? Are you going to provide full irrlicht API through JNI, so the Android programmer could write CreateDevice in Java, or...?

What did you have to change in irrlicht?
ellis2323
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

Apk for version Adnroid 1.5

Post by ellis2323 »

I have uploaded a new apk for Android 1.5.
ellis2323
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

behaviour expected

Post by ellis2323 »

Hi Pera,

all you see is normal... you must see only sydney without animation. I have ported the helloworld tutorial.

I will try to load a quake 3 level this evening.
ellis2323
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

Quake 3 map available

Post by ellis2323 »

i have added a new test:
- please install the quake3 map on /sdcard (root of your sdcard)
- install the irrlicht-quake3 apk

The framerate seems ok on Nexus One. On My poor G1, it is only 5fps
drphrozen
Posts: 1
Joined: Tue Feb 09, 2010 6:38 am

Post by drphrozen »

Seems to work on HTC Hero, a bit laggy but could not find the framerate. Also i had trouble compiling the example myself, everything seems to compile ok, but dies with a SEGV when deployed.. Also the trunk seems to be for 1.6 and above, but the Quake 3 demo worlds on my Hero (1.5), is this demos released?
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Post by pera »

I use to get segv when proper media was not on SD card root and SD card available.
ellis2323
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

I use NDK 1.6

Post by ellis2323 »

I use NDK 1.6 which is compatible with Android 1.5. My G1 is on Android 1.6 so i can't test correctly on 1.5.
For theses tests apk, there is no validation code so if you don't put correctly data in /sdcard, it crashes.

Ps: emulator doesn't work
zet.dp.ua
Posts: 66
Joined: Sat Jul 07, 2007 8:10 am

Post by zet.dp.ua »

Great work!
Sydney model works as expected on my samsung i5700 (android 1.5).
ellis2323
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

Java API for Irrlicht

Post by ellis2323 »

I suppose that i will use swig to generate java stub to pilot Irrlicht API.
zet.dp.ua
Posts: 66
Joined: Sat Jul 07, 2007 8:10 am

Re: Java API for Irrlicht

Post by zet.dp.ua »

ellis2323 wrote:I suppose that i will use swig to generate java stub to pilot Irrlicht API.
JNI calls can possibly kill performance at all.
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Re: Java API for Irrlicht

Post by pera »

zet.dp.ua wrote:
ellis2323 wrote:I suppose that i will use swig to generate java stub to pilot Irrlicht API.
JNI calls can possibly kill performance at all.
any other idea>?
zet.dp.ua
Posts: 66
Joined: Sat Jul 07, 2007 8:10 am

Post by zet.dp.ua »

Write the game using c++ and use java layer only for handling system related operations (input, sensors, io, ...)
Post Reply