Skip to content

v0.5.0

Choose a tag to compare

@xndbogdan xndbogdan released this 01 Nov 17:38

About twice as fast

v0.5.0 is a performance release: roughly double the frame rate. At retail's 4:3 view, replays match v0.4.0 exactly. In widescreen the game now runs from the view on screen, which fixes enemies frozen at the edges (below).

Released Windows builds on an RTX 5080 desktop, 3840x2160 widescreen, frames per second (median of three runs):

Scene OpenGL v0.4.0 OpenGL v0.5.0 Vulkan v0.4.0 Vulkan v0.5.0
Terra Nova 116 282 127 248
Pelagia, dry 98 228 107 207
Stendahl Alpha 135 312 138 292
Altair Prime 125 299 141 279

Vulkan here is the raster (Ray Tracing off). Path tracing is limited by the graphics card, so it runs about as before.

What changed

One world draw in widescreen. In Infestation, drawing the world also runs part of the game: whether an enemy is in view, its fade, footprints. To stay exact, widescreen used to draw the world twice: once at retail's 4:3 view for the game, and once for the wide picture. Now the world is drawn once, from the view on screen. This also fixes enemies standing frozen at the wide edges of the screen. Network games are unaffected, since each object is synced by the player who owns it.

Less CPU work per frame.

  • Clipped polygons are no longer zero-filled before use.
  • The draw memory record is written once instead of twice.
  • The draw queue sorts by node order.
  • Each corner of a fan is converted once.
  • Vulkan keeps the last texture it bound.
  • Texture and pipeline lookups use faster hash maps.
  • The terrain's blend table is built once, and each tile's texture is looked up once per draw.

Better-optimised builds.

  • Builds target x86-64-v2.
  • Link-time optimisation is on.
  • Both builds are now profile-guided: the compiler learns from a training run of the game which code is hot. On Linux this was measured at 5–8% faster on a 2015 MacBook Pro with Intel graphics.
  • The Windows build now links the C runtime in, so no Visual C++ redistributable is needed.

Vulkan sends its GPU work from its own thread. The main thread records each frame's draw calls, and a second thread sends them to the graphics card while the game moves on to the next frame. The picture shows at most one frame later than before.

Requirements

The game now needs an x86-64-v2 processor, meaning one with SSE4.2: Intel since 2008 (Nehalem) or AMD since 2011 (Bulldozer). Any PC from the last 15 years has one.

Measurements and method: docs/PERFORMANCE.md.

Full Changelog: v0.4.0...v0.5.0