Jump to content

Networking and 3D physics engines


Threedy
 Share

Recommended Posts

Hello there,

For the record: I am posting this in BabylonJS since this is the best HTML5 3D game engine for the web and I'm questioning some of its physics engines and their use on the server. 

I was wondering what the state is regarding (JavaScript) 3D physics engines and the possibility of running the physics on the server (to make the server authoritative). 

The current state of physics engines seems to lack either performance or functionality. I have tried running CannonJS using NodeJS, and while it was OK for 4-5 clients, it became quite poor afterwards (even though I used simple and few geometry). Oimo.js doesn't have any collision callbacks as far as I've read, and Energy.js's release seems to be quite far away. 

Another question: it seems that the popular webgames you see on the web are being ''hijacked''. By that I mean that the client code is stolen and are being run on a different server where they make profit. This for instance happened with Agar.io. To counter this, you should preferably run a few things on the client and the majority of the other stuff on the server. However, if a game has physics, I imagine this wouldn't work out so well since it may stutter or feel unresponsive.

Does anyone have knowledge of this or can share his/her experience? 

Link to comment
Share on other sites

1 hour ago, Threedy said:

For the record: I am posting this in BabylonJS since this is the best HTML5 3D game engine for the web and I'm questioning some of its physics engines and their use on the server. 

Best intro ever :D

We do not support directly physics engine but we offer integration. Regarding these engines performance I'm not sure how to help. Perhaps using Emscripten versions? With webassembly or asm.js, it could be faster.

Regarding your question about client code hijacking, I tend to agree with you, the best way to protect your code is to not share it :) So server side is a good option

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...