GLES Quake: An example of how to use OpenGL ES with the NDK to make a game

245 views
Skip to first unread message

Jack Palevich

unread,
Oct 3, 2009, 12:04:15 PM10/3/09
to android-ndk
I've ported id Software's Quake game to the Android platform.

http://code.google.com/p/glesquake/

The bulk of the game is implemented as a native code shared library.
It's called from a simple Java application shell. It uses the Android
NDK 1.6 to access the OpenGL ES APIs.

Now, before you get excited about playing Quake on Android, there are
some problems:

1) Like most Quake ports, this one comes without the game data file.
You have to obtain and install your own copy of the game data file
pak0.pak.

2) The game controls are hard-coded to the T-Mobile G1 keyboard
layout.

3) There is no sound.

Other than that, it plays a pretty good single-player and multi-player
WiFi LAN network version of the classic glQuake game.


flynux

unread,
Oct 5, 2009, 11:25:51 AM10/5/09
to android-ndk
I have a rooted phone with a JF cupcake version. Couldn't install it!
Do I need to make some sort of update for
NDK applications to work?

Jack Palevich

unread,
Oct 5, 2009, 12:22:32 PM10/5/09
to andro...@googlegroups.com
I don't have any experience with "rooted" phones, but my guess is that the root of the problem is that the GL ES Quake requires Donut. I will update the docs to mention that.

Beowolve

unread,
Oct 6, 2009, 1:47:32 AM10/6/09
to android-ndk
Actually you just need the 1.6 ndk sdk to compile the library. You can
then build the java application with 1.5 as target and it will run
just fine on a 1.5 phone.

By the way, good job Jack.

On 5 Okt., 18:22, Jack Palevich <jack...@google.com> wrote:
> I don't have any experience with "rooted" phones, but my guess is that the
> root of the problem is that the GL ES Quake requires Donut. I will update
> the docs to mention that.
>

Josh

unread,
Oct 6, 2009, 11:02:59 AM10/6/09
to android-ndk
Anyone happen to already compile an APK for 1.5?

Dejan Cecar

unread,
Oct 6, 2009, 4:16:15 PM10/6/09
to andro...@googlegroups.com, android-ndk
is there a way to access the openal audio library natively? or even
through java?
thanks

Sent from my iPhone

Tim Hutt

unread,
Oct 6, 2009, 4:18:32 PM10/6/09
to andro...@googlegroups.com
2009/10/6 Dejan Cecar <dce...@gmail.com>:
>
> Sent from my iPhone

Awesome. :-)

Doug Schaefer

unread,
Oct 6, 2009, 6:23:35 PM10/6/09
to andro...@googlegroups.com
Funny at least, but does bring the point home. If Android is going to be successful competing with iPhone, we're going to need native libraries like OpenAL with OpenGL ES. Right now, with the game engine in native code, I'm not sure how to trigger audio other than the dreadful Java callback, or leaving breadcrumbs for the Java View code to find.

David Turner

unread,
Oct 6, 2009, 7:37:13 PM10/6/09
to andro...@googlegroups.com
I'm pretty sure that OpenAL is not available and will not be. Last time I checked, the plan was to go with Open SL ES instead (a subset, really). No ETA on this though.

Doug Schaefer

unread,
Oct 7, 2009, 1:13:14 AM10/7/09
to andro...@googlegroups.com
Cool, thanks David. That sounds like a good choice too.

Kevin

unread,
Nov 20, 2009, 7:21:53 PM11/20/09
to android-ndk
I am pushing for better audio support in the NDK, see Android Bug
3434.
http://code.google.com/p/android/issues/detail?id=3434

Kevin

Steve

unread,
Nov 21, 2009, 10:03:12 AM11/21/09
to android-ndk
Just wanted to say I need access to an audio API from the NDK side too
- I would be very happy if OpenAL was made available, as currently a
lot of platforms I target use generic OpenAL audio code (Win32, Mac,
iPhone) so it would make my life very easy if I could compile this
code for Android too.

If OpenAL can't be made available, then having another light weight
API that lets me load data in to hardware audio buffers and playing/
mix multiple sounds with basic controls like volume etc. would do the
trick.

Steve

Doug Schaefer

unread,
Nov 21, 2009, 1:27:46 PM11/21/09
to andro...@googlegroups.com
Last I heard they were looking at OpenSL which is more suitable for mobile. Hope it comes soon...


--

You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=.



Alex

unread,
Nov 23, 2009, 1:45:20 PM11/23/09
to android-ndk
That would be good news, alright! Do you have any more detail on that
rumour that you can share? From the point of view of my own projects,
it would make a bi-i-ig difference if there was going to be OpenSL
support at some point in the future.

Alex

On Nov 21, 6:27 pm, Doug Schaefer <cdtd...@gmail.com> wrote:
> Last I heard they were looking at OpenSL which is more suitable for mobile.
> Hope it comes soon...
>
> On Sat, Nov 21, 2009 at 10:03 AM, Steve <rockthesm...@gmail.com> wrote:
> > Just wanted to say I need access to an audio API from the NDK side too
> > - I would be very happy if OpenAL was made available, as currently a
> > lot of platforms I target use generic OpenAL audio code (Win32, Mac,
> > iPhone) so it would make my life very easy if I could compile this
> > code for Android too.
>
> > If OpenAL can't be made available, then having another light weight
> > API that lets me load data in to hardware audio buffers and playing/
> > mix multiple sounds with basic controls like volume etc. would do the
> > trick.
>
> > Steve
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "android-ndk" group.
> > To post to this group, send email to andro...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-ndk...@googlegroups.com<android-ndk%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages