Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Xonotic on Android

Frankly, why do you even want to play Xonotic on your phone (or tablet)? Sorry for being blunt, but shooters are one of the only things where PC master race applies - there's simply no device that is as good as mouse+keyboard for FPS games. Omni could be one, but not everyone has money (or space) to have one.

(08-28-2015, 09:58 AM)darkhog Wrote: Frankly, why
Because you can.
"Yes, there was a spambot some time ago on these forums." - aa

There is no reason you can't put a mouse/keyboard on an Android device. Sure it's not the norm, but that doesn't mean it's hard to do.

My g/friend broke the screen on her phone a few months ago. I gave her a USB to MicroUSB To Go adapter and a mouse. While it wasn't truly portable, it at least allowed her to do stuff till she could get her old one flashed with CM and send her new one in for repair. I've also used wireless keyboard/mouse combos plugged into one of those without issue.

FWIW: There's a bunch of TV's out now that run Android. Could be interesting if Xonotic ran well on those.
[Image: 21975.jpg]

Quote:“To summarize the summary of the summary: people are a problem.” - Douglas Adams

Did anyone try this more recently? I guess Phones have gotten quite a bit faster now and it should be possible to run Xonotic quite well on some of them.

On my Asus Zenfone2 the Quake1 Demo is pretty stable at 50-60fps, however there seems to be a bug that doesn't allow to start your own game anymore. All I get is a console when I select new game. Not sure what is causing that.

Someone recently mirrored the code here by the way:

There is also now a VR version for Cardboard, see:

(10-03-2013, 05:28 PM)xeros Wrote: I've just got Xonotic 0.7.0 completely working on Android tablet (with playbable performance):

[Image: xax2.png]
[Image: pkj8.png]
[Image: r4tf.png]
[Image: pen5.png]
[Image: 24aq.png]
[Image: 10n1.png]

Quick HOWTO:

1. Install on Android smartphone/tablet/TV/... (other device) QI4A:
(current version: 2.2, released: 15 September 2013)

2. Download Xonotic:
Quote:Lower quality download via HTTP
Description: Release build with JPEG texture compression instead of using DDS textures compiled with S3TC. This build has smaller file size and has better support for opensource/legacy drivers, but the textures take slightly longer while loading the game.
MD5: a16167f0a56303ff00fdfbc79d6e8487
Package size: 627M
(Lower quality download to get rid of issues with S3TC textures)

