In the engine room

This is an old post from the year 2012 recovered from the Web Archive.

We have some Fun™ Things™ on the way in Alpha 3. This article is concerned with the game engine; if you want to know about models, animations and textures, wait


There’s a new command for people to play with once, maybe twice – /maplog. This shows the current map and the previous five results.

The +buttonN commands have been removed. You’ll need to use other commands:

+button2 → +useitem
+button3 → +taunt
+button5 → +attack2
+button6 → +dodge
+button7 → +activate
+button8 → +sprint

For admins, there’s /warn, intended for use in warning players to improve their behaviour.

Finally, /centerview has been enabled.


Gameplay tweaks

Anti-spawnblocking has been added. If you sit on one of your team’s spawn points for too long, you’ll be moved; if you persist, you’ll end up “in the wrong place”. It’s switched off by default, and admins can toggle this by setting g_antiSpawnBlock.

There have been some fixes made to wallwalk dismount. This is mainly about not suddenly being turned 180° when dropping off a sloped ceiling. If you do find yourself facing the wrong way, let us know…

The lucifer cannon primary attack has received a ‘small’ buff. Now, the speed of the luciball depends linearly on its power: lowest is as fast as the secondary attack (but still ⅓ of the power), highest is unchanged.

The flamer damage falls off over distance – initially slow, but rapidly down to 0 at full range. Enabled by default, it can be toggled using g_flameFalloff. (It uses a quarter of a cosine curve.)

If you want to play with weapon power, luciballs and pulse shots can be configured to have a power fall-off. Each has a pair of variables which controls how this happens: g_luciFullPowerTime and g_luciHalfLifeTime for the luciballs and g_pulseFullPowerTime and g_pulseHalfLifeTime for pulse shot. Setting the half-life time to 0 (which is the default) disables the fall-off. The fall=off, when it begins, is initially fairly steep. This needs to be fixed.


Draw votes may require a reason. This is an admin choice; set g_drawVoteReasonRequired to 1 to enable this.

An end time can be set for when map- or layout-change votes are no longer allowed (g_mapVotesBefore, set in minutes) and, similarly, a start time can be set for when draw votes are allowed (g_drawVotesAfter).

Building rights votes can not be started during Sudden Death.

Pass percentages can be set for all votes. By setting the percentage to 0, groups of votes can be disabled. (g_mapVotesPercent for map or layout change votes; g_drawVotesPercent; g_admitDefeatVotesPercent; g_denyVotesPercent for mute and build votes; and g_nextMapVotesPercent. )

There are two new vote types, spectate and poll.

spectate is intended to be used as a lightweight kick. Instead of banning the player for a short time, he is removed from his team and made a spectator. The player is also prevented from joining a team for a while (g_adminTempBan, exactly as for kick votes).

poll is just there for fun. It’s disabled by default, and can be enabled by setting g_pollVotesPercentage to some suitable value. 50 is recommended.

(We’ve discussed making both kick and spectate team-vote only. That may yet happen…)

Voting may continue into the intermission for kick, spectate, nextmap and poll.


The inactivity timeout setting can be used to move idle players to spectators instead of kicking them. Append s to the value for g_inactivity.

Problem players?

Admins have two new commands, speclock and specunlock, which respectively move a player to spectators and prevent him from rejoining a team for a while (at most, until the end of the current game), and allow him to join a team again. speclock requires the kick flag, and specunlock requires the ban flag.

speclock is used by spectate votes.

Players can no longer register as UnnamedPlayer and admins can not set any with tha to any level other than 0.

Other stuff

Range marker line drawing and various animation problems have been fixed.

An authentication problem which I experienced on the EU server has been fixed.


There’s a simple shader cache. So long as the required OpenGL support is present (it doesn’t seem to be in Mesa), you’ll get faster start-up times once the cache has been populated. However, changing things like display size will require that the shaders are recompiled.


r_mode can be set to -2, which tells Unvanquished to set the game window to fill the screen. However, because SDL tells the game what the total display area is, those with multi-monitor set-ups will find that the game occupies them all.

The default setting is now 6 (1024×768). If you run Unvanquished on a netbook, you’ll probably need to set r_mode to something else…

The same set of pre-defined modes which is available in the GL3 renderer is now also available in the GL renderer, increasing the number available. However, some larger modes have been renumbered, but this is outweighed by making it easier for those affected by that to switch between renderers should they need to.

If you find that, for example, a dozen trappers causes a significant reduction in frame rate, you can disable the new models. There are three console variables for this: cg_highPolyPlayerModels, cg_highPolyBuildableModels and cg_highPolyWeaponModels.

Range marker display has been disabled for spectators. If you’re watching a builder, you’ll still get it displayed for whatever he’s positioning.

Oh, and there’s now a window icon!

User interface

There’s a nostretch command for displaying images without changing the aspect ratio.

Your health and the build timer may now be displayed as bars. UI builders will need CG_PLAYER_HEALTH_BAR and CG_PLAYER_BUILD_TIMER_BAR.

In-game, using Shift-Tab is now distinct from using Tab to step through options. Also, yes/no options can be toggled using the Return key.


The console (if using curses) has improved colour display. If the terminal has 256-colour support (as xterm and any libvte-based terminals do), that will be used if com_ansiColor has a positive value. Otherwise, there are two colour sets to choose from: set it to 1 or 2 to choose which. You can also use -1 and -2 if 256-colour support doesn’t work properly for you.

Hidden stuff

fs_libpath is available as a second path for use by packaged installations. It’s certainly useful for our .debs.

Plug-in game libraries (.dll, .so, .dylib) won’t be loaded from the user directory (where your autogen.cfg is stored and where downloaded maps go). Loading them from there could be a security risk; who’s to say that they’ve not been downloaded from some game server set up with malicious intent?

Unvanquished is built with hardening options (for security reasons) when built with a gcc-compatible compiler. For those who want the technical details: you get -fstack-protector –param=ssp-buffer-size=4 (which provide protection against stack smashing) and -z relro -z now (which cause relocations to be resolved immediately and marked read-only).

Is that all?

Yes. There’ll be new pak files, but that’s not for me to discuss.

Some of the above additions are sourced from the Aardvark QVM for Tremulous GPP.