Remember my proof concept to read IMU data of my glasses to ?

hodasemi wrote a connector based on the idea that works without : https://github.com/hodasemi/xr_to_opentrack_rs – comes with a systemd service file so it can run in the background.

Once installed the only step left to do is fire up OpenTrack 🤘😄🤘

So I was asked if my head tracking approach of reading the IMU data from my Viture Pro to OpenTrack and SBS (side-by-side) mode with ReShade would also work with StarCitizen.

Guess it does 🤷

Pick your poison to watch the video: https://www.youtube.com/watch?v=rWUC2Y3TRh4 / https://makertube.net/w/8L7gVN8NnLvjhQCPGNmd6W

I start Star Citizen via Lutris (and not with Steam), which requires slightly different settings once ReShade is installed:

Enable Gamescope: ON
Output Resolution: "3840x1080"
Game Resolution: "3840x2160" (set this also ingame!)
Custom Settings: "--scaler stretch"

Can this get you banned? Who knows 🤷 Jury is still out on this. Do I care? Nope. I won’t miss my puny starter pack.

YMMV.

The proof of concept code to read the IMU data can be found at https://github.com/bekopharm/xr_to_opentrack (pending changes).

It works with the Breezy GNOME xr_driver: https://github.com/wheaney/breezy-desktop (but the Vulkan one works probably too but that’s untested). It should also be compatible with other glasses that have IMU for Breezy available.

There is an unlisted SBS version of this video linked in the description. You will need XR glasses that do FULL SBS though to watch it!

Until now I used OpenTrack with my DIY IR tracker or the Neuralnet tracker. I knew that my XR glasses feature IMU data though and the xr_driver of the Breezy Desktop project allows to access the data via IPC on Linux PC. So I did what Linux user do: I wrote a script to access the IMU data and forwarded it via UDP to OpenTrack:

Pick your poison to watch the video: https://www.youtube.com/watch?v=njuumLUvqrM / https://makertube.net/w/2bNyxJhdyydTeFq17onikv

