Live data from Hacker News

The HTTP of VR

roderickkennedy.com

31–40 of 75 posts

Re: The HTTP of VR

#31
post #9

Nothing in the blog posting suggests to me you can't use HTTP and Websockets for VR. The understanding of HTTP in the blog posting seems to be rooted in the early 2000s. I don't think the author has much experience in protocol design (it is harder than it looks). It would be more productive to define a layer on top of HTTP/2 so we can leverage a lot of code that already works, rather than having to spend 10-15 years…

WebSockets are not an appropriate medium for VR in the most common use case today: real-time video games. Even if you're not building a video game today and want to do something other-VR esque, I guarantee that you will inevitably end up recreating something the video game industry has done in the last 22-23 years. Everything real-time the author of this article suggests is in the realm of something you would want fo…

> I seriously feel bad for kids today. You have what, Fortnite, Minecraft, and Roblox to play and that's it? Too many micro transactions and low quality games.

Yes, those are the only 3 video games.

Re: The HTTP of VR

#32
Networking for multiplayer games is a super interesting problem space since games tend to be more sensitive to latency, packet loss, and the accuracy of game states between clients. The problems are even more pronounced in VR where noticeable latency or artifacts can cause motion sickness.

In modern fighter games, the industry seems to be tending toward predictive lockstep networking. This is a type of networking where if the client doesn't receive the inputs of other clients from the server, it will "predict" those inputs (usually by replaying the last received input) to give the illusion of zero latency gameplay. The drawback being that you need to implement rollback in the case where the predicted input doesn't match the real received input. When poorly executed, this could look like jittery player movement with entities rubber banding and teleporting and cause artifacts, but when done properly is mostly unnoticeable.

If you're interested in this domain, I recommend checking out https://www.ggpo.net/ which is the library used in many of the modern fighter games (notably Skullgirls). It also comes with an in depth explanation of how to implement predictive networking with rollback on your own https://drive.google.com/file/d/1cV0fY8e_SC1hIFF5E1rT8XRVRzP...

Re: The HTTP of VR

#33
Since I'm writing a new client, in Rust, for Second Life/Open Simulator, I'm very aware of these issues.

A metaverse client for a high-detail virtual world has most of the problems of an MMO client plus many of the problems of a web browser. First, much of what you're doing is time-sensitive. You have a stream of high-priority events in each direction that have to be dealt with quickly but don't have a high data volume. Then you have a lot of stuff that's less time critical.

The event stream is usually over UDP in the game world. Since you might lose a packet, that's a problem. Most games have "unreliable" packets, which, if lost, are superseded by later packets. ("Where is avatar now" is a typical use.) You'd like to have that stream on a higher quality of service than the others, if only ISPs and routers actually paid attention to that.

Then you have the less-critical stuff, which needs reliability. ("Object X enters world" is a typical use.) I'd use TCP for that, but Second Life has its own not very good UDP-based protocol, with a fixed retransmit timer. Reliable delivery, in-order delivery, no head of line blocking - pick two. TCP chooses the first two, SL's protocol chooses the first and third ones. Out of order delivery after a retransmit can cause avatars to lose clothing items, because the child item arrived before the parent item.

Then you have asset fetching. In Second Life/Open Simulator this is straight HTTP/1. But there are some unusual tricks. Textures are stored in progressive JPEG 2000. It's possible to open a connection and just read a few hundred bytes to get a low-rez version. Then, the client can stop reading for a while, put the low-rez version on screen, and wait to see if there's a need to keep reading, or just close the connection because a higher-rez version is not needed. The poor server has to tolerate a large number of stalled connections. Worse, the actual asset servers on AWS are front-ended by Akamai, which is optimized for browser-type behavior. Requesting an asset from an Akamai cache results in fetching the entire asset from AWS, even if only part of it is needed. There's a suspicion that large numbers of partial reads and stalled reads from clients sometimes causes Akamai's anti-DDOS detection to trip and throttle the data flow.

So those are just some of the issues "the HTTP of VR" must handle. Most are known to MMO designers. The big difference in virtual worlds is there's far more dynamic asset loading. How well that's managed has a strong influence on how consistent the world looks. It has to be constantly re-prioritized as the viewpoint moves.

