Development Blah

All other topics around Descent and D2X-XL

Moderators: Frustikus, simX, Aus-RED-5

User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Stability improvements

Postby karx11erx » Tue Apr 07, 2015 9:31 pm

Today I have added access functions for the most important game data elements (objects, segments, walls, triggers). These allow me to much better check data validity, and I have caught a huge bunch of flaky code locations already. This simple measure may have been the most important stability upgrade since my introduction of C++ array classes.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah

Postby karx11erx » Fri Apr 10, 2015 6:34 pm

The "funny" thing about the stricter data validity checks I have introduced in D2X-XL (see my previous post in this thread) is that these may currently cause program crashes. That doesn't mean that these tests don't work right - they actually do, but their results aren't yet handled properly in the areas of the code causing subsequent crashes. I will iron these issues out as quickly as possible, and the final result will be a stabler code that properly handles data inconsistencies that previously went undetected and could cause issues much later and at apparently completely unrelated code areas.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

DLE for a change

Postby karx11erx » Mon Apr 13, 2015 2:52 pm

I was playing around with DLE again recently, and I promptly stumbled over a few bugs it has. This means that level authors will find a new DLE version ready for download on my Descent site and in D2X-XL's download area on Sourceforge.net. :)
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Lightmaps ...

Postby karx11erx » Wed Apr 15, 2015 6:26 pm

After noticing some lightmap quirks in a few levels I had been viewing, I looked into lightmap calculation (one again), and found a long standing bug when introducing an optimization. Lightmap calculation should now be a bit faster (please don't expect miracles) and produce slightly better results.

While checking and fixing Shadow Hyena's impressive new levels (Coordination and Code Y.E.N.A.), I also noticed a couple of bugs in DLE, which I also fixed.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

time ...

Postby karx11erx » Thu Apr 23, 2015 9:53 am

I had time enough to browse the internet for Descent information, and when doing so came across a proposition on the Rebirth forum to create an in-game menu offering more choices to the player than just to abort the current mission when pressing ESC. It was asked for a small menu offering options to save and load games and to access the game settings.

D2X-XL has that for years. It's hard to believe that request wasn't inspired by that. Ofc, that wasn't mentioned there.

lol.

Someone was asking for a feature to have the Fusion do the same damage in D2 matches as in D1 (he mentioned he had liked that in D2X-XL). If the game host selects that for a multiplayer match in D2X-XL, every participating player will have this Fusion damage modified accordingly. As a side note, that guy mentioned that he didn't really like D2X-XL's souped up graphics. Personally I believe that these things still fit well with Descent 1's and 2's simple level design., but if you don't like colored light, hires textures and some smoke and flashier explosions, you can turn them off ... so that doesn't really make such a great argument against D2X-XL.

Another one had asked for a mission download feature, just like D2X-XL has it.

Yet another one asked for a "third person over the shoulder view" (chase cam).

There's a request for stereoscopic 3D.

People rather ask for features to be implemented in Rebirth even if they know it will never be going to happen, than use D2X-XL. Many of them probably because they got poisened by their peers.

Well, appreciation of a product has more to do with the social aspects coming with it than with its quality as a product by itself. People want to socialize, they want to share their experiences and emotions and want a common platform to make new experiences together. In spite of all my efforts to create a superior product with every feature people might want and the possibility to turn these features off for those who don't want it, in spite of all the value I have added by improving DLE, by creating a level spotlight offering hand picked top quality levels, by adding new game modes, D2X-XL has lost in this area. I have talked (more than) enough about the reasons for this in the past.

I regret having put so much time and effort into Descent. I did mess around with D2X-XL for my own entertainment, but I also did it for the fans of this game whom I tried to offer a viable alternative to the ugly pixel pulp the original game offers today, to its lack of proper networking and its barren graphics.

Nothing is as hard as man's ingratitude.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah

Postby karx11erx » Sat Apr 25, 2015 9:08 am

The D2X-XL level spotlight has a new area dedicated to Blarget, a young and very talented level designer. He has been creating so many levels of so high quality that there was no way around giving him his own section to display his levels. Go check it out! :)

I have also been playing around with particle effects a bit and I think I have managed to make missile smoke trails look a bit better again. Let me know what you think about it.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

New DLE feature

