Notes on features and problems from the development of D2X-XL, newest first.
Fullscreen Post Processing: Explosion Shockwaves
A really long time after having conceived the idea for a gun effect doing the mighty Fusion gun justice after
having seen Half-Life 2's Strider main gun effect, I have finally come around to implementing it. Lots of things
had happened in the D2X-XL since I had first wished to see such an effect in Descent, and all provisions (namely
rendering to texture using frame buffer objects) have been made quite a while ago.
I admit that I was a bit too lazy to write the distortion shader from scratch, so I googled for one and found it
on Geeks3D.
The shader there wasn't more than a good start though:
since it used relative coordinates, its distortion effect was more or less elliptical (depending on the render window's width:height ratio)
the effect it created always went across the entire screen
it could only handle a single effect
it wasn't coded too efficiently
My final shader handles all my requirements quite gracefully, creating up to eight nice, local, spherical effects. For the sake of
simplicity, effect parameters are passed via GLSL's gl_LightSource object.
uniform sampler2D sceneTex; // texture with current frame
uniform int nBias; // implode/explode
uniform int nShockwaves; // number of effects
uniform vec2 screenSize; // render window width and height
uniform vec3 effectStrength; // 10.0, 0.8, 0.1 * render window width
void main() {
vec2 tcSrc = gl_TexCoord [0].xy * screenSize; // create absolute texture coordinates
vec2 tcDest = tcSrc;
int i;
for (i = 0; i < 8; i++) if (i < nShockwaves) {
vec2 v = tcSrc - gl_LightSource [i].position.xy; // compute direction from effect center to pixel
float r = length (v); // compute distance of pixel to effect center
float d = r - gl_LightSource [i].position.z; // compute distance from pixel to effect area
if (abs (d) <= effectStrength.z) {// are we in the area of the wave ripple?
d /= screenSize.x;// scale back
d *= (1.0 - pow (abs (d) * effectStrength.x, effectStrength.y)); // create the wave ripple
d *= pow (gl_LightSource [i].quadraticAttenuation, 0.25); // dampen wave at end of effects lifetime
tcDest -= v * (nBias * d / r) * screenSize; // compute final pixel coordinate and sum it up
}
}
gl_FragColor = texture2D (sceneTex, tcDest / screenSize);
}
Here is a video showing the effect:
The effect shown in the video is not 100% physically correct - it doesn't take depth information into account. The current shader does however
to avoid shockwave effects distorting geometry or objects in front of them.
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