Jump to content

Disable rendering, position and collosions neededonly


splayna
 Share

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?

Regards

Babylon Developer

Link to comment
Share on other sites

Welcome.

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.

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...