Native C++ game S-Tris2 running on Android!

620 views
Skip to first unread message

edgelib

unread,
Nov 16, 2007, 12:10:44 PM11/16/07
to Android Developers
Hi fellow Android developers!

We managed to run a couple of our native C++ applications on the
Android emulator. We started porting our EDGELIB mobile engine (http://
www.edgelib.com) yesterday and this is the result so far.

Find a screenshot of the game running in the emulator here:
http://www.edgelib.com/download/android/S-Tris2.png
Download the binary here: http://www.edgelib.com/download/android/S-Tris2.zip
Find installation instructions below this post.

As you can see, our application still has some problems. The most
important is that the input and display isn't used exclusively. This
causes conflicts with the existing processes and makes the display
flicker.

We would like to create a java-based launcher that runs the
executable. We would like to know if it's possible to run an
executable, and if this will have exclusive access to the input and
display hardware until the application is quit. Also, we would like to
be notified of events when the application needs to be paused/
minimized (for example, when a phonecall comes in).

Is it possible to have access to the window server (or something
similar), so we know where we can draw and get notifications?

We also have our Animate3D demo running on Android:
Screenshot: http://www.edgelib.com/download/android/animate3d.png
Binary: http://www.edgelib.com/download/android/animate3d.zip


=======
Installation instructions

How to install and run the S-Tris2 sample in the Android emulator (on
a Windows machine):
- We assume the Android SDK is unpacked and ready to use
- Go to your android installation directory and open the tools
directory
- This directory should contain several executables, including
emulator.exe, the Android Emulator
- Unzip the files in S-Tris2.zip into the tools directory containing
the emulator. It contains an executable and a resource directory
containing a couple of resource files
- Open a command (DOS) prompt and change to the directory containing
the emulator
- Start the emulator with console support with this command: emulator -
console
- The emulator will start, please wait until it is ready for use
(leave the command prompt open)
- Open a new command prompt window and go to the emulator directory
again
- Upload the executable and resource files using these commands:
adb push S-Tris2 /system/sbin/S-Tris2
adb shell mkdir /system/sbin/res
adb push res\bgm.epk /system/sbin/res/bgm.epk
adb push res\sfx.epk /system/sbin/res/sfx.epk
adb push res\games.epk /system/sbin/res/games.epk
adb push res\gfx.epk /system/sbin/res/gfx.epk
- It will mention it has sent 0 bytes, you can ignore this
- Connect with the emulator by using the command: adb shell
- It will show a hash (#) sign, connection is successful
- Go to the installation path with the following command: cd /system/
sbin
- Set permission with the command: chmod 777 S-Tris2
- Start the application with: ./S-Tris2
- Look at the emulator and see the game load and title screen appear
(you may need to push a soft button to update the screen)

Known problems:
- The display isn't used exclusively, the display may flicker. Solve
this by pressing keys
- Input isn't used exclusively, other actions will happen when using
the emulator keys
- No sound support yet

kokuryu

unread,
Nov 16, 2007, 1:22:27 PM11/16/07
to Android Developers
Very cool - I am extremely impressed with this so far.

David Lecomte

unread,
Nov 16, 2007, 1:42:39 PM11/16/07
to Android Developers
You said you ported your engine , I would be interested in how you
linked your game to OpenGL ES ? Or did you port a 2D/3D software
rendering engine ?

David Lecomte

On Nov 16, 9:10 am, edgelib <wou...@elements.nl> wrote:
> Hi fellow Android developers!
>
> We managed to run a couple of our native C++ applications on the
> Android emulator. We started porting our EDGELIB mobile engine (http://www.edgelib.com) yesterday and this is the result so far.

Ali Akbar

unread,
Nov 16, 2007, 1:42:54 PM11/16/07
to Android Developers
gratz! ss looks great. didnt try it tough



On Nov 16, 8:10 pm, edgelib <wou...@elements.nl> wrote:
> Hi fellow Android developers!
>
> We managed to run a couple of our native C++ applications on the
> Android emulator. We started porting our EDGELIB mobile engine (http://www.edgelib.com) yesterday and this is the result so far.

edgelib

unread,
Nov 16, 2007, 1:55:18 PM11/16/07
to Android Developers
Hi David,

We ported our native 3D software renderer. OpenGL ES is one of the
next challenges!

David Lecomte

unread,
Nov 16, 2007, 3:05:48 PM11/16/07
to Android Developers
Ok, let me know if you get any progress on that side.

David
Reply all
Reply to author
Forward
0 new messages