|
Server/client game model |
Bob Keane
Member #7,342
June 2006
|
I followed this tutorial to build a server. After some tweeking I got it to work. However, the server acts as a messenger, it does not participate in the conversation. This means if I write a game using it, the users would have to run a server and a separate client on the same machine. I was wondering if this would be a good approach or if I should build a client into the server? By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Audric
Member #907
January 2001
|
Many games see it the other way round: The "game client" is additionally able to run and stop a local server. Generally as a thread, so that if the client process is killed / exited, the server gets automatically stopped. An alternative is to create a light front-end that gives you the choice of running the server and/or client, and starts the relevant processes. This way if you exit the game, other players can keep playing, and the front-end can keep track of the server status ("other players are still in the game, are you sure you want to stop the server") |
|