Hey guys, a friend of mine wants to know something, but I am not able to help him, and for some reason he cannot register in this forum right now, so he asked me to ask for him:
" Hello Community,
I am trying to programme a gameserver for a jump n' run. The problem is, that I really don't know how to handle the data transfer.
I am using TCP/IP and my server works so far in the following way:
-Listens to a given port(in my case: 12345)
-Accepts the incoming connection
-Creates a thread for each client(where the data is going to be received)
Questions:
Where and when should I send the data(e.g. player's position) to every client?
-Where: in the client thread or another seperate thread(e.g. a worker thread for each client?)?
-When: directly after the server has received it or after some time(because of the FPS rate?)?
Hopefully all of you guys could understand me!
greets ..."