+1 vote

My game will have a predetermined set of 48 players that will play in a game, including the host. From one of the networking examples, I'm doing something like this:

# Default game port
const DEFAULT_PORT = 10567

# Max number of peers
const MAX_PEERS = 47

...

var host = NetworkedMultiplayerENet.new()
host.create_server(DEFAULT_PORT, MAX_PEERS)
get_tree().set_network_peer(host)

However, if someone were to make 47 connections to the game host, all the connections would be used up, and none of the predetermined players could join the game. Or, if all the players were connected but one player errored but didn't timeout, they couldn't reconnect until they timed out.

Once a player connects they authenticate. I could increase the MAX_PEERS to say 96, then timestamp connections, and expire/disconnect them if they don't authenticate in time.

Any ideas on what I should do?

in Engine by (91 points)

Ugh! It gets worse:

https://github.com/godotengine/godot/issues/16452

There isn't even a way to disconnect peers on the host. Anyone could connect to my game, use up all my connections, and there's nothing I could do about it. Which means all Godot Enet multiplayer games are vulnerable (if I'm correct)..

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.