   THE server setup for FPS
  I've read the FAQ already. No need to copy/paste RTFM :)Anyway, all I want to know is whats the best method to write a server for an FPS. I've went through at least 4 iterations (all of which worked fine.. with 1-3 clients). I keep looking around, and finding differing opinions. All I want is "_____ is the best choice for FPS." I've done blocking, non-blocking, threaded.. looking at overlapped IO right now.Everything is written from scratch, so I'm not looking to use other peoples networking libraries/code. Just want to move on with an initial server setup so I can get back to the actual game. Thanks in advance.   
  Well i guess you want to stay by your own implementation, right?What technic do your current iteration use? My own implementation uses for the server m thread for n clients (m << n) + select + nonblocking (if wished to avoid an attack by a client which can else block the server by simple not cleaning the recv-buffer which cause the server send-buffer to run-out-of-memory). Pros:-the server is not flooded by n threads for n clients-the server can avoid a fullblock of the networkstuff-one has not to care about updating network in the mainloopCons:-the data must be transferred in thread-safe way between gamelogic and network-if the connection is just to slow the clients is dropped even it is not a "bad guy";Quote:Original post by LordCthuluAnyway, all I want to know is whats the best method to write a server for an FPS. I've went through at least 4 iterations (all of which worked fine.. with 1-3 clients). I keep looking around, and finding differing opinions. All I want is "_____ is the best choice for FPS."You've already found different opinions. Why do you think asking here will suddenly prove the 'best' choice to you?How many clients do you need to support? Which language are you writing it in? Which platforms will it run on - client and server?;  The best way, if portability is important to you, is to use boost::asio.The best way, if you serve on Windows, is to use I/O completion ports with a thread pool.However, the networking part of the server generally doesn't matter, because you will only spend 1/10th of 1% of the computing power on the networking and network packets. The rest of the power will be spent on rules and physics, so your question really should be "what is the best way to structure physics and rules enforcement for an FPS?"