Become a fan of Slashdot on Facebook


Forgot your password?
Slashdot Deals: Cyber Monday Sale! Courses ranging from coding to project management - all eLearning deals 25% off with coupon code "CYBERMONDAY25". ×
First Person Shooters (Games) Cellphones Portables (Games) Games

Quake 3 For Android 137

An anonymous reader writes "Over the last two months I ported Quake 3 to Android as a hobby project. It only took a few days to get the game working. More time was spent on tweaking the game experience. Right now the game runs at 25fps on a Motorola Milestone/Droid. 'Normally when you compile C/C++ code using the Android NDK, the compiler targets a generic ARMv5 CPU which uses software floating-point. Without any optimizations and audio Quake 3 runs at 22fps. Since Quake 3 uses a lot of floating-point calculations, I tried a better C-compiler (GCC 4.4.0 from Android GIT) which supports modern CPUs and Neon SIMD instructions. Quake 3 optimized for Cortex-A8 with Neon is about 15% faster without audio and 35% with audio compared to the generic ARMv5 build. Most likely the performance improvement compared to the ARMv5 build is not that big because the system libraries of the Milestone have been compiled with FPU support, so sin/cos/log/.. take advantage of the FPU.''
This discussion has been archived. No new comments can be posted.

Quake 3 For Android