Postby karx11erx » Mon Apr 27, 2015 4:39 pm

Xfing had asked for a feature for DLE recently, where you can have DLE locate the segments and sides that bear a certain texture. I didn't really want to tinker with the related part of DLE, but today I needed that feature myself (and I had wished I had it often enough in the past), so I added it. The required code change was simpler than I had expected.

To locate a texture in DLE, click on that texture in the texture pane with the middle mouse button. Alternatively, click on it with the left and right mouse buttons, and only release the buttons once both are pressed. As you keep clicking, DLE will circle through the segment sides bearing that texture and mark them with the segment & side highlight (yellow & red wireframe).

No more looking for that darn last instance of a texture you want to replace for hours and hours. :hammer:
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Homing Missiles

Postby karx11erx » Wed Apr 29, 2015 8:43 pm

There has been a lot of discussion and tweaking of homing missile turn speed in the various OpenGL source ports of Descent. The background is that in the original game, homing missile turn speed was tied to the frame rate of the computer Descent ran on: The higher the frame rate was, the more frequently homing missile direction was checked and changed if the target had moved, making homing missile nigh impossible to dodge on fast computers. This had became a real problem once the first 3D graphics accelerators (oh that 3dfx Voodoo addon card) appeared and were supported by a special Descent 2 version (d2_3dfx). The only work around was to artificially limiting the game's fps. This btw. also was the only way to make it work properly with the mice available at that time - they simply had too low a sample rate to work with high frame rates in Descent: The mouse got sampled so often that you couldn't make it travel far enough between two frames to create a noteable distance offset for the program.

The last thing I had heard about the issue of homing missile turn rate was that the people around Drakona's Descent Retro Mod (which is based on DXX Rebirth) believe that 25 fps would be closest to the original game. Actually this opinion is by no means based on hard facts - it's simply personally preference, since homing missile turn speed relied on frame rate as explained above. Most computers at the time when Descent was new probably didn't achieve a significantly higher frame rate, so that's what people remember and makes them feel 25 fps as "just right" for homing missiles.

I always had good hardware, and from my memory an update frequency of 40 fps is coming closer to the truth.

Well, I am not into limiting people, and D2X-XL's physics options menu always allowed to adjust homing missile turn rate. It just never worked. :P The issue kept me thinking about it though, and today I looked into the related code and made it work. You can now chose between an update frequency of 25, 40 and 60 fps (yeah, 60 - dodge this! :mrgreen: ). This setting is of course server controlled in multiplayer games.

Higher settings will even work on slow hardware, as D2X-XL accumulates the time between two homing missile updates, and if the time passed allows for several updates at the given frame rate, D2X-XL will update homing missile heading several times. Example: At 40 fps, such an update should occur every 25 ms. If a computer only runs D2X-XL at 10 fps, it will only call the missile update check every 100 ms. 100 / 25 = 4, so the missile update function will change the missile direction 4 times to compensate for the long frame time.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Lightmaps

Postby karx11erx » Thu Apr 30, 2015 2:42 pm

During the last days, I extensively used D2X-XL's new lightmap precalculation feature. It works very well and is 100% stable (at least on my computers :P). For a bigger test, I had D2X-XL compute lightmaps for The Enemy Within, a mission with 32 levels that were of medium size on average.

Here are the settings (lightmap quality / precision) and the time my main machine took:

standard / standard: 1 hour
high / standard: 4 hours
high / high: 24 hours ( :shock: )
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah

Postby karx11erx » Tue May 05, 2015 5:22 pm

Image

What do you think? :D
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah

Postby karx11erx » Tue May 05, 2015 5:22 pm

In case you do not understand what's so special about those two pictures above: It's a render of the first level of Descent 2 by D2X-XL in cartoon style!

I had been thinking about adding a cartoon style (cel shading) render mode to D2X-XL for a long time, and after thinking about it and tinkering with it for a while, I finally had a simple solution for implementing it. Level rendering is almost done (I only need to fix a few minor flaws). Object outline rendering still needs to be implemented, but isn't fundamentally different (and I also needed something quite similar for shadow rendering).

So I reckon that by the end of the week a new D2X-XL version with a cel shading option will be released. :)
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah

Postby karx11erx » Tue May 05, 2015 5:23 pm

