0 votes

Currently I have a dedicated server script which is working fine. Players can host/join a game via a randomly generated game code.

However, updating the avatar of other players' locations is chunky, and I suspect either 1) It's because I am having the player send its location information to the server so that the server holds it in memory, and then when another player requests that location it sends it on over using rpcunreliableid() calls. Or 2) the data structure I'm storing the player's information in is inefficient (I have a dictionary of player data where the key is the player's network ID and its value is the player's location).

I have a couple questions...

Is this a common set up which I just need to figure out how to optimize, or is it best practice to instead just loop through each player on the network and send them the current player's position?

And when players connect to the NetworkedMultiplayerENet server, does the server handle requests in a multi-threaded fashion, or serially? I.e. could my shared dictionary set up be causing some sort of collision which is causing the chunkiness, or should I not be worried about that?

Thank you!

in Engine by (12 points)

Please log in or register to answer this question.

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.