Links Logo


What this project is about

XPilot NG is a multi-player 2D spacewar game. It is an extended version of XPilot, a true Internet classic. Like in XPilot, the aim of the game is to have fun and to beat your fellow pilots. In a team game, you can humiliate your enemies, blow up your their ships and steal their treasure. There are also other game modes: individual game and a race mode. XPilot NG is compatible with XPilot and shares a lot of features, but also has a lot of new features and bug fixes.

Traditional XPilot maps are based on an array of fixed-size blocks, each either empty, filled with wall or half-filled with a diagonal border. The most important change in this version is a total rewriting of the map format. Walls and some other features can now be described as arbitrarily shaped polygons. The new format is also easier to extend and allows more things to be customized.

Several bugs and deficiencies have been fixed. Most important are better collision detection between objects (the server now notices a bullet hitting a ship even if it hits a wall later in the same frame) and better handling of ship-wall collisions. Old code handled a shipshape as just a bunch of points, ignoring the edges between them. This caused problems like ships getting stuck at wall corners in some situations. Now the ships bounce correctly.

The game speed is no longer tied to the number of frames per second (FPS). This means that servers can run at higher FPS, and the game will still proceed at a reasonable rate.

The client has better capabilities for displaying graphics, and the map format allows specifying different textures and colors (though XPilot is still played on some computers with slow displays, so the full graphics might not be visible everywhere). The client also has a mechanism for downloading additional texture files over HTTP. Here's a sample screenshot, and another showing different shapes.

It's possible to save games on the server side. The recordings can be viewed by starting the server in playback mode and then making a normal client connection to it. You can then watch the game from any player's viewpoint. The recording files are a lot smaller than those of the client-side recording format. Their main drawback is that the recordings can't be kept compatible between server versions, so they're not suitable for long-term storage (unless you want to keep old server versions around to view them).

Compatibility with old-style XPilot versions

The server supports the xp (traditional block based) map format. Old clients can be used to connect to the server, but support for clients prior to version 4.2.0, patchlevel 3, has been removed. When the server is started with a map of the xp2 map format, old-style clients can join the game, but in general, these clients can't display the polygon maps. The mapdata server option can be used to include blockbased map data in polygon maps, as an approximation of the map. In some cases, especially if the map has been converted from the old map format to the new, old clients will work very well.

The client works with old-style servers and has the capabilities of the 4.5.4 client. A lot of new client options have been added and some old ones have been removed.

Maps of the old format can be converted to the new format using a Python script. However, the new map format doesn't support all the same features as the old one did. Most are supported, even robots work quite well. Making all features fully compatible might not be sensible though; in the new setting other choices might work better, and since several features are used only in rarely-played maps, maintaining backwards compatibility for them doesn't seem necessary. In some cases the features can be compatible even though they are implemented quite differently. For example, the server doesn't have a "treasure box" concept like before; however, the new, more general, features allow creating a very close approximation of old functionality, and the conversion script does this automatically.

Client improvements

The XPilot NG client has, in addition to support for the new maps, a lot of new features and color options. Most of these originate in Erik Andersson's (a.k.a. Virus, Mara) "Marahacked" client. Notable among these are warnings drawn at bases when a player has died, improved HUD and "map" radars, a message scanner and indicators that show when someone in the team has issued a "ball warning" or requests cover. End of round messages with statistics show the kill ratio and many other things. A new score table for teamplay games, designed by Jimmy Andersson (a.k.a. Jiman), shows the playing teams separately.

The client has also been improved so that it works better at high FPS, for example messages don't disappear too fast.

Compiling this version

This version requires two additional libraries: zlib (for the client) and the Expat XML parser library (for the server). Current Linux distributions should include both, either installed by default or available as a package (like .rpm or .deb). Note that you need the development versions with header files to compile. For other platforms or different/older Linux distributions, you might need to compile the libraries first. For more details see the INSTALL.txt included with XPilot sources. Once you manage to compile XPilot succesfully, try starting the server using the map teamcup.xp2 included with the sources.