FEDERATION 2 DESIGNER'S NOTES
by Alan Lenton

15 December 2003

Ten days left till Xmas. I've now got the TCP/IP communications working reliably. It's telnet based, although at the moment it just ignores internal telnet commands. I'll deal with those later, if it proves that they are needed.

After some thought I decided to opt to use port 30003, rather than the traditional telnet port, which is port 23. The reason for this is that I may want to use port 23 later on, and, in general, I prefer to keep the lower number ports available for their proper use.

I also decided that the main server program would handle player login, and that there consequently wouldn't be facilities to tell people that the game wasn't available when it was resetting.

The current version of Federation has a separate program that you talk to when you log in - it handles checking with the accounts database that you have an account and verifying your password. When it's satisfied, it hands the player over to the main server. One of these little programs is fired up for each player when they log in. The same program also tells you when the main server is unavailable.

Doing it that way has a number of disadvantages, but two are particularly severe. For a start, it's more complex because of the hand-over to the server. More importantly, it's an extremely wasteful use of computing power. Each time a player tries to log in, a new process is created, and this costs a lot both in time and in CPU.

Normally that wouldn't be a big hassle, except that a lot of players have log-on macros, which means that while we are resetting they are continuously hammering at the front door, so to speak. Even half a dozen players using macros can generate hundreds of hits a second, each of which requires a new process. More than half of the available CPU can easily be consumed by this sort of activity. And it occurs at start up when the game needs the most resources for loading and initialising.

So, no seperate log-in program.

When I put in code to prevent the input buffers being overflowed I didn't put an error message to the log to tell me about it. I don't really need one, since fed2 is capable of dealing with that sort of attack without bothering me, but it might be interesting to see what is being tried. I may add that tomorrow.

The next task is to get the maps set up and after that code to handle log-in and persona (or avatar, take your pick) creation.

<< Previous
Designer's Notes Intro
Next >>