July 2024
- Hello World!
-
I began looking at VR this month, as I'd acquired a Meta Quest 3 headset. I already owned the original release
model of the Oculus rift, but I thought I was about due for an upgrade, and getting it made me want to fuck
about with it.
-
So I finally decided to try Godot, after resisting it for a couple of years. I was pleased to see XR support.
For anyone who doesn't know, XR is the overarch of VR, AR, and mixed reality. It makes sense if you think about
it; real-time controller tracking is itself a mixed reality application, so there can effectively be no VR
without MR. With Meta and a few other headsets also slapping cameras on the front of their headsets and allowing
passthrough, the entire apparatus is combined, and so cross reality is a thing.
-
Writing in Godot is interesting. My sum total of programming "experience" lies in C, C++, C#, and assembly (NES).
Setting aside ASM, it's all decisively C inspired. Even though I didn't know PHP, even writing a bit of code
for this website wasn't that difficult, since PHP's syntax is very C flavoured.
-
Meanwhile, at the starter level with Godot, you use GDScript. That's what all the tutorials are written in (
although you can use C# too, and apparently even C++ with some plugins), and apparently it's syntactically most
similar to Python, which I have no experience with.
-
Despite that, it's not that tricky to use. It's mostly logical. Not unpleasant.
-
Anyway, as of version 4.2, Godot has inbuilt mechanisms for XR projects, and Godot with Bastiaan Olij have
whipped up the XR Tools
toolkit, which makes it significantly easier to get to grips with things.
-
I haven't gotten very much done this month, since I was dusting off this website and refactoring 2 year old PHP,
but I started off by just getting a project up and running. And then getting it up and running. And then getting
it up and running. Yep, I restarted it several times.
-
The reason I stumbled at the start was because I was trying to get it so that I could disable XR control and
move in the normal way for a 3D game. This is necessary because anything I write I'm going to want to test, and
it's going to be a pain if I have to constantly put on and take off the headset for iterative testing on objects
that are unrelated to VR.
-
Here's a video of the non-VR player controller and two screenshots. Stuff that was immediately deprecated, though
it's not wasted work, since it's informed how I'm going to implement some things.
The test level in Godot's scene view
Got it booting up in VR!
Non-VR player controller moving around the test level. Sorry for low quality, I had to redownload from discord DMs after deleting the original recording.
-
The reason that the work is deprecated, is because the requirements for getting XR movement and non-XR movement
(which I'll henceforth refer to as "basic" movement - same for the camera, XR vs basic camera) to work are
rather distinct. For starters, XR input doesn't use the same input map as basic movement, because it needs to
meet the criteria of OpenXR, so it's not quite as easy as just handing off to another function in the same
script. Movement itself is different; the player's position might not actually be where you think it is, because
in addition to moving via sticks, they can also walk around their room. It's a very complex problem, it seems,
one I'm underequipped to handle, so rather than trying to square the circle by combining the systems, I'm going
for an approach where I determine that we have switched to basic mode, and quickly reparent the camera, deactivate
XR input, and activate my basic input scripts.
-
In terms of plans for a game, I have a bunch of ideas. Nothing ridiculously complex, but what I make is going to
serve as a base for the next project, whatever that happens to be. I'll have to have a think.
-
Hopefully I'll have more to show for my efforts next month. Now that the website is up and running, I'll be able
to focus on working this stuff out.
Written 27th of July 2024