(Demo, from my own work: https://vimeo.com/user28693218 This shows the client frantically trying to load the textures from the network before the camera gets close. Not all the tricks to make that look good are in this demo.)

It's not an overwhelmingly hard problem, but botch it and you will be laughed off Steam.

Re: The HTTP of VR

#34
post #27

Earlier quoted context omitted.

WebSockets are not an appropriate medium for VR in the most common use case today: real-time video games. Even if you're not building a video game today and want to do something other-VR esque, I guarantee that you will inevitably end up recreating something the video game industry has done in the last 22-23 years. Everything real-time the author of this article suggests is in the realm of something you would want fo…

Unless you need twitch-shooter level ping times in your web app, websockets/TCP is fine. The rendering is client side after all. Nothing about VR rendering would involve the web stack anyhow. Http/3 is UDP. So whats wrong with http exactly?

Just having UDP somewhere in the stack isn't sufficient. The reason game protocols use UDP is because (among other things) they can precisely define when to block on missing data and when to ignore it and keep going.

For example, lets say a client is sent 3 sequential packets, p0, p1, and p2. Sadly, p1 has been dropped by network goblins. What should the client do? Well, that depends on what is in the packets. If p0-2 are messages like "append this value to a list", then it's pretty important for them to all arrive, and in-order. But if p0-2 are sequential updates to the coordinates of something then it doesn't matter if p1 is lost; you get the right final state regardless.

So in the case where you're interacting with something that's continuously moving (like, say, a person in VR) you can essentially never block on transient packet loss because there's always an update coming 10ms later. That's a big deal in terms of making the experience feel fluid.

Re: The HTTP of VR

#35
post #33

Since I'm writing a new client, in Rust, for Second Life/Open Simulator, I'm very aware of these issues. A metaverse client for a high-detail virtual world has most of the problems of an MMO client plus many of the problems of a web browser. First, much of what you're doing is time-sensitive. You have a stream of high-priority events in each direction that have to be dealt with quickly but don't have a high data volu…

This is why I think it's a joke to be building metaverse apps in Unity. Unity and dynamic asset loading are not happy bed fellows.

There's not a lot I liked about Unity when I was working with it full-time a few years ago. But the one thing I could acknowledge that it has that was generally missing from open source web development was the asset pipeline. But dynamic, user-uploaded assets won't be able to use the asset pipeline. So one of the biggest drivers for using Unity goes right out the window.

Re: The HTTP of VR

#36
post #13

What exactly is the "metaverse" supposed to be, other than a marketing term to sell a more expensive class of IO devices? People will not switch over in droves to do their text/image/video editing in VR all of a sudden, because other than a few special design applications, there is no point in doing so...it's slower, clumsier and the input devices are much less precise than mouse&keyboard. Another supposed target dem…

I was thinking about exactly this today! On the right of me I have an oculus quest which I got 2-3 months ago and honestly, it is gathering dust. Just the idea of picking it up and putting it on my face is enough to make me think meh. I did though and I feel like I can't be the only one who finds it really frustrating to the point of making me furious. 1. I started with my eyes at floor level. 2. It moans about a gua…

> completely shit (Skyrim VR etc)

Definitely agree for the vanilla game. Patching it up with a few mods (functioning hands that collide with the environment, ability to smash containers, attacks impacting enemies, HL:A-like gravity gloves, changing weapons/spells without navigating menus) makes it far more playable, though that shouldn't be required for a full-price game.

It's disappointing with how much more could have been done, but still nice to have a full open-world RPG for VR, and prior to most notable VR titles like Beatsaber/Boneworks/HL:A/etc.

Re: The HTTP of VR

#37
I think there is a different problem that needs to be solved and it's probably impossible.

I've dreamed of the metaverse since Snow Crash and maybe before (Tron?) but ... when it comes to actually making it, lets assume unlimited CPU/GPU power and unlimited memory.

Ideally, I want the Metaverse to allow people to run their own code. Whether its VR or AR it's a shared 3D space. So I want my Nintendo "Nintendogs" to be able to run around my "Ikea furniture" with my "Google/Apple/OSM maps" showing me navigation directions and my "FB Messenger/Discord/iOS Messenger" letting me connect to people inside. In a webpage, each of these things runs in an IFRAME isolated from the other and browsers go to great lengths to disllow one spying on another.

But in this 3D space my Nitendogs can't run through the space unless they can "sense the space". They need to know where the fire hydrants are, where the side walk is, what things they're allowed to climb/chew etc. But to do that effectively means they need enough info to spy on me.

Same for all the other apps. I can use messaging apps on my phone with GPS off and full network access off so that the app can't know my location, but order for different apps in the Metaverse to do similar they'll need to know at least the virtual location of themselves and the stuff around them which is enough to track/fignerprint

You can maybe get around some of this with a massive walled garden but that arguably is not the metaverse.

Re: The HTTP of VR

#38
The HTTP of VR is HTTP!

http://fuse.rupy.se/about.html

You also need a P2P protocol (probably some binary UDP thing) for tick based data like limb positions if you want body language.

But really VR is much less important for immersion than action MMO = Mario/Zelda with 1000+ players.

Re: The HTTP of VR

#39
post #13

What exactly is the "metaverse" supposed to be, other than a marketing term to sell a more expensive class of IO devices? People will not switch over in droves to do their text/image/video editing in VR all of a sudden, because other than a few special design applications, there is no point in doing so...it's slower, clumsier and the input devices are much less precise than mouse&keyboard. Another supposed target dem…

I was thinking about exactly this today! On the right of me I have an oculus quest which I got 2-3 months ago and honestly, it is gathering dust. Just the idea of picking it up and putting it on my face is enough to make me think meh. I did though and I feel like I can't be the only one who finds it really frustrating to the point of making me furious. 1. I started with my eyes at floor level. 2. It moans about a gua…

I can't believe someone went out of their way to type this as thought it is representative of typical VR experiences.

Re: The HTTP of VR

#40
post #27

Earlier quoted context omitted.

WebSockets are not an appropriate medium for VR in the most common use case today: real-time video games. Even if you're not building a video game today and want to do something other-VR esque, I guarantee that you will inevitably end up recreating something the video game industry has done in the last 22-23 years. Everything real-time the author of this article suggests is in the realm of something you would want fo…

Unless you need twitch-shooter level ping times in your web app, websockets/TCP is fine. The rendering is client side after all. Nothing about VR rendering would involve the web stack anyhow. Http/3 is UDP. So whats wrong with http exactly?

You severely underestimate the application of real-time positioning needs in 3D software. "Twitch-shooter" is an amateur way to describe such an application; real-time positioning is desirable anywhere. Interp only gets you so far.
Post reply on HN