Complete.Org: Mailing Lists: Archives: freeciv-dev: June 1999:
[Freeciv-Dev] Freeciv gameservers (was: Idea (battle.net))
Home

[Freeciv-Dev] Freeciv gameservers (was: Idea (battle.net))

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ishstar@xxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Freeciv gameservers (was: Idea (battle.net))
From: Reinier Post <rp@xxxxxxxxxx>
Date: Sat, 26 Jun 1999 14:33:33 +0200

On Sat, Jun 26, 1999 at 03:26:53PM +1000, David Pfitzner wrote:

[about Freeciv game servers]

> One possible way to avoid the problem of everyone having to
> start at the same time would be to allow people to take over
> from AI players (and automatically toggle the AI status when
> players join/leave).  Whether this would be worth it I'm not
> sure (eg, you join as some crappy AI civ which is about to 
> die...)

With current CVS versions, you can already start
'civserver -r remotemaster.civrc' where remotemaster.civrc
contains the lines

  create master
  cmdlevel master ctrl

This creates a used 'master' with the privilege to issue server commands
to control the game.  Then log in as 'master' and issue commands from the
civclient chatline.

> Either way this would probably require some development work...

Last summer someone was hosting a Freeciv game server.  It offered
telnet access.  When telnetting in, the user was offered the option of
picking an existing game to resume, or starting a new one.  I believe
several games could be running at once.

He implemented it using a small patch to the civserver that I may still
have archived somewhere.  But this is easy to implement without change
to the Freeciv code.

The basic idea is to create a 'freeciv' user whose login shell is
civserver:  every login session will start a server.  I can only see
one problem: it doesn't allow command line options to be specified.
Of special interest are the -f option (to resume games) and the -p
option (since two civservers need to listen to different ports).  So
all we need is a wrapper program, 'civd', that keeps track of the
ports civservers are running on and the savefiles associated with each
game, asks the connecting user whether to resume an existing game or
start a new one, and starts civserver with the appropriate options.
This will be freeciv's login shell.

Things can be done to Freeciv itself to make game management easier:

  - make every command line option respecifiable from the server
    command line (for example: a 'load' command to load a savefile,
    a 'changeport' command that will make the server listen to
    a different port)
  - add a 'redirect' packet that servers can send to clients to make
    them reconnect to a different host:port

With these two features, the civd program will no longer be necessary,
because all control can be exerted from the civclient chatline, using
the 1.8.1 client side command feature.

In short, it's easy to implement; the main question is
who would be generous enough to run civd on his/er machine.

-- 
Reinier Post

[Prev in Thread] Current Thread [Next in Thread]