Disable rendering, position and collosions neededonly

Recommended Posts

I am designing a online multi player game. To prevent hacking I need to run a copy of the game on the server side so I can compare the incoming data is legitimate. Say a player can try to hack and send its position is somewhere else. My question is can I run the server copy of the game that does render anything but just calculate the positions of the players and collisions so server is not overloaded unnecessarily by rendering.

1. Is this possible with Babylon?

2. Is this how pro games prevent players to send invalid position/ action data?


Babylon Developer

Share this post

Link to post
Share on other sites


What you are referring too is called an authoritative server. It is a model that is commonly used in multiplayer games, either by having a central server that runs the game and has 'authority' or by having one of the players as the authority.

This article is commonly shared when discussing such a technique: http://buildnewgames.com/real-time-multiplayer/

Generally you won't let a client (the instance of the game the player is playing) ever send 'position' data. You would send information that the player has moved 2 units (for example). The server and client calculates the new position. The server then always sends back the absolute positional data every 'now and then' to make sure it is in sync.

Babylon isn't 'officially' designed to run headless/serverside, but it is opensource and some people have hacked it to do so. Search for 'headless' or 'server side' in the search boxes. There has been discussion on making it work headless, but I don't believe that is officially ready yet.

It will also depend on the type of game you wish to make, if running the full version of Babylon on the server is the best option. If you have a full 3D game, like an fps with only a few players then it might be OK. If you wish to have a giant MMO then it might be best not too. Some people have had some good success in running just the physics library, such as cannon or osmo server side rather than the entire Babylon library.

I am working on a similar project. My game is a top down game that mostly uses 2D physics, but is rendered using Babylon for the client. I used my own 2D movement code across the server/client to keep it in sync.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.