Return to Jamie Cameron's [final report (1995)]
Sim server
setup guide


Introduction

A sim server is responsible for everything within one part of a sim world called it's map. All players who's avatars are within that map are connected to the sim server and all information about players and objects within the map is stored by the server.

Upon startup, a server reads text files containing the current state of it's map into data structures in memory. Every 5 minutes or when the server is shut down, the files are re-written so that map state is kept and not lost if the server is killed (or crashes :-). At the moment, to add new rooms or objects to a server's map it must be shut down, it's map files edited and then restarted.


Setting up a server

The sim server should run on any unix system with a fast connection to the Internet. It doesn't make use of X, though it would be helpful to have X installed so you can run the graphical clients. The sim server executable is called sims, and can be obtained by either

Once this is done, you should create a directory for the server to store it's map data files in. The sims distributions all come with a directory of example files defining a simple world running on one server, in sims/example. Each running server on the should have it's own private directory, as server create additional files in their directories when running. The map data files you need to create are : All data files are run through the C preprocessor (/lib/cpp on most systems) before being parsed, so standard C comments, #define and #include directives can be used. However when the files are written out again by the server, comments will be lost and preprocessor directives (like #define) expanded.

When the necessary map files have been created, the sim server can be started. The command line arguments for sims are :

When the sim server is started it should list the map data files as it reads them in, and then print something like Started server on indy09.cs.monash.edu.au port 13433. If something goes wrong reading in one of the data files an error message will be displayed and the server will exit.

However, if everything goes OK the server will open the file server_log in it's directory to write status and error messages to, and start waiting for connections on the given port. Status messages will be written to stdout and to the log file whenever

In addition, error messages will be written to stderr and the log file if something goes wrong. Some errors (such as failure to allocate memory) are fatal and will shutdown the server, while others (such as a broken connection to a client) are properly dealt with :-)


Running a server

Once your server is running, it should be able to receive connections from players, status programs and other servers. Possible connection types are :

Because some of these connection commands could be used to do evil things like creating bogus players, the status, shutdown and all the transfer commands require a password from the other end before doing anything. When one server transfers something to another, the sender uses the password from it's map file to authenticate itself to the receiver. Because all the servers in a world have the same password in their map files, and these files are kept secret, all and only the servers making up a world can transfer things between them.

Commands like simskill and simsstat which send shutdown and status requests take a password as a command line parameter, which must match the password on the server the command is being sent to. This prevents just anyone from shutting down a sim server :-).


Return to Jamie Cameron's [final report (1995)]