0 votes

Hello,

I am using Godot server as explained in the tutorial, but I'm struggling with collision checks. I have multiple players that move in the scene and multiple projectiles. As I don't want to trust clients for cheat prevention reasons, I'm trying to handle collisions server-side.

The problem is I don't want to instanciate the whole scene server-side. It seems very resource-consuming. I have the same problem with player movement. How am I supposed to check for collision and/or correct movement speed without duplicating the code from client to server?

Thanks for your answers.

asked May 7 in Engine by Feelzor (12 points)

I have never really used server in Godot b4,but I've read tutorials for future uses...
For me,I would instance the scene both sides...cause the server needs the data to detect the collision.
After that,I would guess that u just need to do exactly how u did without the server,but just add a line which checks whether the current network is a server.
At least this is how my first try would be...
However,I'm not sure whether it will affect anything else unless I try it myself...
I'm still a beginner too..lol...hope it helps a bit...

1 Answer

+1 vote

You can't really. Run server without renderer, so the only thing computed is physics and engine code.

answered May 8 by blockchan (90 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.