Friday, August 17, 2012

Prebuilt Android APKs

I have quickly uploaded a Dante-debug.apk and some basic info to http://dante.mobi/

Debug in the APK context means the code is not signed with a key, so you need to enable installation of such packages in the Android Settings menu. The code is compiled with optimizations, but do not expect anything above single-digit frames per second presently.

Optimization is something I'm working towards, but the fact remains that many of the current generation devices simply do not have the GPU horsepower to run the game at an acceptable (greater than or equal to 30 fps) rate. Memory is another major killer; you need as much as possible available.

Currently the Dante icon will launch the Doom 3 game to the main menu. However, at least on my device it's not possible to launch the single-player campaign (aka game/mars_city1) due to memory requirements. Again, this is something that will be improved in the future.

You need to make the directory and copy your Doom 3 *.pk4 files into /sdcard/Android/data/com.game.dante/base from your CDs or DVD. You must also copy pak000_gl2progs.pk4 into the same directory otherwise the game will not run! This file contains the GLSL shaders required by Dante.

The APK package is not guaranteed to run on your specific device. You're welcome to file a issue about it on Github but please check for duplicates first. It's also not my fault if the APK destroys your device, kills your kitten, or causes the Mayan Apocalypse.

I'll write up some detailed instructions for compiling and installing Dante on Android later this week or early next week for those who wish to do this or don't trust installing my APK package.

Happy hacking!

17 comments:

  1. I've solved memory requirements already, by using pvr texture compression for pvr GPU, so you can run game/mars_city1, i thought that you know it. We should optimize SIMD and render loop, cause RAM is done

    ReplyDelete
    Replies
    1. PVRTC only works on Imagination SGX GPUs. Many devices have Nvidia Tegra chipsets; we should try to do something on there too.

      Delete
    2. tegra is ok, because it uses s3tc (or dxt) which is already in doom source code implemented, here: http://developer.android.com/guide/topics/manifest/supports-gl-texture-element.html

      Delete
    3. and if somebody buy me tegra3 device:-), i will test it

      Delete
  2. Is there any debug output file generated? When I launch it I only see black screen.

    ReplyDelete
  3. I just ran your prebuilt apk on my phone. I'm pretty interested in seeing more. But I'll go ahead and tell you how it did on my phone.

    First off, this isn't the best conditions, I'm using the Doom3 Demo pk4. So I had to rename it, and create a new directory for a renamed mainmenu GUI(demo menu is named demo_mainmenu.gui).

    So, the engine loads up the menu(~18 seconds from app start to GUI). The GUI functions as it's supposed to. The menus pop up, the mars mesh loads and rotates, mouse input works, etc. All around 16-19 FPS.
    http://img407.imageshack.us/img407/8066/sc20120905232037.png


    So, trying to load the demo map results in the console poping up after ~55 seconds. But by the looks of it, the map actually loaded(note the "SpawnPlayer: 0" and the "Game Map Shutdown"). I think the reason it failed is the demo pk4. As you can see, it's a fatal script error that killed it. If I knew enough about the idtech4's scripting language I would try to fix it, but I doubt it would matter, as there are probably hundreds of missing things.
    http://img855.imageshack.us/img855/9094/sc20120905231340.png


    Hope this can be useful. And if it's not, at least I found the fact that it semi-worked on my phone interesting. I'll have to check on this every once and a while. Hopefully you keep posting pre-built apks, as it makes it easy for me to just toss onto my phone(hell, I can do it from my phone). But maybe later I'll download the source and compile it myself, though I'm not too good at that yet(and my actual understanding of low-level graphics is too low to be useful).

    Anyways, looking forward to seeing more.
    -Gary

    Phone:
    Samsung Galaxy Note I717
    800 x 1280 pixels, 5.3 inches Screen
    2.3.6 Stock ROM
    Dual-core 1.5 GHz Scorpion CPU
    Adreno 220 GPU

    ReplyDelete
    Replies
    1. Hi Gary,

      Thanks for your comment. I appreciate the encouragement. :-) I'm going to update the prebuilt APK today because I have some fixes which have resolved a couple of bugs (https://github.com/omcfadde/dante/issues/37, https://github.com/omcfadde/dante/issues/30, https://github.com/omcfadde/dante/issues/19)

      Unfortunately none of those are performance bugs but rather rendering bugs.

      Regarding the use of the demo data: as far as I know this is not supported with any version of the Doom 3 GPL release. The code is newer than the demo data, so it expects to find media assets that just don't exist in the demo data.

      It might be possible to make it work with demo data, but considering Doom 3 is something you can probably pick-up from the discount bin in some game shop it's not something I'm going to put much effort into attempting to support.

      id Software's official statement is to get the data from Steam, which may well come to GNU/Linux at some point, but I'd much rather purchase a DVD and pay the shipping than deal with Steam.

      I am quite impressed with the performance you're getting from the Adreno 220 GPU... maybe there is some hope for future devices to hit 30 Hz in-game.

      Delete
  4. I'm aware that the demo content isn't supported in the GPL release(I've already tried it, but back then it just crashed the engine). I also don't expect or want you to waste your time to support the demo content. It's just what I had on hand when I found your port.

    And I'm surprised it's still $20USD on Steam... (I picked GTA4 up for $15). I wonder if I can find it cheaper elsewhere... I would also prefer a DVD, though I already have to deal with Steam(I'm a Source/hl2 engine modder).

    And what kind of framerate do you get? Once I can get my hands on the full Doom3 content pks, I will also run your port on all the android devices I have access to:

    Samsung i897 Captivate
    Screen: 480 x 800 pixels, 4.0 inches
    RAM: 512MB
    CPU: 1 GHz Cortex-A8
    GPU: PowerVR SGX540
    ROM: Stock 2.1 and 2.3(two devices)

    Samsung i717 Galaxy Note
    Screen: 800 x 1280 pixels, 5.3 inches
    RAM: 1GB
    CPU: Dual-core 1.5 GHz Scorpion
    GPU: Adreno 220
    ROM: Stock 2.3.6

    Samsung i727 SkyRocket(I think)
    Screen: 480 x 800 pixels, 4.5 inches
    RAM, CPU, GPU, ROM same as Note.

    Acer Iconia Tab A500
    Screen: 800 x 1280 pixels, 10.1 inches
    RAM: 1GB
    CPU: Dual-core 1 GHz Cortex-A9
    GPU: ULP GeForce (Nvidia Tegra 2 T20 chipset)
    ROM: Stock 4.0

    ReplyDelete
    Replies
    1. Keep in mind that Doom3: BFG Edition will be released later this year, in connection with the Oculus Rift developer kits. I am unsure whether they are targeting November (when the unassembled developer kit ships) or December (when the assembled developer kit ships.) If I had to guess, I would guess the latter.

      Most probably this will mean that the original Doom 3 will either drop in price or disappear from Steam. However the BFG edition adds some more lights, some new content, possibly higher resolution textures and/or other improvements... You are going to get a better experience with the new media. I understand they have basically done a polishing pass over the game.

      I'm quite interested to get both sets of media into Git and do a diffstat comparison...

      Certainly the BFG content (and the Oculus Rift) will be something I wish to support; I just hope id Software have not packaged the data in a cryptic format like the Rage packages...

      Delete
  5. Works good on Samsung Galaxy S2, but I did not found how to walk. I just can look around. Graphics are nice. Shadows, textures and everything else looks like on PC. Good job!

    How can I walk?

    ReplyDelete
  6. Awesome - looking forward to test on my nexus 4 :-) http://dante.mobi/ seems to be down for me though - any chance there's a mirror for the apk?

    Thanks,

    ReplyDelete
  7. Thank you for doing this
    I have been using Doom 3 for a development environment
    I am trying to create a GPL game designer base pkg with basic assets and ui
    I have been waiting for a decent android port
    the point being now I can basically get gpl ports for ios, linux, wx32/x64, and now android
    I was looking for the source code for Diii4a
    I guess it is now called dante
    why would someone want to design for this engine?
    well
    its less than 100 megs and works great
    whereas unity lumberyard or unreal are all massive dev environments
    I can package the binaries, basic assets and tools for idtech for into a 200 meg zip!

    Do you have any rerence material for the gui system?
    I am trying to make a simple stripped gui but all those grid mouseovers are ridiculous to wade through
    I'm not really a programmer
    I'm an artist and asset manager
    Thx!
    I'll look closer at this

    ReplyDelete
  8. ack
    I'm not finding it
    do you have the apk hosted somehwere?

    also
    do you have the source for dii4a 1.1?

    ReplyDelete