Create an account


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

#1
Skip to where someone got it working: http://forums.xonotic.org/showthread.php...2#pid62782
Thanks xeros!

tl;dr: download qi4a from the market then follow these links:
progress blog (AKA -[z]-'s Google+): http://www.8ed.me/
These pictures help explain the settings: http://imgur.com/a/rF4vC
Pictures of things going wrong (feel free to read and troubleshoot): http://imgur.com/gJdCgby,V6aHi35,egLD4lB...,zhUVVwQ#0

EDIT: -[z]- has been successful in loading Nexuiz data, is working on Xonotic, and plans to write a script to simplify setting up Nexuiz or Xonotic. There is a bug with disabling the touch screen and using a mouse (/dev/input/mouseX vs /dev/input/eventX) and some other minor bugs. More to come and I'll edit the edit.

EDIT TO THE EDIT: must use event and not mouse and just pass the -nexuiz or -xonotic flag

BUGS:
- graphical sizing
- need to switch input to /dev/input/eventX
- some maps have glitches (I can't move)
- sometimes I have gotten a "this application has stopped responding, "wait, report, quit" dialog
- I've had crash and reboot once... this might have been the firmware
- right click causes the menu to come up.
- Xonotic was having texture compression issues, processor doesn't support I believe. This causes strange sizing and texture issues (I think)?

OTHER ISSUES:
- bad default keybinds depending on use (tv box has weird keybinds, makes sense on mobile)

==OP Starts Here==

For everyone who can't wait to get home to game, someone that is not myself presents:

qi4a (Quake 1 port, will run Darkplaces/Nexuiz/Xonotic)
https://play.google.com/store/apps/detai....Q4A&hl=en

qii4a (Quake 2 port, no docs on how to install data, do what you wish with it)
https://play.google.com/store/apps/detai...II4A&hl=en

qiii4a (Quake 3 port, 1-click install for OpenArena data)
https://play.google.com/store/apps/detai...3m4.QIII4A

RTCW4A (Return to Castle Wolfenstein)
https://play.google.com/store/apps/detai...3m4.rtcw4a
[+] MaKR [smooth+o]
Reply

#2
Great that someone has done this already for these games. Please do search the forums as this has been discussed before and someone has even tried it to some extent given that Darkplaces (the Xonotic engine) has already been ported to Android:
http://forums.inside3d.com/viewtopic.php?f=1&t=5161
I'm at least a reasonably tolerable person to be around - Narcopic
Reply

#3
fwiw, I requested he make this post. it was the first I heard of it and I've been playing with an Android TV box that uses:

* Amlogic A9 Dual Core Neon HD CPU
* Mali400 Quad Core High Performance 3D GPU
* 1GB RAM (DDR3)

Trying to get it running now, as much as I know (can remember) about darkplaces/nexuiz/xonotic, the instructions aren't as stupid simple as the could be for adoption.

for example: neither path has worked for me yet:

/storage/emulated/0/external_storage/sdcard1/Nexuiz
/storage/emulated/0/external_storage/sdcard1/Nexuiz/data

Using the link you provided for qi4a, /storage/emulated/0/external_storage/sdcard1/qi4a worked...

still lost about implementing Nexuiz / Xonotic, perhaps it can't read pk3 files?
Reply

#4
You should try to start it up with the -developer commandline parameter. It gives a verbose report on userdir trials.

You can also use -developer2 and -developer3 for so-called "insane" verbosity. Better enable a log file then: use -consoledebug (takes no argument) to log everything from early on to qconsole.log.
Reply

#5
(08-16-2013, 01:03 AM)-z- Wrote: still lost about implementing Nexuiz / Xonotic, perhaps it can't read pk3 files?
.pk3 files and .pak files are the same thing but you could always try uncompressing them if there is space and seeing if it would work on the uncompressed data. Does the console give any useful information about the present working directory and whats in it? The qi4a page shows Nexuiz running through it so the data should all work for Xonotic too.

I wouldn't expect it to run Xonotic perfectly and in terms of development, porting Darkplaces officially to Android would be a better solution - that said, I can't see a small Android smartphone or handheld gaming device being very suitable for playing the game very well. You simply wouldn't be able to compete against PC players aiming with mice.
I'm at least a reasonably tolerable person to be around - Narcopic
Reply

#6
I did try uncompressing data20091001.pk3 in the data direct, did not make a difference.

Here is a giant screenshot (which hopefully makes sense) that supplements my earlier comment:

4 file managers showing trees of game data.

1) qi4a -- works
2) default unzip of Nexuiz
3) decompressed data.pk3
4) I think I was trying to mimic qi4a structure