This reminded me that I also wrote a proof of concept to implement the FaceTrackNoIR (or OpenTrack) protocol into FreeSpace 2 Open on Linux PC ( https://makertube.net/w/7VtfAjW7EiAUS5aiPwG7if ) so I gave it a spin to test the data bridge. That was smooth sailing!

The mod is Diaspora: Shattered Armistice, still awesome today: http://diaspora.hard-light.net/ (Warning: This may fuel a desire to re-watch the BSG series again 😀).

The bridge code can be found at https://github.com/bekopharm/xr_to_opentrack (pending changes).

It works with the Breezy GNOME xr_driver: https://github.com/wheaney/breezy-desktop (but the Vulkan one works probably too but that’s untested). It should also be compatible with other glasses that have IMU for Breezy available.

Update: hodasemi wrote a Rust connector based on the idea that works without Breezy: https://github.com/hodasemi/xr_to_opentrack_rs – comes with a systemd service file so it can run in the background. Once installed the only step left to do is fire up OpenTrack 🤘

It has been a while that I tried . With the new Tracker plugin (AI haha) for we get head tracking without annoying IR LEDs or reflecting stripes just by reading the webcam video feed. This is apparently fast enough to try without a dedicated nowadays. And all that on a PC. Took some fiddling but the concept still works. What a time to be alive.

Demo: https://makertube.net/w/groS1wpAhP8XYE75vJwX32

HowTo: https://simpit.dev/systems/opentrack/

I had the chance to play Flight Of Nova (https://flight-of-nova.com/) for the first time today. This was on my wishlist for quite some time now. Dived in blind and had no idea what to expect. 3 tutorial missions later: Oh boy… this is hard. I can see myself sinking many hours in this.

Anyway, as usual, my focus is on interfacing with my home cockpit (or simpit) and while there is no ship telemetry [yet?] I was able to get it running just fine via Proton and with my DIY headtracker using OpenTrack. Hats off, seldom that I see a game that detects my joystick just fine, has great ingame calibration, offers me a windowed mode and a bunch of ultra width resolutions without having to resort to hacking config files or use gamescope to resize it ❤️

Head tracking is, as usual, TrackIR only so far (I guess the native Linux PC version does not have UDP in place here but I couldn’t check due Steam refusing to download another version today). Anyway, you can see me fooling around with the buttons and do an A+ crash landing in the end – sunny side up 😆 Not too shabby considering that this was my 3rd landing at all.

Pick your poison: https://www.youtube.com/watch?v=r2A_uVbUKWU / https://tube.tchncs.de/w/iV21V6EZxNCTsC8bvsCQDt

Yes, does only support one gamepad. Single digit. This gamer doesn’t care. Here have and in . Vanilla. No mods. Thanks , and ❤️

Mebbe I’ll do a proper recording someday:

No Man’s Sky with headtracking and HOTAS (on Linux PC)

Wondering about that button box? Didn’t use it in this demo but you can find plenty more examples on the channel and more details on my blog: https://beko.famkos.net/category/simpit/

How it’s done? NMS does support a gamepad but it also reads/maps all gamepads to a single device. It makes no difference between multiple gamepads!

This leaves me with a very limited amount of possible buttons on the HOTAS after mapping that to one virtual gamepad using MoltenGamepad (I usually split that one up into multiple gamepads for braindead games).

So for additional buttons I used AntiMicroX to map the rest as keyboard presses.

Doing so I noticed that NMS does “look-around” on the right stick and this is where OpenTrack comes into the play. It offers a joystick output (using evdev) and that is also just… a gamepad! Needs some remapping though to get pitch and jaw to the proper axis for NMS. This is done via SDL env (basically what Steam does under the hood but boy their GUI for that sucks): SDL_GAMECONTROLLERCONFIG="000022e86f70656e747261636b206800,opentrack-to-nms,rightx:a3,righty:a4,platform:Linux,crc:e822,"

And there you have it. NMS with my trusty old X52 Pro and a DIY headtracker for 5 bucks 🤓

PS: I’m aware that the recording quality sucks. This was very spontaneous with a webcam sitting on my chair. I basically just finished my happy dance that this started working properly and decided to smash that recording button. PC was not even in “gamemode”.

I usually play on Linux PC. I switched to Proton because I was eager to see some upcoming changes, like support, on the public_beta branch. And while this works[1] I was once more flabbergasted how complicated it is to set my desired display resolution of 5760×1200. I’m using a multihead setup with several displays and as usual the game engine would not let me _simply_ set that. Even in windowed mode (I mean I get that this won’t work with fullscreen).

There are several ways to work around this, especially with Proton, but I was looking for the prefs file I know from Linux. I found it in the end in the file compatdata/1781750/pfx/user.reg (that’s like the Windows registry but as plain file read by Wine) where the values are stored as dword under [Software\\StarGoat\\FlyDangerous]. In hex.

"Screenmanager Resolution Height_h2627697771"=dword:000004b0
"Screenmanager Resolution Width_h182942802"=dword:00001680
"Screenmanager Resolution Use Native_h1405027254"=dword:00000000

So 0780 and 04b0 are in the end 5760 and 1200. And sure enough, on the next game start I get _my_ desired resolution:

Sadly when I change settings in the game this gets overwritten again – so keep a backup around and drop it in again. This may even be added to a script – let’s see how long until this gets on my nerves and I automate that.

For the interested: This is how the same thing looks on the native version in the file ~/.config/unity3d/StarGoat/FlyDangerous/prefs

<pref name="Screenmanager Resolution Height" type="int">1200</pref>
<pref name="Screenmanager Resolution Width" type="int">5760</pref>
<pref name="Screenmanager Resolution Use Native" type="int">0</pref>

Why games|engines in 2023 still seem to have ideas about screen layouts is frankly beyond me.

Update: really eases the pain here as well. See also https://SimPit.dev/games/fly-dangerous/ how to use that with Steam.

[1] Headtracker quick test recordings: https://www.youtube.com/watch?v=13L0GlQyf_Q / https://tube.tchncs.de/w/fTYSUc9fTBmnTLHp2fpW4n

The last update has been a while. I focused my attention to the MFDs (Multi-function display). This part didn’t get much attention yet and I was caught between the difficult choice to learn yet another fancy framework, like Raylib, that would do OpenGL ES 2.0 without X11 on the Raspberry – or just throw the might of my CoffeeLake at it and go with ReactJS since most of the data was already available via NodeRED anyway. Also… ARWES is just so cool 🤩

I went with ReactJS and ARWES again, simply because I have some experience in this by know thanks to my Streaming Overlay I wrote with it. Hobbling it up to NodeRED was just a matter of installing SocketIO to transport the messages. It’s all a very hacky mess but it gets the job done.

Video demonstration of my simulated cockpit made from cardboard on a budget mainly used to play Elite Dangerous in early 2022. This is work in progress.

While seeking through the available data I noticed that I don’t get velocity values from Elite. That’s not so important in space but _kinda_ interesting for me in planetary flight to satisfy the flight sim gamer in me as well. I noticed tho that I do get timestamped latitude, longitude and altitude values so shouldn’t it be possible to “simply” calculate this, right? Right?

This was when I dived into the rabbit hole of calculating velocity and heading on planetary objects using a spherical coordinate system and while I didn’t nail it exactly how Elite does it the result is close enough. The game provides the required data to go crazy here – most important the radius of the current object. In _theory_ I could start writing some primitive AFS (Auto Flight System) routines now, which I’m totally going to explore at some point in the future just because 🤓

Checking my maths – yes, altitude is added to the mix so velocity is mostly correct as long as no rapid course changes are made

After spending way too much time with this and the Pythagorean theorem (Yes mum, a game made me do maths. MATHS! 🤯) I settled with some calculations and data for my current ship to the right and targeted ship data on the left. This is sort of tricky because many game events update different parts of the data so timestamps have to be kept in mind and a game specific parsing strategy is required. See the last part of the demonstration video to get an idea how this looks.

Improving situational awareness by putting the video feed of wingman / gunner on the central MFD.

Another point to tick off my list was getting the head tracking to work in Elite (again). Now this is very Linux PC specific so you may tune out on this paragraph. On Linux PC I’d usually compile Opentrack with the Wine Glue, patch in my appdata dir for Proton and hope that it’s still ABI compliant to Just work™. Alas recent Proton is sandboxed within pressure vessel and the usual approach of memory mapping is simply no longer working, if I got the gist of this right.

So my _current_ strategy is to download and drop the Windows build of Opentrack into the game folder and chain-load the EXE with the game where the Opentrack EXE would listen on UDP while my native Opentrack BIN would send via UDP. A task not made easy with Proton but it is possible. The following snippet may give you some pointers:

#!/bin/bash
export STEAM_COMPAT_DATA_PATH=/games/steam/steamapps/compatdata/359320
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam/steam"
python3 /games/steam/steamapps/common/Proton\ -\ Experimental/proton run opentrack.exe

Why running Opentrack twice? The native build performs a lot better with my webcam and every frame really count here. Reading data via UDP is not much of a burden for Proton. This also saves me the trouble of fiddling with Wine Glue, a painful compile process nobody should endure involving installation of many many additional 32bit libraries. Hilarious but it works.

Behind the scenes recording so you get the idea of the setup followed by some Star Citizen gameplay:

DIY headtracker and Simpit and Star Citizen gameplay (on Linux PC)

In use:

* A Linux PC
* A DIY Headtracker
* A DIY Joystick “Primary Buffer Panel
* A X52 Pro HOTAS
* 3 Cameras + Recording Software
* An AMD RX5600XT in tears
* …a Beko learning How To Fly in SC xD

So you _still_ think you can’t space pew pew on Linux PC? Think again. I do it all the time: https://beko.famkos.net/2021/10/16/space-pew-pew-on-linux-pc/

Updated: This content is obsolete. Two years later I rebuilt the cardboard version with something more sturdy and raised a dedicated project website describing the builds: SimPit.dev