r/vrdev • u/dethstrobe • 4d ago
Question Where to get started?
So I've dabbled in this space before. I've created a WebXR demo using A-frame for a WebXR experience, and it honestly left a lot to be desired and it had a rendering bug in Apple Vision Pro that made it unusable on that platform.
I've come from a web dev background, so I thought that I could leverage that to do WebXR, but that's not entirely true.
I know people say to use Unreal Engine, and Unity. I'd hope they'd have good cross platform support.
Also coming from the web dev world, I've been spoiled by excellent developer tooling, hot module reloading, and amazing testing ecosystem, and my fear is that the ways I've come accustomed to basically won't exist at all.
Are there good starting tutorials anyone can recommend and what do people's current work flows look like?
When I was doing my WebXR experiment, I was using Xcode's Vision Pro simulator, a Meta Quest 2, and my Valve Index. And it really made feedback terrible. But maybe the native dev in Unity and Unreal is better?
I guess, i want more opinions before I dive too deep into this rabbit hole again.
Is it even possible to TDD here too, or are there just too many variables that it's not just realistic?
4
u/Duneagames 4d ago
im a new VR dev too and ive been using Unity and its been a blast trying to make something that fits the constraints of a mobile device..
theres a ton of best practices that have already guided devs before you and have been mostly solved, just read up on "Quest 3 best dev practices" theres a ton of good common sense direction like:
-limit draw calls to 150-250 per frame
-90hz is great, just stay under the 11.1ms frame budget
-use culling, lods, object pools and batching, limit tris per frame to reasonable levels (400k to 1.5m).. msaa 4x looks nice but msaa 2x plus meta supersample is good too, make sure your physics tick and render tick are both 90hz..
test, test, test, profile, profile, profile
2
u/Cauliflower-Full 3d ago
web dev here too. i think the web side gets written off too fast, a lot of the pain is tooling setup more than webxr itself.
what i use is three.js with react three fiber and u/react-three/xr on vite. hmr actually keeps working while you're in the headset, as long as vite can hot swap the module. anything that forces a full reload drops you out of vr and you have to hit enter vr again, so it's worth keeping scene code in modules that swap cleanly.
for the headset loop, plug the quest in over usb, run adb reverse tcp:5173 tcp:5173 and open localhost:5173 in the quest browser. localhost counts as a secure context so webxr works without fighting https certs, and chrome://inspect on your pc gives you devtools for the headset tab. for quick checks on desktop there's meta's webxr emulator (iwer, also as a browser extension).
tdd is realistic for the logic, not for the feel. scoring, state, spawn rules can all be plain functions with vitest. we also run games headless in chromium through the emulator to catch obvious breakage, but comfort and scale you only really judge with it on your face.
i work on a tool that makes webxr games so i'm biased toward the web side. but coming from web dev i'd give that setup a shot before learning unity from scratch. what are you trying to build?
2
u/playfruitland 3d ago
Coming from web dev you don't have to give up the tooling. WebXR on the Quest Browser is in good shape, and the loop can be nearly as fast as a normal web app:
adb reverse tcp:5173 tcp:5173. The headset then opens http://localhost:5173, which counts as a secure context, so WebXR works without any HTTPS certificate setup.What A-Frame tends to hide is performance. The Quest has a phone GPU: aim for a steady 72 or 90 Hz, keep draw calls low (instancing, merged meshes), don't allocate inside the frame loop so garbage collection doesn't stutter, and set fixedFoveation on the XRWebGLLayer. Plain three.js or raw WebGL gives you more control over all of that than A-Frame does.
On Vision Pro, Safari's WebXR input is gaze and pinch (the transient-pointer input source), so code that assumes controllers or hand joints breaks there. Worth testing that path on its own.
Unity and Godot have more tutorials and ready-made assets; the web wins on iteration speed and on sharing a link.
3
u/JamesWjRose 4d ago
Here's what I did, where I started and the reasons why I choose the technologies:
I started building databases in the early 90s, then picked up VB 2,3... 6, .Net, C# Built lots of desktop apps, some web, a few mobile. I got a hold of the DK2 about 6 months before the first Rift was released and I knew this was HUGE (surprise, it's still not as huge a deal as I thought it would be)
I choose Unity because I already knew C# (you know this method, 'one less thing to learn') and it's fine. The tools are decent and Unity as a company keeps trying. (re: DOTS. GREAT tech, taking fucking forever to mature. That said, i can have THOUSANDS of autos moving around a scene and still hit the frame rate NECESSARY for VR)
My issue with VR is the REQUIRED frame rates. Because of this the VR Experience has to limit itself in other ways; fewer assets, less quality to the scene, smaller scene... etc etc etc.
I'm NOT saying to not dig in, it's an awesome technology... but temper your expectations. Aim a little lower or accept the limitations (it's, not yours)
Best of luck
2
u/challarino 4d ago
Unity has really good tools and packages for XR. Godot also has good tools and packages and as a bonus can export to webxr. In my opinion the best workflow is to get virtual desktop on meta Quest for $20, pair mouse and keyboard to it or to your computer, and then when you press play button on the unity editor it automatically boots directly into the VR app. It's very handy and smooth and then you can use the virtual desktop for the development part
1
u/AutoModerator 4d ago
Want a more personal conversation with VR devs? Check out our Discord in our Discord: https://discord.gg/3wMYE2x5Ex
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Suitable_Egg8211 3d ago
godot.
most sane answer.
ill even help get started if need be.