Page 1 of 1

Performance while running the game on Android phone

Posted: Mon Nov 09, 2020 8:02 pm
by PolakPL2002
First of all I'd like to clarify that I tried this only to see if I will be able to even get in-game, I wasn't expecting it to be anything near playable.

If anyone has ever wondered after reading FFF-132 whether it is possible to run latest release of Factorio (1.0.0 at the time of writing) on Android phone, then the answer is yes, BUT... It is possible to RUN the game, not to PLAY the game. The performance is really poor and it is unplayable.

It took almost 2 hours for the game to load all of its data. I include screenshot of debug info if anyone is interested in exactly how bad an idea running PC games on phones is (unless the game is recompiled of course).
Screenshot while in-game
Screenshot while in-game
Performance.png (1.3 MiB) Viewed 12369 times
Testing setup:
Xiaomi Mi 9 (Snapdragon 855)
Android 10
Termux app, then QEMU to emulate x86_64 architecture, then Debian and Factorio, and finally VNC client to access virtual display.
Virtual display resolution was 1280x720.

QEMU command line used:

Code: Select all

./qemu-system-x86_64 -boot order=c -m 2048 -hda debian.img -usb -device usb-tablet -vnc 0.0.0.0:0 -smp 4
I'd like to say again that I was not expecting the game to run smoothly or anything. Even if it did how would I be supposed to play it with touchscreen only? I can plug in mouse and keyboard, but then it's probably easier to just take a laptop in such case.

PS. The screenshot was taken on PC, I was connected using VNC to qemu running on the phone.

Re: Performance while running the game on Android phone

Posted: Mon Nov 09, 2020 8:20 pm
by Jap2.0
I mean, at this rate it might be almost playable emulated on ARM in a few years. Under half the startup time and 11.6 UPS higher than a Raspberry Pi 5 years ago (ref). I wonder when we'll break the 0 FPS ceiling.

I'm curious how it would perform compiled natively for ARM linux, but I doubt we'll be seeing that any time soon.

Re: Performance while running the game on Android phone

Posted: Mon Nov 09, 2020 9:06 pm
by quinor
Well, to be honest, if a motivated enough individual with some reputation in the community would ask, they probably could get the source access (I've heard that some people did already) and try compiling it for ARM. I recall that devs spoke about some issues with the graphics pipeline (opengl?) not being fully available on ARM targets though. Anyone can find a link to that?

Re: Performance while running the game on Android phone

Posted: Mon Nov 09, 2020 9:36 pm
by Jap2.0
Fair point, there are a decent handful with source access. I'm not sure to what extent there are issues compiling/getting it to run, I seem to think that most of the hesitancy was desyncs/not wanting to support it, which wouldn't inhibit at least trying it. I'm not recalling anything about graphics off the top of my head - I know that for a while the Raspberry Pi had terrible graphics drivers, but I think generic ARM has decent enough OS/driver support.

Re: Performance while running the game on Android phone

Posted: Mon Nov 09, 2020 10:08 pm
by Koub
quinor wrote: Mon Nov 09, 2020 9:06 pm Anyone can find a link to that?
This post would be a good start to look for that. Tip : Explore the links :)

Re: Performance while running the game on Android phone

Posted: Thu Nov 19, 2020 7:46 am
by ssilk
If wube would like to get really rich, they would hire two to four android/iOS developers. :D 8-)

Re: Performance while running the game on Android phone

Posted: Thu Nov 19, 2020 8:15 am
by MEOWMI
Is the CPU instruction architecture literally incompatible?

Anyway, nice render performance... I wonder why that's so slow. Is it software rendering everything?

Re: Performance while running the game on Android phone

Posted: Thu Nov 19, 2020 1:41 pm
by Amarula
Definitely plan to load Factorio when I get my new Linux phone...
https://puri.sm/products/librem-5/

Re: Performance while running the game on Android phone

Posted: Thu Nov 19, 2020 1:57 pm
by TheoMarque
VNC transmission is CPU consuming, but I like your exploration.

Anyone run Factorio on alpine linux?

Re: Performance while running the game on Android phone

Posted: Fri Nov 20, 2020 3:03 am
by ptx0
use Rosetta2 :-P

Re: Performance while running the game on Android phone

Posted: Fri Nov 20, 2020 7:01 pm
by PunkSkeleton
It seems to mainly be a problem with rendering, probably the emulator does not use phone GPU at all. As for UPS 11 is not that bad IMO for emulation of very complex instruction set that has been evolving for like 40 years.

Re: Performance while running the game on Android phone

Posted: Sat Nov 21, 2020 4:40 am
by ptx0
PunkSkeleton wrote: Fri Nov 20, 2020 7:01 pm It seems to mainly be a problem with rendering, probably the emulator does not use phone GPU at all. As for UPS 11 is not that bad IMO for emulation of very complex instruction set that has been evolving for like 40 years.
this is a really good point. @OP can you run a benchmark using ./factorio --benchmark and this will eliminate GUI and give a UPS idea? because then you can run your map in your pocket and have it produce resources on the go, then connect to server from laptop and save map. genius.