Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Server/client game model

This thread is locked; no one can reply to it. rss feed Print
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.
"Love thy neighbor as much as you love yourself means be nice to the people next door. Everyone else can go to hell. Missy Cooper.
The advantage to learning something on your own is that there is no one there to tell you something can't be done.

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")
An example of this (I think) is the Zdaemon launcher.

Go to: