D2X-XL Worklog

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

Better Palette And Color Handling

To this day, D2X-XL has been plagued by miscolored menus and Descent 1 exit sequences. I had figured a solution for this problem a long time ago already, but since it required some major recoding of all color and palette handling in D2X-XL, it was only this week that I finally tackled that task.

Some tech background.

A palette is table containing 'real' (RGB) color values. It's main purpose is to save texture memory: If a texture only contains a limited set of colors (let's say: No more than 256), a palette is created containing these colors, and instead of storing the 4 byte RGBA color value for each pixel, a one byte index into the palette is stored.

Backdraws of this method are:

  • It requires extra computing time to rebuild the RGBA picture if it is to be displayed.
  • You may be forced to artificially limit the number of colors used in an image to the palette size.
  • Allimages using the same palette are limited to using the same (limited) color set.

Since memory was more precious when Descent 1 and 2 were created, Parallax chose to go this way.

So far so good. Parallax however chose to use several palettes, depending on image type (one for color fonts, one for backgroundimages, one for wall and object textures ...), and that is what the guys porting D2 to OpenGL stumbled over.

Each texture had to be temporarily converted to an RGBA image for rendering by OpenGL. Instead of keeping several palettes and assigning a reference to its palette to each image, the D2X makers chose to use one global palette. To makeimages being based on another than the current global palette work with it, they created code that remapped suchimages' colors to the global palette.

Now go figure how easy it is to foul up that remapping process. The entire palette handling introduced by Parallax/the D2X team was a mess.

D2X-XL v1.6.178 and up now keeps track of all palettes used in the program, and assigns a reference to the palette its based on to each (palettized) image in the game. That means that there is no (time consuming and error prone) color remapping any more. A nice side effect of this is that Descent 1 textures are now being rendered using the original Descent 1 game palette, and are not being remapped to Descent 2's groupa palette. Above that, palette and color selection operations are now significantly faster than before (you won't notice that speedup though, as it's already in the 'supersonic' realm.).

A second measure I took to steer clear of palette problems was to use true RGB colors wherever applicable (e.g. in-game index and automap). This removes color changes due to use of different game palettes (as Descent 2 has).

In the process of rebuilding this code I had to change a lot. If you notice any miscolored stuff in D2X-XL, please file a bug report on SF.net and attach a screenshot showing the problem.


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.