bbmario Posted September 16, 2015 Share Posted September 16, 2015 Does anyone know any good examples of WebRTC-based multiplayer in Babylon? Something like different players moving capsules around. Kind of like this: Syncing and interpolating, etc. Quote Link to comment Share on other sites More sharing options...
tips4design Posted September 16, 2015 Share Posted September 16, 2015 Well, I don't thinking syncing and interpolating is really specific to the game framework you use or to the rendering engine. The principles are the same and not really hard to implement (extrapolate locally, interpolate when you receive correct data from the other user/server). Quote Link to comment Share on other sites More sharing options...
bbmario Posted September 17, 2015 Author Share Posted September 17, 2015 I didn't mean specific to Babylon, doesn't matter, just using a graphics engine to demonstrate the concept. It could be three.js or anything else. Since Babylon is turning more into a gameframework, with example integrations with physics engines and so on, it makes sense to have a networking example as well. Quote Link to comment Share on other sites More sharing options...
jerome Posted September 17, 2015 Share Posted September 17, 2015 I would suggest to handle every network communications (ie : high or unpredictable latency compared to the render loop rate) in a dedicated webworker besides the BJS engine thread. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 17, 2015 Share Posted September 17, 2015 I agree that would be really great if Babylon added the network in its engine. @Jerome, I did not understand what you mean. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted September 17, 2015 Share Posted September 17, 2015 Also, think putting network checking into the render loop, might not be a good idea. This seems better suited to an extension, since web workers are usually in a different .js file anyway. Isn't there already a network related extension, scoreboard, that might be use-able / improvable for this purpose? Or is this peer-to-peer, not client-server? Quote Link to comment Share on other sites More sharing options...
tips4design Posted September 17, 2015 Share Posted September 17, 2015 I would suggest to handle every network communications (ie : high or unpredictable latency compared to the render loop rate) in a dedicated webworker besides the BJS engine thread. Why would you do that? It sounds like the overhead of transferring data to and from the web worker might cost more than actually computing a simple linear interpolation in the main thread (which is actually a simple division). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.