SFML community forums

General => General discussions => Topic started by: s1and1 on December 20, 2021, 03:43:07 pm

Title: client floods the server
Post by: s1and1 on December 20, 2021, 03:43:07 pm
sorry for my english.

Hello, creating a multiplayer game faced a problem. The client is flooding with udp requests and the server is working too slow, so the position of the player in the screen of another player is very different from the real ones.

The client sends requests via while(true) and the server runs in the same cycle.


is it possible to somehow reduce the load?


Thank you in advance!
Title: Re: client floods the server
Post by: eXpl0it3r on December 21, 2021, 07:56:50 am
You'd most likely have to change your server architecture, so that you can handle more inputs.
Additionally, from a client perspective you only really want to send out actual updates and may also decide to limit it to some fixed time, so you're not sending 60 updates per second...
Title: Re: client floods the server
Post by: s1and1 on December 21, 2021, 12:14:20 pm
that is, to send, for example, 20 data per second?