First experience writing code in VR (SimulaVR + Valve Index on Ubuntu SteamVR)

Jacob David C. Cunningham
5 min readFeb 24, 2022

Disclaimer: I am a consumer/pre-ordered a device, just blindly trying out their software. I am a noob.

Earlier today on HN the Simula One was posted for pre-orders a Portable Linux VR Computer. This thing has way better graphics than what I have currently and it has the computer onboard… as a plus, there’s no vendor lock in/personal data, stuff like that.

Anyway I had been aware of this concept, people writing code in VR and I was skeptical about it because in my experience the resolution is not that great, but today I wrote a basic web app using SimulaVR and my Valve Index. It was pretty good as is, and will only get better.

What is it

Simula is a Linux VR desktop. So you can spawn many windows around you and look in a sphere/any direction you can/want to. The Simula One is actual hardware that’s in development/pre-order stage.

This is what you’re here for

I tried to truncate this down as much as I can although it’s still me/my video, not meant for the masses.

I do want to point out I was super tired in this video, this was a 32-hr reset your sleep pattern day for me towards the end of it.

More recent video (used screen recording)

Original video below

Quick updates

This is only for anyone that reads my stuff (ha). I am kind of all over the place but just wanted to post some quick deets. February will end soon, hopefully that means I will get the Pinephone Pro soon. I’ve been pretty busy with my day job and also had a little funk too (not very productive). But I am generally making progress on stuff… I want to finish the Twerk Lidar Robot project and also do the Pinephone Pro before I do anything else like receiving the Simula One which I’m not sure when that’ll be but I can prepare for it by getting used to/enjoying this VR workplace experience.

Piece of art

I was finally able to make sense of the pan-tilt ToF samples in order to plot the mesh in 3D space for the future ray-polygon intersection checking. I will in theory reduce this so it’s not as complex, it is complex because the angle/pan is pulled incrementally from the IMU as it moves. Pitch was not as good and in that case I just used external fixed measurements.

Each of these cheap cryptocurrencies started with $55

I also recently was like “hey I’ll make another automated crypto trading app” and surprise surprise it’s lost like 30% of it’s initial value. Initially when I started this say 2 weeks ago, the market was on an upward trend, this thing’s “algo” is basic eg. buy, hold until it rises 2% in value… that was working. Until now… anyway I made that repo public recently, it’s raw/shows my failures, I’m not going to post more about it.

Back to this content

So yes, I came at this Simula stuff completely blind. I mean I didn’t even realize it’s meant to specifically only run on Linux. I primarily use Windows (games) but I also use Ubuntu heavily and MacOS. But, my drive was full and I had to make space/get a primary Ubuntu OS running (so I can use my GPU and all that natively). I had some dumb problems like not having a proper boot loader, trying to use the 5400 RPM HDD… and then when I almost had it, I had to get help from them on their Discord support channel and thankfully they helped me immediately and got me on my way.

I recorded the video above. It is pretty damn good as is. It will improve with hardware as far as resolution goes, I mean I’m not really complaining there for the Index but it does have this blurry text issue if you don’t look at it head on/just right. This could be a special case on my part, although I’m near sighted. Anyway I was able to write code in this environment and I still have to get used to the commands to do things, but this is a cool starting point. By that I mean something I could personally hack on, that’s not so foreign. I have not touched Godot/Haskell yet but with this app there’s a reason to get into it and I plan on doing that.

Problems

My setup is a 3060Ti and I had problems getting the GPU to work even as a basic display device. I got Steam installed and Steam VR then I got the Simula software setup (needs 20GB+ on its own of storage) my first partition was only 40GB and I ran out… ended up using a 74GB partition which was plenty/left extra space can’t recall like 30GB or something. But yeah, after all this nix stuff downloads it just runs. I had to use the SteamVR launcher thing in this config file as I had OpenXR and it wasn’t working, that’s what they helped me with.

To fix the GPU issue where it wasn’t even showing anything/no display, I found this answer on Ask Ubuntu which I ran and it worked thankfully.

Update: I set this up for 1050ti too hopefully it works well enough but anyway I had same problems eg. 307. I did the PPA change above first, not working, tried xrandr, that turned on the monitor/extended it. Then I did the Vulkan JSON disable fix, nothing yet, then I restarted and everything worked… I also installed the driver on here.

That’s what will be a nice about a VR from the get go headset hopefully none of these problems.

Making a basic calculator

The “real world scenario”

This is a basic calculator app that I wanted to test myself on making. It’s something I know generally how to do/expected to complete in say 10 minutes but that did not happen because I was fumbling around/new to the UI. Also I was filming myself.

But I did code with VS Code and used Chrome to render the web app in. I have to adjust my work area because I was at the edge of the boundary detection (base tower things) so you’d get these flashes warning you, you’re running out of room.

Final thoughts

Yeah this is cool technology. I did the 50% up front pre-order and I look forward to it. There’s just something trippy about writing code on the salt lake flats… that’s the default environment I was using/reminded me of.

Side note: I am aware of what’s going on with Ukraine/Russia right now, it’ll be interesting if it stays as is/does not get worse, or gets really worse.

--

--