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:

Multi threading and hyper threading

Postby karx11erx » Wed Jul 23, 2014 4:10 pm

Today, I have made an interesting observation - one I had made years ago already, I still remember it well: If D2X-XL uses more threads than the number of physical cores on Intel CPUs, you will have a much lower speed gain, if any at all, than when using just as many threads as there are physical cores on the CPU. That is because as good as all Intel CPUs available today have hyper threading, which you could imagine as a "lite" version of a core. With the massive amounts of data D2X-XL is processing, a physical CPU core has to share so many resources between its main and its hyper thread that it actually gets slowed down substantially. In my tests, I found D2X-XL to be running 30% slower when utilizing hyper threads than when not doing so on an Intel Core i7 CPU. :horror: :crazy:

:gotit: The quick solution to this problem is to enter the exact number of physical cores available in d2x.ini with -multi_threading parameter. I have also dug around a bit in the internet and found a method to determine the number of an Intel CPU's physical cores. AMD CPUs do not seem to suffer from this problem, as afaik they do not implement hyper threading.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

More multiplayer testing ...

Postby karx11erx » Sat Jul 26, 2014 10:14 am

... and bugs ... :oops:

So I did some more multiplayer with my son in our home network, and guess what? I found more bugs ... :wallbash:

This time missiles disappeared mysteriously. They never were respawned after having been fired and having exploded. Now D2X-XL has some improvement over the original code here by only respawning missiles once they have exploded, and not right after launch like the original game does. This seems more logical and helps preserving game consistency. If the missiles do get respawned, that is ...

That bug in D2X-XL's multiplayer code really is ages old. I remember having implemented that feature waaaaaaaaayyyy back in the past. Yesterday, I found the flaw in my implementation. So at least, this stuff is working now.

Another thing I had broken when changing folder handling after steel01 having complained about it was downloading of missions. That's been fixed, too.

Apart from that, D2X-XL multiplayer looked very good last night. :mrgreen:
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 Aug 01, 2014 8:15 am

Pumo has reported an interesting bug today: Robot triggers got operated simply by loading a savegame. When investigating this, I found out that that bug had always been present.

What was happening here was this: When loading a savegame, the level has already been loaded. The savegame loader unloads the level data including the robots. Since the code releasing the robots is also called when a robot gets destroyed during the regular course of playing through the mission, I have had it execute object triggers of objects being released. Now that object release code gets called during a lot of different occasions, one of them being loading a savegame, and not necessarily when a robot gets destroyed in the game. So any triggers of robots that had been initially loaded with the mission got operated when removing the robots to reset the level state prior to loading the savegame.

Since there is a dedicated function that is called to release robots (and other objects) that have been destroyed in the course of a mission, I have simply moved the object trigger activation to that function.

Luckily, this was one of the bugs that were very easy to fix.
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 Aug 29, 2014 9:19 pm

When deliberately trying to change slider values with the mouse recently, I noticed that it didn't work. I couldn't quite remember whether it ever had and I thought maybe not, but back in my head I thought it did.

Tonight I found some time to work over the menu input handling code, which was one of the last big messes in the D2X-XL code. They guys who had created it, had built one huge spaghetti code function doing all kinds of stuff and hacks with keyboard inputs and mouse clicks.

I changed this by putting bigger code blocks in separate functions, making it much easier to understand what the menu input handler was doing. Guess what? While doing that, I stumbled over the code handling mouse control over sliders. At one point of time in the past, it had actually been possible to change slider values with the mouse. I knew it. 8)

So I fixed that. A by-product of my changes is that you now need to double click a menu option to execute it; single clicking will only select it. This will prevent accidentally launching program options you didn't intend to launch.

The new D2X-XL also has a nice version number: 1.17.77. :D
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Smoke once again

Postby karx11erx » Mon Sep 01, 2014 7:00 am

Recently I was playing around with the smoke settings once again. For the heck of it, I disabled the 'disperse smoke' option there.

A brief explanation of what that setting does: When smoke dispersion is enabled, smoke is 'dissolved' by D2X-XL's particle renderer by making the smoke particle textures bigger and more transparent with every frame until their lifespan is exceeded. This is meant to simulate the looks of dispersing real world smoke. When smoke dispersion is disabled, D2X-XL makes smoke particles disappear by making them smaller every frame.

Actually to me the effect looks more natural with smoke dispersion disabled. However, when playing through a few Descent levels with smoke dispersion disabled I found that smoke was too dense, really hampering vision and occasionally causing the renderer to lag. Since visual smoke density depends both on particle transparency and amount of particles being rendered, I lowered the amount of particles on screen with disabled smoke dispersion a notch.

I think that it is as good as it gets now, and I really like the result. :)

Btw, the last two program versions have brought a few minor fixes and improvements of issues nobody except me (and Pumo :P) would have noticed anyway. ;)
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Weyrman effect improved again

Postby karx11erx » Wed Sep 03, 2014 5:16 pm

Did you know that the Weyrman effect still was somewhat flawed? You thought that opaque white sphere around the player ship was intentional, didn't you? :P

Actually it wasn't - it was a side effect of rendering lightning effects together with the shield sphere around the player ship. The sphere renderer had a bug where it bound the sphere texture before flushing the glow buffer from any other effects still in there, and flushing the glow buffer unbound the sphere texture ...

I had ignored that for the time being because I was tired of fiddling with that effect, but today I just couldn't bear it anymore, so I looked into the related code. The bug fix is a general fix for problems when rendering shield spheres together with other effects that were blurred by D2X-XL, so it does more for the program than just fixing the Weyrman effect, which is a good thing. :)
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