Comments Filter:
  • Hmmm. (Score:5, Informative)

    by Anonymous Coward on Thursday February 25, 2010 @03:04AM (#31269600)

    Dunno why TFA didn't include it, but there is video [].

  • by pipatron (966506) <> on Thursday February 25, 2010 @03:09AM (#31269624) Homepage
    Hm? Quake 3 has been available for my Nokia since 2007 or 2008 or something.
  • Re:Running Demos (Score:3, Informative)

    by Time Doctor (79352) <> on Thursday February 25, 2010 @03:27AM (#31269690) Homepage Journal

    demos recorded on any 1.32 should work with ioquake3, you may need to run them with the demo command manually. I can't verify that they'll work or not with this android fork.

  • Just another note: (Score:1, Informative)

    by Anonymous Coward on Thursday February 25, 2010 @03:49AM (#31269808)

    In the story it doesn't say that it runs the best on the Phone it's developed: The Milestone/Droid.
    Also it doesn't say that it does not run on android 1.5 and that it again runs the best on android 2.0 and upwards.

  • Re:Not impressed (Score:4, Informative)

    by Anonymous Coward on Thursday February 25, 2010 @04:11AM (#31269900)

    If that is "Unreal 3", then it's a very, very stripped down version. It doesn't even look like it has pixel shaders, which removes all benefit to using it over the Quake III engine.

    By the way, the Quake III engine is capable of handling visuals that look better than the screenshots you linked to. Here are a few examples of what the Quake III engine can do. [] [] [] []

  • by kamapuaa (555446) on Thursday February 25, 2010 @04:34AM (#31269974) Homepage
    If you read the article (I know, I know...) this is actually based on the N900 port.
  • by eggz128 (447435) on Thursday February 25, 2010 @04:40AM (#31269988)

    And here's the Symbian s60 port [], released in November 2008. And a video showing accelerometer support [].

  • Re:Hmmm. (Score:4, Informative)

    by ionix5891 (1228718) on Thursday February 25, 2010 @05:07AM (#31270138)

    doesnt work on Nexus One

  • Re:Good job (Score:3, Informative)

    by Holmwood (899130) on Thursday February 25, 2010 @05:15AM (#31270186)

    The Milestone's based on an ARM Cortex A8 running at 600 MHz. It's probably the slowest-clocked of the "new" superphones. (For Americans, it's a Motorola Droid for Europe and Canada with some small software and SKU differences).

    The Dingoo A320, according to the font of all wisdom, Wikipedia, is underclocked to 336MHz.

    Last I looked, ARM seemed to have a definite edge in memory bandwidth, and had instructions aimed at handling media-rich applications much better than MIPS. I could, of course, be out of date on that.

    So at an educated guess, I wouldn't expect your Dingoo to be able to touch a modern superphone. (Maybe at best a quarter of the processing power assuming Neon optimizations?) Of course if the Dingoo's screen is low enough resolution, then that may not matter as much.

  • by Thunderbird2k (1753946) on Thursday February 25, 2010 @05:42AM (#31270308)
    On my project page I mention that Android 1.6 is required since I used the Android 1.6 NDK (previous versions didn't support OpenGL).
  • Re:Wow great job (Score:2, Informative)

    by Thunderbird2k (1753946) on Thursday February 25, 2010 @06:38AM (#31270538)
    The iphone 3gs has one other advantage it uses the PowerVR SGX 535 instead of the 530 which is used in the Milestone and N900. The 535 is about twice as fast.
  • Re:Running Demos (Score:4, Informative)

    by Thunderbird2k (1753946) on Thursday February 25, 2010 @06:51AM (#31270586)
    Demos should run well but from the main menu they don't work for some reason. During development I always ran them from the quake3 console (so 'demo four') and that works fine.
  • by Sasayaki (1096761) on Thursday February 25, 2010 @07:33AM (#31270824)

    I don't know anything about the code either, but I can take a stab.

    The angles aren't actually the problem, the real problem is points on a Cartesian plane (x and y coordinates)... but angles suffer from the same thing that is the real problem. I'll explain as simply as I can (even for experienced programmers and mathematicians, I have found simple to be better, so don't take that the wrong way).

    The exact location of every 3D object in a game is represented by X, Y and Z coordinates. These are currently stored in floating point, so that something can be at x=.5 and be comprehensible to the engine. This means that the object can be almost anywhere without rounding to an integer.

    Your idea is that basically with small enough points, the player would be unable to tell the difference. While it's true that with tiny enough points this may be true, one of the big issues is movement within a 3D world. Essentially, the movement is something like this:

    Your current position is (0,0) facing 0 degrees. You are getting 60 FPS. You press the forward key, moving north.

    New X Coordinate = old_X + time * Sin(angle) = 0 + .3 + 1 microsecond * 0 = 0
    New Y Coordinate = old_Y + time * Cos(angle) = 0 + .3 + 1 microsecond * 1 = 1

    You are now at (0,1), which is as you'd expect. Let's mess things up a bit.

    Your current position is (3, 6) facing 146 degrees. You are getting 34 FPS. You push the forward key, moving at the angle 146.

    New X Coordinate = old_X + time * Sin(angle) = 3 + 0.566666667 * .75011107 = 3.42506294
    New Y Coordinate = old_Y + time * Cos(angle) = 6 + 0.566666667 * 0.661311865 = 5.62525661

    See what's starting to happen here? Floating point representations of coordinates are vital to preserving the object's exact coordinates. If you used ints for these values, you'd be forced to round and lose a lot of precision. That adds up, especially when these calculations are being performed every 34 seconds. The model would 'jitter' and seem to be very slightly spasming, which would look terrible. Unfortunately floating point numbers are required here.

  • Re:Kudos! (Score:4, Informative)

    by jo42 (227475) on Thursday February 25, 2010 @07:36AM (#31270848) Homepage

    Actually, with Xcode and iPhone OS you do not have to jump through all the hoops this guy did. GCC in Xcode generates ARM6 or ARM7, Thumb or non-Thumb code - no futzing with compilers, tools or worrying about taking advantage of the hardware FPU. You can also mix Objective C, C, C++ code and libraries with very little effort - no Java to NDK-level and back calling BS. Stuff like this is easier, NOT harder, on iPhone OS.

  • by Anonymous Coward on Thursday February 25, 2010 @08:46AM (#31271348)

    Floating point is most certainly not required. Choose a suitable coordinate system scale relative to the minimum necessary movement scale to eliminate jitter. Bonus points if you choose a power of 2 scale factor: now some divisions can be replaced with bit shift operations.

  • by Jenny Z (1028212) on Thursday February 25, 2010 @09:49AM (#31272016)

    You can still use integer math to represent fractional values. For example, using the upper 16 bits as the integer part, and the lower sixteen as the fractional part.

        Something like this only implemented with inline assembly:

    Int32 fMult( Int32 a, Int32 b)
          return (Int32) (((Int64) a * (Int64) b)>>32);

    You don't have nearly the dynamic range of floating point, but you *can* implement rotation matrices, vectors, time and distance and physics calculations. You just have to be careful to keep the values in range.

  • You don't know about fixed point math I take it?

  • by idealego (32141) on Thursday February 25, 2010 @12:53PM (#31274686)

    3d games before Quake 1 used integer, fixed-point math and worked just fine (e.g., Doom). The trig was all done using look-up tables. Fixed-point allows you to retain enough of the precision for everything to work smoothly.

    Quake 1 used floating point because they (id) found that with the introduction of the Pentium that floating-point was actually faster for the Quake 1 game engine.

    For modern-day portable devices I wonder if this is still true. I also wonder how well trying to mix fixed-point math and 3d hardware APIs would work. Switching to integers could be done, but it would complicate the code and would likely be slower.

All Finagle Laws may be bypassed by learning the simple art of doing without thinking.