A bit more about implementing a cel shading style render mode in D2X-XL.

D2X-XL doesn't do real cel shading by the book. Instead, I tried to find a simpler route to achieving a similar effect. Since Descent's textures and level structures are rather simplistic, they are lending themselves well to such a rendering style.

The first hurdle I had to overcome was to obtain textures that look cartoonish while still having some detail. Simply using a texture's average color to colorize a face would look to bland. After a while of thinking about it and tinkering with GIMP, I finally had a simple solution involving heavily blurring textures and then decreasing their color depth significantly. The results I achieved with that were very pleasing and made the textures look pretty cartoonish in my eyes.

Once I figured how to use the existing texture base for creating cartoon style texturing, I added box blur (with running total) based gaussian blur and posterization (color depth decrease) functions to D2X-XL. These will be applied right before uploading textures to OpenGL, giving me a very clean and simple interface to modify level and object textures on the fly at a very central spot in the execution of preparing D2X-XL's renderer. D2X-XL already knows when it will load level textures, so it was easy to make sure only these textures were modified, and not e.g. fonts or wallpapers (although "cartoonized" wallpapers look very pretty imo ... :roll: ).

I implemented two versions of the box blur filter, one clamping color accesses at the texture borders, the other one wrapping around to the opposite side of the texture. It turned out that the latter one created much better results for tiling textures, with only minimally visible seams between adjacent faces with the same texture.

The next thing to do was to add outlines to the level geometry. The basic procedure is to outline contours; I.e. draw a dark (black) line where two faces meet and one of them is visible while the other is not. However, that wouldn't create a lot of outlines and leave a lot of visible edges out that should be accentuated by a dark line, too. The outline algorithm therefore will also draw dark lines at edges where two faces meet at an angle. Edges between faces at a very flat angle to each other will not be outlined to avoid too many lines cluttering the rendered image. Since a nice cartoon doesn't always have outlines between two endpoints of an edge, but often only draws partial outlines, D2X-XL outline renderer will do the same for edges depending on the angle of the two faces it connects (the flatter the angle, the shorter the line). At such edges, the outline will also be offset from the edge's endpoint by a random displacement to make the effect look more natural.

A problem I had to deal with when rendering outlines was z fighting with the underlying polygons (i.e. faces' textures blotting out the outline drawn around them). Since D2X-XL actually renders lines, and not back face culled polygons in line mode, I couldn't use OpenGL polygon offset functionality. Instead, I added a small offset towards the viewer to each line vertex. The offset is scaled with distance of the vertex to the viewer to avoid the impression of lines at far away faces hovering above their faces.

The same algorithm will be applied to 3D models in the game, making them look quite cartoonish as well.

It took me a couple of weeks where the concept more and more took shape while rummaging in my subconscious, and about two days of work to implement everything.

So simple. :D
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah

Postby karx11erx » Tue May 05, 2015 8:45 pm

I have posted an improved version of the above screenshot; And here is another one:

Image
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Cartoon Renderer Released!

Postby karx11erx » Fri May 08, 2015 8:17 pm

Cartoon Renderer Released!

D2X-XL's cartoon style renderer is finally done, tweaked and tested.

Image

You can read about it in my worklog (scroll the Descent2.de home page down a bit and click on the big orange "worklog" link).

Have fun and blow up stuff cartoon style!
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Cartoon Style Renderer Improved

Postby karx11erx » Sun May 10, 2015 10:17 am

One thing my cartoon style renderer couldn't do was handling a peculiarity of the underlying stone age Descent render engine, and that was outlining contours within textures. Just think of e.g. fans or gratings with the holes and gaps they model. Sirius had brought this issue up indirectly, and I had to started to think about a possibility to solve it ever since. Yesterday I finally implemented one. Depending on texture resolution, it doesn't look that pretty (particularly close up), because texture filtering can only do so much, but it adds yet more cartoon feeling to the renderer.

Image

Another thing I tried was to use low res textures and models with the cartoon style renderer. The result looked incredibly ... cartoonish. :mrgreen: Hilarious!

During my playing around and testing the new feature, I had noticed a few more issues, like not all edges being properly detected, and edges at faces with partially transparent textures, which I all managed to solve to my satisfaction.

Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest