SF.net page of this project is
here.
Nightly built Win32 binaries may be found here.
Q2PRO is a Quake2 engine modification. Client and server sides are both compatible with original Quake2 v3.20 network architecture, as well as with modern R1Q2 network architecture. Q2PRO is designed to be secure, fast and doesn't provide any graphical enhancements that are contrary to the classic Quake2 look and feel. It provides some features yet unique to Quake2, notably server side Multi View Demos. Q2PRO has it's own software and OpenGL refresh libraries and runs under Win32 and GNU/Linux natively. Q2PRO also runs under Windows Mobile, although this port is not currently playable.
Q2PRO supports the following network protocols:
Key features of Q2PRO protocol from client's perspective:
Some terminology:
Q2PRO has the following MVD facilities:
Other features:
You will need to install Subversion (SVN) client specific to your OS to accomplish this task. Use the following command to checkout the lastest working copy into the "q2pro" subdirectory:
svn co https://svn.sourceforge.net/svnroot/q2pro/q2pro q2pro
Remember, Q2PRO is in development and source code in the repository may be broken at any given point in time. If you are not a developer, only proceed with downloading if you wish to participate in Q2PRO testing and don't mind building the whole thing yourself.
You may also browse Q2PRO source code online.
On Windows, Q2PRO is buildable using MinGW (Cygwin distribution is recommended, but MSYS should also work), Visual Studio 2003 and Visual Studio 2005. All needed external libraries are precompiled and included in the source tree (libz/1.2.3 and libjpeg/6b).
Required solution and project files may be found in vc7/ and vc8/ subdirectories. Visual Studio 2005 seems to come without DirectX headers, so you will need to install MS DirectX SDK first.
Download MinGW packages from http://mingw.org/download.shtml. Required packages are: mingw-runtime, w32api, binutils, gcc and MSYS graphical installer. It is recommended to install MSYS using graphical installer first, then uncomress each MinGW package into the mingw/ subdirectory of your MSYS main directory. You also need to get ddraw.h, dsound.h and dinput.h files from MS DirectX SDK and place them into win32-libs-mgw/include subdirectory, unless they are in your include path already.
Open MSYS shell, cd to the root of q2pro source tree and type make:
cd /c/source/q2pro #change the path accordingly
make
This should build the following files in
./build/releasex86/ directory:
q2pro.exe - client executable
q2proded.exe - dedicated server
ref_newgl.dll - OpenGL refresh library
ref_soft.dll - software refresh library
Q2PRO is being developed and tested on Debian Sarge. Q2PRO currently uses SDL framework for video and OSS for sound output. You should compile Q2PRO using GCC version 3.x. libz is required by both client and dedicated server and libsdl is required by the client. libjpeg is optional for OpenGL refresh library and may be disabled by editing corresponding makefile. Make sure that X Server development packages are installed so there are OpenGL headers available. I don't use pkg-config yet, so you may need to tweak makefiles if some libraries or headers are in non-standard location.
cd to the root of q2pro source tree and type
make:
cd ~/q2pro #change the path accordingly
make
This should build the following files in
./build/releasei386/ directory:
q2pro - client executable
q2proded - dedicated server
ref_newgl.so - OpenGL refresh library
ref_soft.so - software refresh library
About ref_newgl on linux: it should show acceptable performance with open source r300-dri drivers for ATI Radeon series video cards. I basically started writing ref_newgl so I could play Quake2 on my notebook equipped with ATI Mobility Radeon.
Q2PRO first adds baseq2pro subdirectory of the base directory to the VFS search path. This is also the directory Q2PRO loads refresh libraries from. Note that refresh libaries are not compatible with original Quake2 refresh API and should not be mixed with libraries from other Quake2 clients.
To launch Q2PRO directly from the build directory on Windows,
use a command line like this:
./build/releasex86/q2pro.exe +set sys_debugdir ./build/releasex86 +set basedir c:/quake2 +set game action
To record a local MVD:
q2pro +set mvd_enable 1 +map q2dm1 +mvdrecord test
To play it back enter in console:
mvdstop; mvdplay test
To setup a game server for MVD broadcasting:
q2pro +set port 27910 +set mvd_enable 2 +map q2dm1
To setup a QTV-like server listening to MVD broadcast:
q2pro +set port 27911 +mvdconnect 127.0.0.1:27910
Then connect your normal Quake2 clients to 127.0.0.1:27911 and they
will watch live MVD stream (cross your fingers).
Real documentation is to be written...
In spectator proxy mode, MVD client connects to arbitrary game server just as a regular Quake2 client, using non-MVD protocol. MVD client does not need any Quake2 media files in order to run in spectator proxy mode, and may run outside Quake2 virtual filesystem tree. All you need is just dedicated server executable and (optionally) a config.
sv_oldgame_hack | 0 | On GNU/Linux, enables "compatibility mode" so game libraries
built using old GCC versions may be loaded without recompilation. If your server segfaults while loading a map, try toggling this variable. |
sv_bodyque_hack | 0 | Attempts to prevent "flying bodies" effect present in some buggy
mods. This hack assumes the mod allocates some certain range of entity
slots for "body queue" and disables client side interpolation of
those entities. Use this hack with caution bacuse it may not be compatible with all mods. |
sv_strafejump_hack | 0 | Enables FPS-independent strafejumping for R1Q2 and Q2PRO clients. |
sv_iplimit | 3 | Maximum number of simultaneous connections from single IP address. Setting this variable to 0 disables the limit. |
sv_status_show | 2 | Specifies whether server should respond to status queries.
|
sv_status_limit | 15 | Maximum number of status queries server should respond to, per one second. |
sv_badauth_time | 1 | Time, in seconds, for server to be unresponsive after invalid authentication attempt. This applies to rcon commands, as well as authenticated connection requests. |
sv_password | "" | If not empty, allows only authenticated clients to connect. Clients set their passwords using password userinfo variable. |
sv_mvd_password | "" | If not empty, allows only authenticated MVD clients to connect. If sv_mvd_password is empty, but sv_password is not, MVD client's password is checked against the latter. MVD clients set their passwords using password userinfo variable. |
mvd_enable | 0 |
|
mvd_maxclients | 1 | Number of client slots reserved for MVD clients. Memory for these clients is allocated only if MVD broadcasting is enabled. |
mvd_wait_clients | 1 | When recording a local MVD, skip server frames with no
active clients present.
|
mvd_buffer_size | 16 | Size (in frames) of the internal MVD buffer. Set on the MVD client. This buffer is used for the following distinct purposes:
Higher values are not recommended since large delay buffers eat memory extensively. Note that buffer size in bytes is actually O(maxclients*mvd_buffer_size). Try to keep your maxclients value adequate. |
mvd_pause | 0 | When playing back a MVD, stops running it forward in time. You may still run MVD backwards using +mvdback command. |
mvd_noblend | 0 | Filter out playerstate color blend effects when recording and broadcasting MVDs. Used for optional bandwidth savings. |
mvd_nogun | 1 | Filter out playerstate gun updates when recording and broadcasting MVDs. Used for optional bandwidth savings. |
mvd_nodelta | 0 | Disable delta compression when recording local MVDs. Used for debugging purposes. |
mvd_motd | "..." | This string is macro expanded and centerprinted to each MVD spectator on initial connection. Line feed escape sequences are allowed. |
mvd_timeout | 120 | Specifies maximum time, in seconds, for MVD client to wait for incoming network packets before disconnecting. |
mvd_custom_fov | 1 | Optionally enforces FOV settings for non-Q2PRO spectators.
|
mvd_nextserver | 1 | Specifies what action should be taken when MVD playback finishes.
|
mvd_admin_password | "" | Password required for clients to enter administrator mode and control the camera. If empty, administrator mode is disabled for non-local clients. |
MVD client shares userinfo cvars with regular client. Keep this in mind when you run MVD client in listen mode.
mvdrecord [/]<filename> | Starts local MVD recording on the game server or MVD client. Records in demos/ subdirectory unless slash is prepended to the filename. |
mvdstop | Stops local MVD recording. |
mvdstreamrecord [/]<filename> | On a MVD client, starts MVD recording directly from live MVD stream,
ahead current delay buffer position. Records in demos/ subdirectory unless slash is prepended to the filename. |
mvdstreamstop | Stops streamed MVD recording. |
mvdplay [/]<filename> | Starts MVD playback. Loads file from demos/ subdirectory unless slash is prepended to the filename. |
mvdconnect <address:port> [protocol] | Connects MVD client to the specified server.
Available protocols:
|
mvdisconnect | Disconnects MVD client from MVD server. Note the spelling. |
mvdautorecord [/]<filename> | Has the same functionality as mvdrecord command,
plus puts the demo into the MVD cache. This command is intended to be issued by triggers. |
+mvdback | When bound to a key, play MVD backwards until the key is released. The amount of time you may run MVD backwards is depends on the mvd_buffer_size value and the current position inside demofile. When end of buffer is reached, reverse playback stops. This command is available for listen servers only. |
mvdjump <0-100> | Jump to the specified position (in percents) in the delay buffer (NOT in the whole demo). |
These commands may be issued on any Quake2 client connected to a MVD server.
follow [playerNum] | Starts following the specified player. Player number may be obtained from
the output of skins command, for instance. If player number is omitted, switches to the most recently followed player, if none, switches to the first active player found. |
observe | Goes into freefloat mode. |
playernext | Cycles to the next active player. |
playerprev | Cycles to the previous active player. |
playertoggle | Toggles between the two most recently followed players, if any. |
help | Toggles the display of scoreboard. |
inven | Toggles the display of client list. |
!mvdadmin [password] | Toggles administrator mode. For non-local clients to enter administrator mode, password is required and should match mvd_admin_password set on the MVD client. |
cl_protocol | 0 | Specifies preferred network protocol when connecting to servers.
|
cl_maxpackets | 60 | Number of packets client should send per second, directly impacts outgoing bandwidth. If set to 0, disables outgoing packet limit completely and sends packets every frame. When connected using Q2PRO protocol, client uses special usercmd batching code which ensures that physics are bound to cl_maxfps only and there is proper number of backup usercmds sent in each packet (see cl_packetdup). Otherwise, client falls back to oldschool FuzzQuake2 hack where some usercmds are dropped (up to 2 usercmds in a row). This hack exploits original Quake2 usercmd backup code and if your outgoing connection tends to drop packets on it's own, you will likely experience prediction misses and other issues. |
cl_packetdup | 1 | Number of backup usercmds client should include in each packet, directly impacts outgoing bandwidth. Server runs these backup usercmds when it encounters dropped client packets. This variable is relevant only when connected using Q2PRO protocol. |
cl_disable_particles | 0 | A bitmask. Disables rendering of particles for certain types of client effects.
|
cl_disable_explosions | 0 | A bitmask. Disables rendering of animated models for certain types of client effects.
|
cl_gibs | 1 | If set to 0, disables rendering of entities with EF_GIB flag set. When connected using Q2PRO protocol, enables considerable bandwith savings since the server stops sending these entities at all. |
cl_gun | 1 |
|
cl_footsteps | 1 | If set to 0, disables footsteps sounds. When connected using Q2PRO protocol, enables certain bandwith savings since the server stops sending footstep events at all. |
cl_railtrail_type | 0 |
|
cl_railtrail_time | 1.0 | Time, in seconds, for the rail trail to be visible. |
cl_railtrail_alpha | 1.0 | Initial transparency of the rail trail (it linearly fades to zero in cl_railtrail_time seconds). |
cl_railcore_color | 0xFF0000 | Color of the core rail trail beam in the hexadecimal 0xRRGGBB format. |
cl_railcore_width | 3 | Width of the core rail trail beam. |
cl_railrings_color | 0x0000FF | Color of the rail trail rings in the hexadecimal 0xRRGGBB format. |
cl_railrings_width | 3 | Width of the rail trail rings. |
in_driver | "" | Specifies which non-keyboard (typically mouse) input driver to use. When set to "" or "video", default input facilities provided by the current window system are used. On Windows, there is "dinput" driver available (DirectInput version 7 and higher). On GNU/Linux, there is "evdev" driver available (Kernel input event interface). |
con_clock | 0 | Toggles presence of clock in the right corner of console. Clock format is specified by com_time_format variable. |
con_height | 0.5 | Fraction of the screen in-game console occupies. |
con_chat | 0 | If enabled, all text entered into in-game console not explictly prepended by a slash or backslash is treated as chat. |
con_alpha | 1 | Transparency of the in-game console background. Only relevant to OpenGL video modes. |
con_scale | 1 | Scale factor of the console text. Only relevant to OpenGL video modes. |
con_font | "conchars" | Font image of the console text. |
con_background | "conback" | Background image of the console. |
scr_demobar | 1 | A bitmask, specifies whether graphical status bars are drawn at the bottom of the screen
when client demo or local MVD is being played back.
|
scr_scale | 1 | Scale factor of the HUD. Only relevant to OpenGL video modes. |
scr_font | "conchars" | Font image of the HUD text. |
fs_restrict_mask | 4 | A bitmask of filesystem restrictions. May be set from command line only.
|
com_completion_mode | 1 | Specifies what action should be taken when you press TAB in a graphical or system console.
|
Author (SkulleR) may be contacted using this email address.