XPilot


This is "Dungeons of Fear!" by Dr_Xemacs, based on "The Cave" by Ken Ronny Schouten.

Yes, it's dyndns-free.com, now.  Our paid DynDNS subscription expired due to lack of communication (i.e., the renewal notice accidentally wound up in the spam folder).  But this works just as well; even though it's 5 characters longer, it's less silly of a name than "gotdns"!

Our XPilot server is connected to the Internet via digital cable.  We live near San Diego, California, USA (UTC-8), so you people back east or in Europe, etc. may or may not get very good response time.  There may be some lag sometimes, but not a lot.  Unless, of course, someone is using the Mac desktop (which isn't often), or you are using a dialup modem (shame on you!) Satellite Internet isn't recommended, either; too much propagation time.


piper.dyndns-free.com

Running on an Apple Mac Mini under Mac OS X 10.4.11 on a 1.42 GHz PPC processor with 1 GB of RAM.

List accurate as of 10 August 2011.

Map

Author

Size

Bases

Teams

Race

FPS

Version

Port

New Dark Hell

PeaceMaker

200x200

16

no

no

14

4.5.5

15345

> Robot Extermination (robot abuse!)

Vincent (www.xmission.com/~edco/xpmaps/)

150x150

14

no

no

14

4.5.5

15346

tzx-rambunctious

xpilot@toyzworkz.com

200x200

14

no

no

14

4.5.5

15347

Cells of Eclipse

Insectoid

126x140

24

no

no

14

4.5.5

15348

Fishtank III

Insectoid

140x110

28

no

no

14

4.5.5

15349

Poly Fishtank III

Insectoid

140x110

28

no

no

20

4.7.3ng

15350

Note:  idleRun has been turned off on these servers (e.g., no activity when no human players are on), and robots are not logged.  This is to not only conserve system resources, but also to reduce the risk of the server program crashing.  (Which, with both options enabled, happened often on the higher bot-count maps like Fishtank.  Not to worry; I believe it is a Mac OS X-specific issue.)


Server Patches

I have provided diffs of the source code, so that you can try these yourself; no guarantees are implied, though I've tested them and am fairly certain that they work.  This is assuming you are using a UNIX-like environment, and have the patch command.  To patch server.c, for example, do something like this:

patch -p0 <server.diff

in the root of the XPilot source tree.

The -greeting option (4.5.x)

This is a new option in the XPilot-NG and BloodsPilot FXI servers, which can be set either in the map or on the command line.  It allows you to have a short message greet joining players; for example, a server started with the command:

xpilot-ng-server -greeting "http://insectoid.budwin.net/xpilot/xpilot.html"

generates the following player message when a player joins:

"http://insectoid.budwin.net/xpilot/xpilot.html" [*Server greeting*]

Though this option is present in NG and FXI, there is no such option in any of the other versions, like 4.5.4, 4.5.5, or 5.0.0 (though Bucko seems to have added it to his server).  Therefore, I set about figuring out how to transplant the necessary lines of source code from NG to 4.5.4.  At the time, I understood very little of what I was doing, but with a little more C knowledge under my belt now, I think I understand it better. The end results are below; line numbers may vary slightly between versions.

Line #

XPilot source file src/server/cmdline.c  (diffs for: 4.5.4, 4.5.5)

88

char            *greeting;              /* Print a short greeting to players */

This line was modified from 4.7.3 source file src/server/option.h; I added the comment, to fit in with the other lines).

795-804

    {
        "greeting",
        "xpilotGreeting",
        NULL,
        &greeting,
        valString,
        tuner_dummy,
        "Short greeting string for players when they login to server.\n",
        OPT_ORIGIN_ANY | OPT_VISIBLE
    },

These lines were taken as-is from 4.7.3 source file src/server/cmdline.c, except for 799 which I changed from &option.greeting, to &greeting,.

 

Line #

XPilot source file src/server/global.h  (diffs for: 4.5.4, 4.5.5)

110

extern char             *greeting;

The same line from 4.7.3 source file src/server/option.h, with extern added in front of it to match the other lines.

 

Line #

XPilot source file src/server/netserver.c  (diffs for: 4.5.4, 4.5.5)

1116-1120

    if (greeting) {
        sprintf(msg,
                    "%s [*Server greeting*]", greeting);
        Set_player_message(pl, msg);
        }

These lines were heavily modified from 4.7.3 source file src/server/netserver.c.  That version looks like this:

    if (options.greeting)
        Set_player_message_f(pl, "%s [*Server greeting*]", options.greeting);

I had to add the sprintf function so that it would fit in with the rest of the code.

The -pauseTax option (4.5.5)

One of the new features added to the 4.5.5 server is a mandatory "pause tax", which subtracts 0.01 points per frame from a paused player's score.  This was intended to discourage players from getting a high score and then pausing (to gloat, I suppose).  However, I was upset that it had not been made configurable, and for a long time I used the 4.5.4 server instead.

Then I noticed that the NG server has a -pauseTax option!  It allows you to set the rate at which paused players' scores decrease.  However, I balked at transplanting code again, figuring that a simple Boolean true/false option would suffice.  With my new knowledge of C, I felt confident that I could get it right.  I did borrow a bit from cmdline.c—the code for allowViewing, another pause-related option.

Line #

XPilot 4.5.5 source file src/server/cmdline.c  (diff)

245

bool            pauseTax;                /* Do scores decrease while paused? */

This line was modified from line 244.

3168-3177

    {
        "pauseTax",
        "pauseTax",
        "true",
        &pauseTax,
        valBool,
        tuner_dummy,
        "Do players' scores decrease slightly while paused?ls \n",
        OPT_ORIGIN_ANY | OPT_VISIBLE
    }, 

These lines were modified from lines 3158-3167.  I set the default value to "true"; specifying +pauseTax on the command line will override the tax.

 

Line #

XPilot 4.5.5 source file src/server/global.h  (diff)

274

extern bool             pauseTax;

This line was modified from line 273.

 

Line #

XPilot 4.5.5 source file src/server/update.c  (diff)

788-801

        /* Turned pause tax into an option - Insectoid */
        if (pauseTax) {
            if (BIT(pl->status, PLAYING|GAME_OVER|PAUSE) != PLAYING) {
                if (BIT(pl->status, PAUSE)) {
                    /* reduce paused player's score a little. */
                    pl->score -= 0.01;
                    /* only update paused score every 4 or 5 seconds. */
                    if ((frame_loops & 63) == 0) {
                        updateScores = true;
                    }
                }
                continue;
            }
        }

All I did here was add an extra if statement around the pause tax code.

The -serverHost issue (4.5.x, 4.7.3)

There was one other change made to the standard and NG servers in server.c, regarding the "official server name" (it seems to have been corrected for FXI; not sure about 5.0.0).  According to my dad, on the older versions, when the -serverHost option is used, xpilots attempts to verify the domain with a DNS lookup, in order to "bind a socket on that host"; the latter apparently fails.  His solution was to comment out this line:

        serverAddr = xp_strdup(addr);

which is line 170 in 4.5.4/4.5.5 and line 146 in 4.7.3. (diffs for: 4.5.x, 4.7.3)


Valid HTML 4.01 Valid CSS Level 2