Forgot your password?
typodupeerror
First Person Shooters (Games) Cellphones Portables (Games) Games

Quake 3 For Android 137

Posted by Soulskill
from the can-i-get-a-hell-yeah dept.
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:
  • by linhares (1241614) on Thursday February 25, 2010 @03:57AM (#31269572)
    Team fortress by any chance? Steal the code, kill people, I can help with whatever task is needed.
    • by BlueTrin (683373)

      ... Steal the code, kill people ...

      I thought you were talking about the action in Team Fortress ...

    • Team Fortress has been running on handhelds for ages, and the source code was open for all except the last few versions, although it didn't need to be because Quake ran it in a bytecode interpreter so it was cross-platform. If you mean TFC or TF2 then you should specify.
    • How about Crisis?
  • I thought by the time we would have Quake 3 on a phone I'd be flying to work in my hover car. Imagine taking a trip back in time a few years and telling your younger self that Quake 3 would be [almost] playable on a cell phone - hopefully you wouldn't reply with a "whats a cell phone?"
    • by pipatron (966506) <pipatron@gmail.com> on Thursday February 25, 2010 @04:09AM (#31269624) Homepage
      Hm? Quake 3 has been available for my Nokia since 2007 or 2008 or something.
    • by mdwh2 (535323)

      I remember seeing smartphones from around 2002 or before. And handheld PDAs existed before that - it was pretty obvious that we'd get Quake 3 after a matter of time, and that it wouldn't be long.

      The reasons against flying cars are to do with laws, liability, and required training, not technology.

    • by Blakey Rat (99501)

      I'd say, "who gives a fuck? Quake 3 sucked. When will Unreal Tournament be available?"

      • by Ascagnel (826800)
        When Epic Games is nice enough to release the source code to the earlier versions of the Unreal Engine. They released the source for the renderer (which people have ported to DX 9 [cwdohnal.com], and DX 10 [kentie.net]), but not the full engine. id Software is courteous enough to release their old engines under the GPL, so ports like this happen fairly regularly.
        • Re: (Score:2, Flamebait)

          by Blakey Rat (99501)

          Yah. It's known as a "joke."

          Thank you, though, you humorless pedantic asshole.

  • Great job. (Score:2, Insightful)

    by ipquickly (1562169)

    Q3 is still one of my favorite games. The first thought that came to my mind when I read this was

    "Do we have to hear about every case of someone porting something like this(doom,quake, etc)to a new device"

    But considering all the effort that you put into doing this, I must say that I admire your dedication and attention to detail.

    Great job.

    • The first thought that came to my mind when I read this was

      "Do we have to hear about every case of someone porting something like this(doom,quake, etc)to a new device"

      Proving that a device is "Quake 3 complete" allows the major labels to gauge what kind of game can be sold to owners of this device. For example, a device that can run Quake 3 can in theory run other games that use id Tech 3. It can also run games ported from console platforms comparable to platforms on which Quake 3 was released, such as Dreamcast games and early PS2 games.

  • Hmmm. (Score:5, Informative)

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

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

  • I've been unable to get any demos to work which were recorded on the 1.32c exe, obviously because this is based off ioq3. If anyone cares to record or get vanilla demos for showcase purposes I'm all ears. OSP/mods appears to run, but being able to play match demos to show off gameplay would be the BOMB. Also, id software should REALLY take notice here and release a spectator-only client for QuakeLive which runs on Adroid ;-)
    • Re: (Score:3, Informative)

      by Time Doctor (79352)

      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.

      • by get quad (917331)
        I've tried OSP with no luck (author already stated no mod support just yet), but am having a hard time finding any vanilla 1.32c demos thus far. If anyone finds them I'll certainly test and report back!
    • by borl (586949)

      Speconly?! Far too useful.

      They're too busy adding bloom effects

  • by PommeFritz (70221)
    I'm not impressed. Epic had Unreal Engine 3 running on the iPhone back in december last year: http://www.anandtech.com/gadgets/showdoc.aspx?i=3695 [anandtech.com] Granted, it's a modified version and I don't think there's a working game available yet that uses it, but the engine is several generations newer than the Quake 3 one... Still, nice job. It's weird to see 'big' games appearing on tiny devices. Didn't think the mobile technology would be this advanced so soon, tbh.
    • Re:Not impressed (Score:5, Insightful)

      by Beelzebud (1361137) on Thursday February 25, 2010 @04:41AM (#31269758)
      Yeah and that is Epic Software doing that. They aren't exactly a hobbyist working without pay...
    • I highly doubt that Unreal 3 would run better than the Quake 3 engine. Modern does not equal better. Most of the things that newer engines do better are somewhat worthless on a cell phone. You want simplicity and speed on a cell phone, not abstraction and flexibility. I would think that the Quake 3 engine would knock the pants off of Unreal 3.
      • by Narishma (822073)

        On the other hand, the GPUs you find in these phones have more in common with the current generation of PC GPUs than with those that were available when Quake 3 launched. UE3 is optimized for modern GPUs, but Quake 3 is not.

        • Re: (Score:3, Insightful)

          by TrancePhreak (576593)
          GPUs in these phones are more common with what was around during the Q3 times. They support OpenGL ES 1.0.
          • The recent ones support OpenGL Es 2.0 (the first generation iPhones used an old, cheap, GPU to keep costs down and profits up). They're slower, but most of these devices only have an 800x480 device, so you don't need as much raw power as a desktop because you have a quarter of the number of pixels to draw (or fewer), which also means you can get away with less complex geometry and so on.
    • Re:Not impressed (Score:4, Informative)

      by Anonymous Coward on Thursday February 25, 2010 @05: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.

      http://www.szico-vii.com/uploads/photos/16.jpg [szico-vii.com]
      http://www.szico-vii.com/uploads/photos/17.jpg [szico-vii.com]
      http://www.szico-vii.com/uploads/photos/31.jpg [szico-vii.com]
      http://www.szico-vii.com/uploads/photos/42.jpg [szico-vii.com]

      • Re: (Score:2, Insightful)

        by tepples (727027)

        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.

        Other than that you don't have to GPL your game, which you do if you use an ioquake3-based engine. And it's likely that Epic will make Mobile Unreal available at a lower price to current Unreal engine licensees.

    • by LingNoi (1066278)

      So lets sum up here.

      This kwaak3, something that runs on most android phones, works, is a game, something you can download right now...

      That's less impressive then a youtube video of a game that, doesn't work on the iPhone 2G, 3G or ipod touches, doesn't have networking, etc ...

      Why do I get the feeling you're shitting on this simply because it's not related to the iPhone?

    • by fuzzix (700457)

      I'm not impressed. Epic had Unreal Engine 3 running on the iPhone back in december last year...

      But they have yet to ship a Linux binary. BAH!

  • Really! This is one of the main reasons I love open source, things like this and others would be imposible/difficult with the iPhone OS.

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

      by jo42 (227475) on Thursday February 25, 2010 @08: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.

      • Re: (Score:1, Insightful)

        by Anonymous Coward

        I guess every platform has disadvantages. Android apps have to jump through hoops to use C libraries, and iPhone apps have to jump through hoops to get off the developer's box and onto actual hardware.

        I'm going to go wash my hands.

        • by BitZtream (692029)

          You think syncing your phone with iTunes is 'jumping through hoops to get off the developer's box'?

          Please to be getting a clue about the topic before you attempt to troll.

      • Re: (Score:3, Insightful)

        by Hurricane78 (562437)

        Then again it’s completely useless, since >99% of the iPhone users could not install it anyway because of the lock-in. ^^

        The iPhone would be a cool phone... If it at least had half of the freedoms you have with any other smartphone on the market... (exchange the battery, install all software, run java (j2me+) apps, tons of small functions)

      • by JAlexoi (1085785)
        The problem is only that Objective-C is just plain horrible, and you just can't escape from using it.
  • by dvh.tosomja (1235032) on Thursday February 25, 2010 @04:28AM (#31269696)

    > Quake 3 optimized for Cortex-A8 with Neon is about 15% faster without audio

    I wonder how much faster it will be without video

  • by mxh83 (1607017)
    The problem is that FPS like Q3 needs a proper mouse. Otherwise its no fun.
    • by Unending (1164935)

      I wonder if a bluetooth mouse could be used, maybe some sort of 10 key for the left hand and you would be set.

      • by mxh83 (1607017)
        Imagine how stupid you would look with that..
      • Android doesn't even have support for Bluetooth HID keyboards, and SPP is only supported halfway via a buggy app that refuses to stay connected for longer than 10 minutes at a time... :(

    • by haystor (102186)

      I disagree, I think you should look around the world by moving the phone, then thrusting it forward to shoot. This would be awesome...for everyone else watching.

    • There are some FPS on the iPhone were you move using a virtual joystick in the lower left corner and look around using the rest of the screen. It's not perfect but it's ok to play casually on a small mobile device.
  • here is the conspicuously missing video: http://www.youtube.com/watch?v=q9Xaz7ECI4M [youtube.com]
  • What about the N900? (Score:5, Interesting)

    by anomnomnomymous (1321267) on Thursday February 25, 2010 @04:46AM (#31269784)
    The N900 has also recently received a port of IOQuake3: Have a look at their site [ioquake3.org] for more details.

    If you're looking for a very nice (open) phone, I'd go with the N900. No, I'm not from Nokia, just a -very- satisfied customer.
  • Just another note: (Score:1, Informative)

    by Anonymous Coward

    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: (Score:3, Informative)

      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).
  • I'm not familiar with ARM architecture, but this bit still sounds suspicious to me:

    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.''"

    On x86 at least, no C compiler worth its salt would even generate a call to a library function for something like sin or cos - why bother with all the overhead of a call, if ultimately it's a single instruction in the FPU?

    Now, one trick there is that it actually depends on compiler settings - whether you specify "precise" floating-point mode (which is fully standard conformant), or "fast" mode. Only the latter seem to produce

    • by Tapewolf (1639955)
      AFAIK, most ARM processors do not currently have an FPU. Maybe as FPUs become more common support for using the FPU directly will be added. Just a guess.
    • by quadrox (1174915)

      I believe most (older?) versions of ARM come without a FPU. Presumably the ARM processor on the Droid/Milestone is one of those that do have a FPU and thus can take advantage of it.

      That's what I've been told, not sure whether it's correct.

    • Yes I'm compiling kwaak3 using -ffast-math but in all cases it uses libm. It is only a hypothesis on why perhaps a generic soft-float build is not that much slower than a floating-point optimized build. You would expect that a soft-float version is a lot slower because quake3 uses floats for most of its math.
  • How about integers instead of floating point? Without knowing anything about the code, how would integers perform here? Couldn't a static table with, eg 3600 precalculated angles simulate what you want? .
    • by Sasayaki (1096761) on Thursday February 25, 2010 @08: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.

      • You need to scale your values of X, Y, and time so that the time component is larger relative to X and Y.
      • by MrDoh! (71235)

        Excellent description, helps explain it well.

      • Re: (Score:1, Informative)

        by Anonymous Coward

        http://en.wikipedia.org/wiki/Fixed-point_arithmetic

        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.

      • Re: (Score:3, Informative)

        by Jenny Z (1028212)

        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

      • by jgostling (1480343) on Thursday February 25, 2010 @11:10AM (#31272198)

        Unfortunately floating point numbers are required here.

        Not quite. When doing this stuff on a platform with limited or non existent floating point support you can always use fixed point arithmetic [wikipedia.org].

        Cheers!

      • Re: (Score:3, Informative)

        by MikeBabcock (65886)

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

      • by cecom (698048)
        Not quite true :-) A 32-bit floating point number can't have more precision than a 32-bit integer number. The opposite in fact - you only have a 24-bit mantissa in the floating point. And worse, the larger the number becomes, the less precision you have. That is not to say that using integer for 3D math is a good idea. It isn't, but for different reasons.
      • Re: (Score:3, Informative)

        by idealego (32141)

        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 ha

      • by lolocaust (871165)
        The original PSX didn't have an fpu. All 3d calculations were done with integers. A big part of porting PC games was the conversion from floating point to integer.

        Also, we need a -1 factually incorrect mod. Don't mean to single you out, but quite a few posts are modded up when there's a mistake. People who seem sure of what they're saying are usually assumed to be correct (just like in real life!).
    • by kyz (225372)

      Because integers don't hold enough precision to be useful in modern graphics.

      Believe it or not, they are currently useful for simply shaded/textured objects on phone-sized screens. You can use fixed point 16:16 numbers for that.

      But they start being a hindrance after that because of the limited precision, and the amount of work you have to do to bring values back in line when doing multiplies or divides. You're generally wasting your time if the device you're targeting has a hardware FPU.

      You can see for your

  • To heck with Quake. How about all those old 16 bit strategy games that are like made for cellphones? CIV series? MOO? StarCraft? MoM? Where are they?

    • Re: (Score:3, Insightful)

      by Sir_Lewk (967686)

      Those games (at least starcraft, I've never heard of the others) are not open source. The Quake 3 engine is. That is one of the benifits to open sourcing your old engines like iD does, your games will get ported to every platform in existance that can even remotely handle them.

  • I just purchased a droid and I am looking into all of the things I can do -- the free apps, playing with the SDK, running a web & ftp server on the phone, etc. This project is by far one of the best projects I've seen and I can't wait until you have it available so I can put it on my phone. I'm a huge idSoftware and Quake 3 fan. Great work!
  • The next logical step, of course, is RA3 =D
  • I’m sorry, but not only does the N900 run Quake 3 (and very smoothly) [nokia-n900.com]. No, it also runs Windows 95 [dailymobile.se] and MacOS X [thenokiablog.com]!

    But I haven’t seen news for this on /.

    Funny that this could never ever happen with iPhone (locked down), so we’re at least safe from that. ;)

Aren't you glad you're not getting all the government you pay for now?

Working...