Android Port

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Android Port

Postby ellis2323 » Sun Feb 07, 2010 3:11 pm

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.
ellis2323
 
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

Postby hybrid » Sun Feb 07, 2010 5:57 pm

Did you change anything in the Irrlicht sources? Do you use X11 window, or is there some other windoing mechanism?
hybrid
Admin
 
Posts: 13943
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Postby Kalango » Sun Feb 07, 2010 7:51 pm

YES! I was waiting for something like this, thank you! Hope the realease soon
Kalango
 
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Postby pera » Mon Feb 08, 2010 10:49 am

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?
pera
 
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia

Apk for version Adnroid 1.5

Postby ellis2323 » Mon Feb 08, 2010 3:00 pm

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

behaviour expected

Postby ellis2323 » Mon Feb 08, 2010 5:42 pm

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

Postby ellis2323 » Mon Feb 08, 2010 10:54 pm

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
ellis2323
 
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

Postby drphrozen » Tue Feb 09, 2010 6:42 am

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?
drphrozen
 
Posts: 1
Joined: Tue Feb 09, 2010 6:38 am

Postby pera » Tue Feb 09, 2010 9:39 am

I use to get segv when proper media was not on SD card root and SD card available.
pera
 
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia

I use NDK 1.6

Postby ellis2323 » Tue Feb 09, 2010 9:52 am

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
ellis2323
 
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

Postby zet.dp.ua » Tue Feb 09, 2010 2:14 pm

Great work!
Sydney model works as expected on my samsung i5700 (android 1.5).
zet.dp.ua
 
Posts: 66
Joined: Sat Jul 07, 2007 8:10 am

Java API for Irrlicht

Postby ellis2323 » Wed Feb 10, 2010 11:02 pm

I suppose that i will use swig to generate java stub to pilot Irrlicht API.
ellis2323
 
Posts: 37
Joined: Fri Feb 05, 2010 5:33 pm

Re: Java API for Irrlicht

Postby zet.dp.ua » Thu Feb 11, 2010 1:42 pm

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.
zet.dp.ua
 
Posts: 66
Joined: Sat Jul 07, 2007 8:10 am

Re: Java API for Irrlicht

Postby pera » Thu Feb 11, 2010 3:19 pm

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>?
pera
 
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia

Postby zet.dp.ua » Fri Feb 12, 2010 9:35 am

Write the game using c++ and use java layer only for handling system related operations (input, sensors, io, ...)
zet.dp.ua
 
Posts: 66
Joined: Sat Jul 07, 2007 8:10 am

Next

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest