godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.36k stars 20.02k forks source link

Design Question: Multiplayer Server, how to extract just the collision shape of different game objects? #28898

Closed JiahuiCai closed 5 years ago

JiahuiCai commented 5 years ago

Hi Godot warriors,

So I am trying to get my head around how to build a multiplayer game with a dedicated server.

The mental model I have for a game server is basically a bunch of collision shapes moving around according to commands received from each client.

And then the client just sends out inputs and draw meshes based on the game state updates sent from the server. And in order to do client prediction, we also need collision locally.

say I have a level scene, consists of instances of house scenes. each house scene contains everything, the mesh, the materials, textures, and the collision, and maybe some interactive elements.

in this case, when I export the server, how do I just take the map, with just the collision shapes and interactive scripts, and don't pack the meshes with it? Does the headless server only disable the drawing calls?

One way I can think of is to have a script to generate a collision only scene from a full scene. Kind of like "Baking the scene".

Just curious what you guys think about this problem.

Thank you sincerely,

A friendly Godot user

StraToN commented 5 years ago

Github issues are for bug reports and feature requests to the project. Usability and game design questions are not supposed to be asked in here - you should prefer one of these: