3 ms·
NoLag – make anything everything real-time
- deleted 3y ago[deleted]
- lelanthran 3y agoI'm playing around with the BttF example, and I think it would help if maybe that rightmost sidebar would explain just what is happening each time the user interacts with the center panel. Is the 3D model in the center sending events to a machine on a different network? To a different process on the same server? I think, for each interaction, on the RHS you can log the source of the message, each hop and the destination. Good luck.
- ScReeChHB 3y agoThank you for the feedback. And taking the time to play with the examples. Yep I can add something like what you suggested. I can add more on the side bar how to do the test. "Open up two browser, side-by-side, both using the generated access token, walk around, and see players moving on the screen" Just for interest sake, there is no "game server", NoLag creates a "Semi-peer" connections between the two browsers... Browser one is sending data to browser two via NoLag.
- lelanthran 3y ago> Just for interest sake, there is no "game server", NoLag creates a "Semi-peer" connections between the two browsers... Browser one is sending data to browser two via NoLag. Out of curiousity (and I apologise if I've missed this on the site), just what is the nature of the connection? I'm assuming UDP to reduce latency, but then there's the whole 'UDP-hole punching doesn't work through CGNAT issue. Sometimes. Maybe.' If it's TCP, it's good that the message can be confirmed to be delivered, but then the trade-off is going to be very high latency on noisy networks unless each party to the connection maintains the TCP connection (keeps it open). Have you any measurements for P95/P99 latency metrics?
- ScReeChHB 3y agoIn a nutshell I am using the Pub/Sub model, both players subscribe to a Topic, with a set of unique identifiers that direct where message need to be delivered to. I built a message broker from scratch using Erlang. I also have 3 message brokers running in Ihio, Belgium and Sydney. They are all connected to one another in a mesh. You will connect to your closest node and I will connect to my closest node and then the NoLag message brokers will pass the messages on for us. I use Google Cloud geo routing for that. As it is now for the MVP, NoLag only supports WebSockets, I know this is not the most efficient for games but the browser does not support UDP/TCP. The idea was to do TCP and UDP if there was a need for it from clients. Thinking of it now I need TCP for MQTT, sot that will be next. With the BTTF game example each browser is sending the players location and movement as it happens, or more accurately when ever the Babylon game engine completes a cycle. If you were to mimic a UDP connection, you could send timestamps in the player payload, and if the timings is more than 100ms then "hide" the player. Unfortunately now latency metrics, another one on the TODO list(there is a few things :-) ). But I do have a very rudimentary metric for you, I am in Melbourne and the closest NoLag node to me is Sydney, the round trip latency is about 20ms. If you have the time and want to have more of a play, you could check out the developer docs https://developer.nolag.app https://developer.nolag.app Unfortunately I only have TypeScript SDK for you to check out, I might build a Python SDK next...