http://i.imgur.com/k6r24o8.jpg

I tried various "game working paths" based on these without success.

photo of our friendly fail screen: http://i.imgur.com/c2yFRAb.jpg

I'll see if I can get more information with the -developer commandline parameter. I have to run to work, so I won't be able to report back until later.

Any tips are appreciated. I know I'm doing something very basic incorrectly, not sure what yet. I also know there is a lot of fat we can trim.

Being able to provide a package like the qi4a_darkplaces.zip is my goal, to make easy for anyone to setup.

Thanks for the advice guys, catch you later.
Reply

#7
From the QI4A page:
Quote:...to the folder specified in QI4A launcher (create that folder manually, example of correct path to "ID1" folder: "/sdcard/qi4a/ID1" with "/sdcard/qi4a" directory in launcher

I'm guessing this didn't work? I'll mess with it over my lunch break.
[+] MaKR [smooth+o]
Reply

#8
I don't get what you are trying to do there... normally you should just copy over the Xonotic data directory into the qi4a folder next to the ID1 folder and run the game via a the regular executable with the right mod parameter, no?
Reply

#9
I'm clearly misunderstanding how to structure the directory / what files to copy or reference. My screenshot above shows different ways I attempted.

To get darkplaces running, all I had to do was download the "game cache" file here: http://android.mob.org/game/qi4a_darkplaces.html

I'm requesting a similar drop-in solution.


Can someone please explain to me what I'm doing wrong, how I can structure the directory and/or provide a "game cache" zip like the link for darkplaces above?

Thanks.
Reply

#10
ok, I have never worked with an android, but here is how it works on a PC (and judging from the comments here: https://play.google.com/store/apps/detai...TQuUTRBIl0. it should be the same, just the question is how the executable allows for launch parameters):

Take all the .pk3 from the xonotic data directory (in the case of Nexuiz there seems to be more than pk3s in it, so just copy the whole folder-contents) and place them in a xonotic directory inside the qi4a folder, just like you did it with the ID1 folder.
The you start xonotic as if it was a mod for quake1 with the parameter "-game xonotic" (or what ever you called that folder you stuffed everything in, without the "" obviously, and behind the main qi4a executable if you can start it from a terminal.)
Reply

#11
Thanks for the follow-up I'll be giving this a trial tomorrow.
Reply

#12
OMG -Z- LIVES!!!!!! <3

T!


:^
[Image: 227.png]
Reply

#13
I <3 you chooksta, you are an inspiration Smile
Reply

#14
So yes, the missing link was "-nexuiz" or "-xonotic" after DarkPlaces binary.

darkplaces.arm -xonotic

Thank you poVoq and Ákos for the helpful guidance. I will do a full write-up and provide scripts, packages, whatever after I figure out the next steps... I can't seem to disable the on screen mouse, tried toggling in the app menu. I know this is basic stuff but I haven't been doing it for a while so I need the contextual memory archives to kick in.

Further guidance in this (un)mapping is appreciated. Videos to come.

I can tab around the menu system and start a game
Reply

#15
I emailed n0n3m4, I'm not sure if it's an Android or app level issue with the mouse input. I have some potatoed videos here: www.8ed.me -- I'll do a full write up with scripts assist in setting up both Xonotic and Nexuiz.

Thanks for all the help and support through other mediums. I appreciate it. I'm excited to get these games running amongst other use cases... this thread is getting a little sloppy but will do a full report after everything is sorted out. Cheers!
Reply

#16
These pictures help explain the settings:

http://imgur.com/a/rF4vC

- some maps have glitches (I can't move). I haven't checked Xonotic
- sometimes I have gotten a "this application has stopped responding, "wait, report, quit" dialog
- I've had crash and reboot once... this might have been the firmware
- right click causes the menu to come up.

won't have more time to experiment for a day or two and report my finding. MaKR has offered to help with deliverables and examples.
Reply

#17
An official Xonotic Android (/Nvidia Shield/Ouya) release would be certainly neat even though I own none of these.
Reply

#18
runing into some other minor bugs I can't fully detail. the bulk of the work is done.

for user adoption, we'll have to write some costume keybinds and bash script to package archives.

making or extending the current qi4a to do that is very feasible. Running through a lot of tests on my boxes, haven't even tried the phone yet.
Reply

#19
Sorry for the scattered data and thank you |MaKR| for keeping things more organized.

I'll be testing different firmware / game settings combinations. I'm open to suggestions, limited on time and capacity for the moment.

Damn Small <Nexuiz|Xonotic> may be a good start

http://forums.xonotic.org/showthread.php?tid=1427
http://forums.xonotic.org/showthread.php?tid=4029

Xonotic was having texture compression issues, processor doesn't support I believe. This causes strange sizing and texture issues (I think)?

EDIT: some images related to my ramblings http://imgur.com/gJdCgby,V6aHi35,egLD4lB...2k,zhUVVwQ

shouldn't have put my mouse over "okay" -- "wait" is usually fine.

Not being able to move on certain maps is certainly odd... I don't have an answer for these questions yet. Maybe someone else can help me?
Reply

#20
This is almost as insane as Emacs for Android...
Reply

#21
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:
https://play.google.com/store/apps/detai...n0n3m4.Q4A
(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):
Code:
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
root@localhost:/#
(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:
Code:
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
root@localhost:/#
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):
Code:
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:
Commandline:
Code:
darkplaces.arm -xonotic
Game working directory:
Code:
/sdcard/qi4a
(path to sdcard may differ for your device)
Controls:
Code:
Hide onscreen buttons and enable mouse (Root required)
Mouse event device:
Code:
/dev/input/event4
(last device path from previous step)
Mouse cursor position:
Code:
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):
http://imageshack.us/g/1/10340612/
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)
RAM: 1GB DDR3
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)

Issues:
- 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 libcurl.so 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 libcurl.zip and put it on sdcard in Android device
2. Run terminal emulator (or adb shell from PC) and execute these commands:
Code:
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/libcurl.so.5.3.0 ./
root@android:/system/lib # busybox ln -sf libcurl.so.5.3.0 libcurl.so.5
root@android:/system/lib # busybox ln -sf libcurl.so.5.3.0 libcurl.so
root@android:/system/lib # busybox chmod 644 libcurl.so*
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.


Attached Files
.zip   libcurl.zip (Size: 150.94 KB / Downloads: 22)
Reply

#22
One of the most awesome replies since ages here on the forum! Thank you very much for sharing this! Smile
[Image: 561.png]
"One should strive to achieve; not sit in bitter regret."
Reply

#23
Thank you xeros writing all that up it was very helpful information my USB-OTG wasn't reading my keyboard by default but play soon. You posted this recently after I received a Quantum Axis tablet (which is x15 ARM Dual Core 1.2GHz and the Mali-400 GPU you mention). Those are the kind clear concise instructions we need. Playing with another device, this MK908 quad-core but as you noted, we're not multi-threaded so it's not a huge benefit in either the cases.

keep up the great work Smile
Reply

#24
Thank you CuBe0wL & -z- !
You've inspired me to try to do something useful with my tablet :-)
-z- most of the work was started by you :-)
and I can't wait for info from you how it works on Cortex A15!
Edit: Oh, it's x15, not Cortex A15 as I thought.

Btw. I have added info about libcurl at the and of howto and added libcurl in attachment.
Now Xonotic is able to download paks, maps & textures from servers when joining multiplayer servers using additional maps/data.
I have sent e-mail to QI4A developer with libcurl to include it with game (to not need to install it in /system/lib), but I haven't got reply, yet.
Reply

#25
(10-09-2013, 01:47 PM)xeros Wrote: Btw. I have added info about libcurl at the and of howto and added libcurl in attachment.
Now Xonotic is able to download paks, maps & textures from servers when joining multiplayer servers using additional maps/data.
I have sent e-mail to QI4A developer with libcurl to include it with game (to not need to install it in /system/lib), but I haven't got reply, yet.

Excellent! Thank you very much. I noticed some textures were missing but I didn't make the connection to curl at the time, I just figured I screwed up something with the [Nexuiz] data directory.

Also, very kind of you to follow up with the QI4A developer.


I tried playing online and it was a little choppy but it's surprisingly smooth locally. I get random crashes with different maps but haven't invested too much time into figuring out what's causing this.

By the way, does your config.cfg get overwritten on every start of the app?

Keep us updated. I love to see this progress into a more adoptable app for end-users.

As I stated earlier, I plan to test on other Android devices I have and gauge performance. I plan on picking up a cheap quad-core tablet in the next week or so.

Thanks again for your efforts, it helps to divide and conquer.
Reply



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

Forum Jump:


Users browsing this thread:
2 Guest(s)

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