New OS X version!

Postby karx11erx » Tue Sep 09, 2014 11:41 am

Finally! A new, up to date OS X version of D2X-XL has arrived!

It took a lot of tweaking and testing by the OS X dev to eventually arrive there, but now it is done and you can download it from the Descent 2 website or the D2X-XL project's download area on Sourceforge.net. The rpm comes with complete OS X installation instructions. The new version will work on OS X 10.7 and higher.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Weird bug

Postby karx11erx » Thu Sep 25, 2014 5:11 pm

Today, I have finally found a solution for a weird little bug in D2X-XL haunting me for over a week now: The shield sphere used for the Weyrman effect wasn't transparent unless shadows were turned on. Opening a menu while the effect was active also rendered it transparent.

I still don't know why the effect didn't work, but in the end I found out that activating the render buffers used for blurring once when starting a new game fixed the problem. That's an acceptable work around for me, since it creates very low rendering overhead. Another little thing I added which improves the effect quite a bit is to fade the mine in before starting the effect. This looks really neat.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Long time no post ...

Postby karx11erx » Tue Jan 27, 2015 5:41 pm

... but D2X-XL isn't dead - not yet! :D

Recently, a D2X-XL fan contacted me regarding some changes and additions he had made to D2X-XL. I wasn't too fond of most of them (just a matter of taste, mostly), but one caught my attention: He had tried to hack a way into D2X-XL to make it precompute lightmaps for an entire mission. Of course, due to lack of detail knowledge of the D2X-XL code, his attempt was far from perfect, but it reminded me of a few feature requests made in the past, asking for the same function.

So I sat down and did it the way it should be done. It took me about two hours to get everything right. You will find a new entry "precompute lightmaps" in D2X-XL's main menu. If you select that option, D2X-XL will present you a dialog allowing you to select a mission, the number of the level to start computing lightmaps at, and to set the desired lightmap quality parameters.

Now the only remaining question is whether D2X-XL will actually compute lightmaps for an entire (probably large) mission without crashing, or not ... :think:

Any volunteers? :mrgreen:

Btw, I also fixed a few smaller bugs, one of the weird kind (truncated help menu texts), the other of the long standing type (powerups weren't displayed in the rear view).

v1.17.92 containing the new features and bug fixed will be published soon.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

DLE this time

Postby karx11erx » Thu Feb 26, 2015 9:38 pm

Howdy folks,

I managed to treat myself to look into some DLE bug reports recently, and what I read there irked me so much that I started to fix those bugs. In the course of that I noticed that DLE's capability to display animated textures was rather limited. The reason for that is that Bryan Aamot, the author of the original Descent Mission Builder DLE is based on, didn't have access to the texture animation data from the Descent data; So he only implemented texture animation for a couple of textures the frames of which had successive texture ids, something which apparently isn't the case for every animated texture.

Since I have full access to the Descent source code and hence can easily extract whatever is necessary to implement proper animated texture support in DLE from there, I have implemented some code to read the texture animation info from the Descent data, and DLE will hopefully soon be able to animate every texture (in the auxiliary texture displays like e.g. in the texture alignment tool) that is animated in Descent 1 or 2.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Animated textures in DLE

Postby karx11erx » Sat Feb 28, 2015 2:32 pm

Just a brief note: DLE now has improved supported for animated textures, showing them properly in auxiliary texture views (like e.g. the texture alignment window).

Fully animating them in the main mine view is not easily feasible, as that would require rendering the entire mine view at a sufficiently high frame rate.
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 » Sun Mar 01, 2015 1:11 am

Of course I had left some bugs in the new texture animation handling ... :wallbash:

These have been fixed now, and DLE 1.12.4 containing these fixes is available for download.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Back to D2X-XL

Postby karx11erx » Thu Apr 02, 2015 12:15 am

Back to D2X-XL.

While I hadn't planned to make any further additions to D2X-XL, I have actually added new features to it. Nothing too big, but certainly useful.

The first new feature I have added is a minimalist HUD showing all vital information (weapons, energy levels) close to the reticle. I must say that after a really short time of getting used to it, I find it extremely handy to be able to see at a glance which guns and how much ammo for these I have, and how many missiles of which type are onboard my ship.

The other new feature is automatic recharging of the player ship's shield and energy. The recharge procedure starts at a certain, adjustable time after the shield or energy was last decreased, e.g. due to a hit or due to firing a gun. You can enable that feature in the gameplay options menu. If you set expert options to full in the miscellaneous options menu, you can also control the recharge delay and speed.

There have also a few bugs been fixed that could appear when a lot of explosion and lighting effects were on the screen, so there's also a nice stability update of D2X-XL available.

You can grab the new program version at the official D2X-XL site.
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 » Thu Apr 02, 2015 8:13 pm

My latest feature addition had an unwelcome side effect (or maybe it was pretty welcome to some players ... :P): Players couldn't die anymore. I have fixed that and will upload a new program version shortly.

The recent stability update is working really well: I have played 15 or 20 minutes of frantic singleplayer (difficulty: insane) on my Linux box, and if the program is buggy, it will usually show that very quickly on Linux. I didn't have any problems, so this program version is looking good indeed.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Minimalist HUD

Postby karx11erx » Mon Apr 06, 2015 12:56 am

Regarding the minimalist HUD: I have been told the colors were "off" (text that was supposed to be red was yellow). That was intentional. However, I am open to feedback here. If it is widely felt showing equipped weapons in red would be better, it would be no problem to change that.

Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest