space-wizards / RobustToolbox

Robust multiplayer game engine, used by Space Station 14
https://spacestation14.io
Other
547 stars 408 forks source link

Make client work on ARM #1443

Open PJB3005 opened 3 years ago

PJB3005 commented 3 years ago

Should only require compiling native libraries for ARM and otherwise be good, but who knows what might crop up.

Yes, ideally on all OSes (Linux, Windows, macOS).

VasilisThePikachu commented 1 year ago

I did manage to compile and run 14 on the nintendo switch running ubuntu 18.04

Unless box86 was doing something in the background all i needed to do is compile glsl and drop it in with the client (zstd too since 18.04 had an old ass version). I could not see any wierd graphics or audio bugs, it just seemed to work. Granted im unsure of the performance since a nintendo switch is not that powerful.

I may try connecting to a wizard server if i can figure out how to do authentication to do a better test and record it.

Edit: wrote this from memory in case its useful ig https://hackmd.io/@VasilisTheChu/Switch_ss14, trying to figure out auth

K it works https://youtu.be/HhWI7AO5Co4

rene-descartes2021 commented 8 months ago

Yes had to compile some native libraries.

Looks like the Nintendo Switch has 4GB RAM. On my 3GB device the OS's preemptive out-of-memory-killer kills the client maybe a dozen seconds after this in the log:

[DEBG] res.mod: Verified assemblies in 10662ms
[DEBG] res.mod: Loading module: '/Assemblies/Content.Shared.Database.dll'
[DEBG] res.mod: Loading module: '/Assemblies/Content.Shared.dll'
[DEBG] res.mod: Loading module: '/Assemblies/Content.Client.dll'
[DEBG] res.mod: DONE loading modules: 00:00:14.4233486
[DEBG] res.preload: Preloading textures...
[DEBG] res.preload: Preloaded 659 textures (0 errored) in 00:00:20.1403734

Client seems to reach around 1.1-1.3GB RAM/swap usage just prior (my guess reading top output). OS uses around 1.2GB, and X server & environment stuff around 350MB. Can't add more swap due to permissions.

Uses GLES2 as expected, here is first part of the log:

[DEBG] root: OS: Debian GNU/Linux 12 (bookworm) Arm64
[DEBG] root: .NET Runtime: .NET 8.0.1 linux-arm64
[DEBG] root: Server GC: False
[DEBG] root: Processor: 4x Unknown processor model
[DEBG] root: Architecture: Arm64
[DEBG] root: Robust Version: 210.0.3.0
[DEBG] root: Compile Options: DEVELOPMENT;RELEASE;EXCEPTION_TOLERANCE
[DEBG] root: Intrinsics: AdvSimd;ArmAes;ArmBase;Crc32;Sha1;Sha256
[DEBG] clyde.win: GLFW initialized, version: 3.3.8 X11 GLX EGL OSMesa clock_gettime evdev shared.
[ERRO] clyde.win.glfw: GLFW Error: [VersionUnavailable] GLX: Failed to create context: GLXBadFBConfig
[DEBG] clyde.win: OpenGL GL33 unsupported: [VersionUnavailable]: GLX: Failed to create context: GLXBadFBConfig
[ERRO] clyde.win.glfw: GLFW Error: [VersionUnavailable] GLX: Failed to create context: GLXBadFBConfig
[DEBG] clyde.win: OpenGL GL31 unsupported: [VersionUnavailable]: GLX: Failed to create context: GLXBadFBConfig
[ERRO] clyde.win.glfw: GLFW Error: [VersionUnavailable] GLX: Failed to create context: GLXBadFBConfig
[DEBG] clyde.win: OpenGL GLES3 unsupported: [VersionUnavailable]: GLX: Failed to create context: GLXBadFBConfig
[DEBG] clyde.ogl: OpenGL Vendor: Mesa/X.org
[DEBG] clyde.ogl: OpenGL Renderer: virgl (PowerVR Rogue GE8300)
[DEBG] clyde.ogl: OpenGL Version: OpenGL ES 2.0 Mesa 22.3.6

I will try a different environment without the XServer and other stuff to see if it'd work well on this device with 3GB RAM. Or something...

VasilisThePikachu commented 8 months ago

tbh i have not managed to run the game on net8 yet. it compiles but crashes for me with no feedback. Yet again I did not try hard to make it run as I just wanted to launch it for a meme