D2X-XL Worklog

Notes on features and problems from the development of D2X-XL, newest first.

Code Cleanup

SDL2

D2X-XL was built on SDL 1.2, a library that has been outdated for many years. It has been ported to SDL2, which now provides the window, the timer, keyboard, mouse and joystick input, music and the download of missions. Sound effects have moved to OpenAL.

Floating Point

Descent was written with fixed point arithmetic, which was the fast way of doing math on the PCs of its time, and D2X-XL had carried it along ever since: fixed point numbers, vectors and matrices, and angles in a format of their own.

All of that is gone. D2X-XL 2.0 computes with floating point numbers throughout; angles are degrees and times are seconds.

A Slim Interface To The Old Formats

The data files of Descent are still fixed point, of course: levels, models, robot and weapon data, demos. They are converted in exactly one place, in the functions that read and write a file. What these hand to the game is floating point, and the rest of the program never gets to see a fixed point number.

Historical Baggage

D2X-XL could still load save games from versions long gone, and paid for it with two loaders and version checks all over the code. That has been removed: D2X-XL 2.0 only reads its own save games, and older ones no longer load. Levels, pilot files and demos from older versions still do.

A lot more went out on this occasion: the nostalgia options, the console, KALI and IPX networking, the separate Descent 1 robot AI, the render paths for anaglyph and shutter glasses, and plenty of code nothing used anymore. The source code has shrunk by about a fifth.

Vulkan And DirectX 12 Instead Of OpenGL

The renderer has been rebuilt from scratch; nothing of the old rendering code is left. D2X-XL now renders with Vulkan or with DirectX 12 instead of OpenGL, because OpenGL supports modern features like hardware raytracing or VR poorly or not at all. Vulkan is its worthy modern successor: it is fast, it is universal, and it is available on many platforms, Linux in particular. There is a separate program for each of the two, and both are built on a rendering library of my own.

All shaders are prepared when the program starts and kept in a cache on disk, and what the graphics card needs beyond that is set up while a level loads. This is to avoid the little hitches you get when such things are only prepared at the moment they are needed for the first time.

Multithreading

D2X-XL used to spread work over several CPU cores with OpenMP and a number of threads of its own. There is now a single thread pool for everything that runs in parallel.

Its essential feature is a load threshold. Every loop tells the pool how much work one of its items is, and the pool only spreads the loop over several cores when there is enough work in total to make it worthwhile; handing five items to a dozen threads costs more than it gains.

Running this way are robot AI, homing weapons, particles and sparks, visibility, the lights of segments and portals, the light in fog, tessellation and the conversion of textures. The number of threads can be set with the command line switch -multithreaded.


News

A new D2X-XL update fixing broken screen resolution persistence is available

There is yet another D2X-XL update is available (the new Pumo Mines broke a few things ...)

Believe it or not: There's a new D2X-XL version online!

Uploaded updated D2X-XL and library source code that compiles with Visual Studio 19

After a really long time, another new DLE version is available

A new DLE version is available (hear, hear!) :D

A new Max OS X version of D2X-XL is available!

D2X-XL now offers a cartoon style render mode!

New D2X-XL and DLE versions are available

Blarget has got his own area in the level spotlight

New D2X-XL and DLE versions are available

A couple of levels have been added to the level spotlight

Hooray! We're finally having a new Mac OS X version of D2X-XL!

D2X-XL now features an observer mode for multiplayer games

A new D2X-XL version with improved multiplayer synchronization is available

A new D2X-XL version fixing out of sync problems in multiplayer games is available

A new D2X-XL version with many multiplayer bug fixes is available

Added high quality (ogg) Descent 1 and 2 music to the downloads area

A new D2X-XL version with important bug fixes is available

D2X-XL compiles and runs on Linux again!

Descent 1 and 2 high res textures are now available as complete downloads

A new DLE version with a ton of bug fixes and improvements is online

A new D2X-XL version is online

A new D2X-XL version with a much needed bug fix is online

A new DLE version is online

Published another DLE version with more bug fixes and improvements by Sirius

Published a new D2X-XL version

Published a new DLE version with tons of bug fixes and improvements by Sirius

D2X-XL now supports Oculus Rift 3D headsets!

Updated DLE and D2X-XL to support new level features requested by Pumo

Added an article about DLE's new tunnel generator to the worklog

DLE's new tunnel generator is finished

Added a new article to the worklog

Published a new DLE version

Added a new article to the worklog

Added two new articles to the worklog

D2X-XL and DLE-XP now support triangular segment sides!

DLE-XP has an OpenGL render and 1st person view!

New DLE-XP version available

Wrote a new worklog article

Check out DarkFlameWolf's level spotlight section!

New DLE-XP and D2X-XL versions are available

A new DLE-XP version is available

Added a worklog article about the way point feature

Added way point support to DLE-XP and D2X-XL

Posted a bunch of new screenshots

Posted a bunch of new screenshots

A New version of DLE-XP is available

New OS X version of D2X-XL is available!

Added article about lightmaps to worklog.

New article and video added to worklog.