3. Unpack it and copy "data" dir of Xonotic to Android sdcard device (on most devices it's the builtin one, not external MicroSD card) into "qi4a" dir on it (in my case the path was: "/sdcard/qi4a/data")

4. Connect USB keyboard (if you need then you can connect it via USB HUB - I had to hack kernel a bit as kernel in my device was filtering out any USB HUBs in USB devices, not allowing me to use them, but it should work on most other devices) to USB HOST port in Android device and list event* devices from terminal application (or via ADB):
root@localhost:/# ls -l /dev/input/event*
crw-rw---- 1 root 1004 13, 64 paź  3 02:03 /dev/input/event0
crw-rw---- 1 root 1004 13, 65 paź  3 02:03 /dev/input/event1
crw-rw---- 1 root 1004 13, 66 paź  3 02:03 /dev/input/event2
crw-rw---- 1 root 1004 13, 67 paź  3 19:20 /dev/input/event3
(in my case it was event3)

4. Connect USB mouse (if you need then you can connect it via USB HUB together with keyboard) to USB HOST port in Android device and list event* devices again to check which one is used for just connected mouse:
root@localhost:/# ls -l /dev/input/event*
crw-rw---- 1 root 1004 13, 64 paź  3 02:03 /dev/input/event0
crw-rw---- 1 root 1004 13, 65 paź  3 02:03 /dev/input/event1
crw-rw---- 1 root 1004 13, 66 paź  3 02:03 /dev/input/event2
crw-rw---- 1 root 1004 13, 67 paź  3 19:20 /dev/input/event3
crwxrwxrwx 1 root 1004 13, 68 paź  3 19:20 /dev/input/event4
Support for mouse needs ROOT

5. If your device has 1GB RAM or even less memory then I strongly suggest to create swap device or file (256MB or more) as in my case (1GB RAM) it happened once that the OutOfMemory Killer has started killing apps, even that I have closed/killed most of other apps before (it didn't happen again once I have created and enabled 256MB swap file):
u0_a67@android:/ $ su -
root@android:/ # busybox dd if=/dev/zero of=/sdcard/swap.img bs=1M count=256
256+0 records in
256+0 records out
268435456 bytes (256.0 MB) copied, 59,0529 s, 4,5 MB/s
root@android:/ # mkswap swap.img
Setting up swapspace version 1, size = 262140 KiB
no label, UUID=7914a100-6dc6-4779-ae42-2162dd210fee
root@android:/ # swapon swap.img
root@android:/ # free
            total       used       free     shared    buffers     cached
Mem:        922152     802292     119860          0      13156     476884
-/+ buffers/cache:     312252     609900
Swap:       262140          0     262140
root@android:/ #
ROOT is needed to support swap in most devices

6. Run QI4A and set parameters:
darkplaces.arm -xonotic
Game working directory:
(path to sdcard may differ for your device)
Hide onscreen buttons and enable mouse (Root required)
Mouse event device:
(last device path from previous step)
Mouse cursor position:
Top right corner
(if you have status bar on bottom, if on top then choose "Bottom right corner" to prevent pressing it while using mouse clicks in game)

7. "Start game" & set player & display settings in game.
Mali 400 is still quite powerful GPU as for embedded device, so in my case I could enable some nice graphic effects, but in most devices CPU will be bottleneck in Xonotic so I would recommend to tweak/disable settings that heavily use CPU (example of optimal settings for me on screenshot below).

8. Have fun in Multiplayer game!
Playing in single player would hit CPU bottleneck that needs control bots and drops down some FPS.
If you want to play with bots then you'll get a lot better performance when you'll connect to any of multiplayer servers with bots.

Screenshots taken on tablet directly (with FPS counter on screen):
Unfortunately most screenshots are with lower quality settings, but later I've found that even with settings like visible on last screenshots, the FPS rate was the same or almost the same as with lower settings.
Usualy in gameplay FPS rate was between 30-50 FPS, while going down to 20 FPS few times in action when 3-4 players were on screen at once.
Maybe you'll get better results as I use my tablet also as Linux server and I have antivirus, messangers, other services running (most of them were running also during Xonotic/QI4A testing).

My device: tablet
Manufacturer: Unknown ;-)
Branded: Compendium CE
Model: CTAB2
SoC: RockChip RK3066
CPU: Cortex A9, 2x 1.6GHz, ARM7+Neon (but Xonotic can use only one core - monitored via SSH to chrooted Debian on MicroSD card, during game)
SWAP: 256MB file on cheapest 2GB Class 4 MicroSD card (other apps where drop down to swap, taking ~90MB of swap while playing Xonotic)
Display: 9,7" 1024x768 (Xonotic was run at resolution 1024x720, with Android status bar below)

- on Red Planet map I've encountered some display glitches
- it's not able yet to download some content from multiplayer servers (maps, textures) because of missing libcurl (it comes with Xonotic but compiled for x86/x86_64) - maybe I'll find some more time soon to compile it and include here, but in meantine you'll have to copy them to Android device from PC (solution below, but NEEDS ROOT until QI4A build author will provide libcurl together with game)

No other problems found and issues that -z- has found should be gone now. or at least I didn't experience them on my device (any slowdowns, slow starting, unresponsive / dialog to kill the game, reboots).

Edit: lubcurl (NEEDS ROOT)
I have compiled for Android (in attachment) and now Xonotic can download paks, maps, textures from http/ftp/... links from servers when joing multiplayer game.
To install this lib you'll need to:
1. Unpack and put it on sdcard in Android device
2. Run terminal emulator (or adb shell from PC) and execute these commands:
u0_a67@android:/ $ su -
root@android:/ # busybox mount /system -o rw,remount
root@android:/ # cd /system/lib
root@android:/system/lib # busybox cp /mnt/sdcard/ ./
root@android:/system/lib # busybox ln -sf
root@android:/system/lib # busybox ln -sf
root@android:/system/lib # busybox chmod 644*
root@android:/system/lib # cd /
root@android:/ # busybox mount /system -o ro,remount
3. Start QI4A and enjoy Xonotic :-)

One more thing - I've done comparision between trying to play game without swap and with swap.
Once more got hit by OOM Killer when run without swap and joined heavy map and even before that performance was bad on smaller maps.
Then I've tried again with swap (yes, even poor 256MB swap file on EXT2 formated (can be FAT16/32, too) MicroSD card (only Class 4)) and the difference in performance was big, no hickups, no OOM Killer, etc.

By the way i have inserted into apk so non-root users can install it too :

Attached Files
.zip (Size: 6.21 MB / Downloads: 0)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Anyone tried Xonotic on a high performance android? poVoq 1 2,353 05-29-2013, 10:26 AM
Last Post: SouL

Forum Jump:

Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-