Quake 3 For Android
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.''
Team fortress by any chance? Steal the code, kill people, I can help with whatever task is needed.
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?"
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.
Dunno why TFA didn't include it, but there is video.
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 ;-)
"To err is human, to mod Funny divine."
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 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.
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.
Dear
> Quake 3 optimized for Cortex-A8 with Neon is about 15% faster without audio
I wonder how much faster it will be without video
Thanks for using ioquake3 :)
Check out ioquake3.org for a great, free, First-Person Shooter engine!
The problem is that FPS like Q3 needs a proper mouse. Otherwise its no fun.
here is the conspicuously missing video: http://www.youtube.com/watch?v=q9Xaz7ECI4M
teque5.com
The N900 has also recently received a port of IOQuake3: Have a look at their site 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.
When you shoot a mime, do you use a silencer?
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.
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 an inlined implementation of sin & cos. Are you sure you're compiling with -ffast-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? .
I agree the parent is a troll, but not a very good one. From the very second sentence of the linked post:
When you troll without even bothering to read two sentences of what's linked that's just... sad.
Moreover, the iPhone falls significantly short in one area: the N900 runs at 800x480, and the Milestone/Droid at 854x480. The iPhone is presumably pushing ~37% of the number of pixels. (Assuming the game is running at native resolution on all 3 platforms). If so, fairly impressive pixel-pushing for the other two platforms.
did they fix that?
--
Stay tuned for some shock and awe coming right up after this messages!
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.
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.
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?
There are two big differences between the MIPS32 you'll find in the A320 and, basically, any recent ARM SoC. One is that the last two or three generations of ARM chips have hardware FPUs, while the A320's CPU does not. If you're running Debian, then the A320 will be painfully slow, because the default Debian install for it was configured for hard float, meaning that every floating point instruction (including loads and stores to the FPU registers) raises an invalid instruction interrupt. This is then caught by the kernel, which inspects the old program counter, decodes the instruction (in software) and emulates it. This means FPU-intensive code runs at about 1% of the speed of a hardware implementation. Recompiling with softfloat support (which changes the calling conventions, so you need to recompile everything from libc up) makes it a lot faster.
The other big difference is that recent ARM SoCs all come with a GPU. The latest generation all support OpenGL ES 2.0, so you get a fully programmable pipeline (shaders and so forth), while the older ones have ES 1, which supports only the fixed-function pipeline. Even the old ES 1 GPUs are faster and more capable than anything on the market when Q3 was released.
In short, the A320 is a pretty useless machine. It's massively underpowered even by handheld standards (the Nokia 770 will be faster in most uses). The newer cheap MIPS-based use the Loongson 2F, which is a 64-bit superscalar MIPS III implementation (still little endian), and two FPUs, but a lot of them still don't come with a GPU, so you're looking at software rendering only. They're more than powerful enough for Quake 2, but Quake 3 required OpenGL hardware, so they'll probably struggle a lot.
I am TheRaven on Soylent News
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.
If you're looking for a very nice (open) phone, I'd go with the N900.
The advantage of the port to Motorola Droid is that Verizon Wireless carries Motorola Droid. In the United States, the big three wireless carriers don't give a discount for bringing your own phone, so most people who want coverage choose a carrier first and then choose one of the phones that the carrier subsidizes. And as I understand it, Nokia has had trouble getting its Symbian-based and Maemo-based phones into Verizon, Sprint, and AT&T. So which U.S. wireless carrier do you recommend for use with the N900?
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!
"Instant gratification takes too long." - Carrie Fisher
American McGee's Alice. when you told people it was the Q3 engine, jaws dropped.
I've decided to Diversify my Holdings. I've divided my cash between my left and right pockets, instead of all in one.
The next logical step, of course, is RA3 =D
Well, the iPhone 3GS sure outperforms the older PowerVR MBX-Lite use in all previous iPhones. The MBX-Lite used in the older iPhones does about 1Mpolys/second at the iPhone's 50-60MHz GPU clock speed.
Some real benchmarks: Tap Tap (a big iPhone developer) found the 3GS about 4x faster in 3D applications:
http://www.taptaptap.com/blog/iphone-3gs-blows-away-iphone-3g-in-3d/
There is a THEORY that the GPU is an underclocked PowerVR SGX 535 (Intel calls this the GMA500), largely based on some #defines in the Apple SDK. And also because they include the VXD370 media accelerator, which has usually been coupled with higher-end SGXs. Of course, TI didn't need this, they have had their own media acceleration technology going back to before the DaVinci SOCs (what you find in most higher-end PMPs going back some years). This is a chip custom-made for Apple by Samsung, so in truth, unless Apple's talking, we may not know. The Anandtech article also postulates the SGX 520, but again, any number of core + clock speed combinations lead to the same answer.
http://www.anandtech.com/gadgets/showdoc.aspx?i=3579
But a full SGX 535 runs at 200MHz and does 28 MPolys/s. Pretty good chance that's not what the iPhone 3GS is running -- there are no benchmarks showing even half of that performance. Most benchmarks show the 3GS running 3x to 7x faster at 3D, an assuming the faster CPU isn't part of that, you could get with an SGX 535 at 50MHz, an SGX 530 at 100MHz, or an SGX 520 at 200MHz. The real answer might be known to developers: the SGX 520 has a single Universal Scalable Shader Engine (USSE) pipeline, the others add multiple pipelines for additional performance. Not that you'd necessarily have this exposed in OpenGL.
It is not debatable about the DROID/Milestone.. it contains OMAP 3430, which contains the PowerVR SGX 530 GPU core. TI quotes a peak of 10Mpolys/sec. which this chip at normal clock speeds; it's programmable, typically run in the 100-160MHz range (14Mpolys/sec is the peak you can expect with 200MHz clock). Of course, there are all sorts of folks boosting their DROID to much higher clock speeds, but this what you'd expect in stock performance. And it's quite possible there are still optimization issues in Android that no longer apply to the slightly more mature iPhoneOS.
-Dave Haynie
Of course, I should add, with 2.6x more pixels to paint, a DROID or Nexus One, even with a faster GPU, might well lose a frame-per-second race against an iPhone 3GS.
-Dave Haynie
I’m sorry, but not only does the N900 run Quake 3 (and very smoothly). No, it also runs Windows 95 and MacOS X!
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. ;)
Any sufficiently advanced intelligence is indistinguishable from stupidity.