D2X-XL Worklog
Notes on features and problems from the development of D2X-XL, newest first.
Fusion Guns & Hitboxes |
|
This is a two part work log entry: The first part is about the Fusion gun, its special properties and some problems resulting thereof. The second is about weapon hit detection. The Fusion Gun The Fusion gun has the special property of its shots travelling through all objects they hit, damaging every one of them on their way. Although a Fusion shot is moving pretty fast, depending on rendering speed it can happen that it has contact with the same object during several frames. To keep it from damaging such an object in each frame, Descent remembers the object such a shot has hit last. This works well if the shot only hits one object per frame, but if it hits several of them, it will 'forget' those it has hit earlier, and damage them again in the next frame. To avoid this, D2X-XL now uses a sufficiently large list of hit objects for each Fusion shot, effectively removing this problem: ![]() ![]() Hit Boxes Did you ever notice that your shots are damaging a target although from looking at it they should have missed? The reason for this is that Descent uses a simple sphere enclosing each object for hit detection. This is a very crude method, but easy to compute. I never liked that, and nowadays even low end computers have enough horse power to do better. Of course the most precise method would be to use a per polygon hit detection, but as most objects in Descent are pretty boxy, using cuboids enclosing them is a good and easy to handle approximation. I had had this in mind over a year ago, but had never come around to implementing it. In the course of investigating the fusion problem I finally added this feature to D2X-XL. As using per submodel hit boxes is a neat and simple improvement over a single hitbox, I added an option to use these, too. When enabled, hitbox collision detection will work for all objects. That means that collisions of player ships with robots will profit from the increased precision here too, and you may be able to slip through groups of robots, or through between robots and walls where you couldn't before. This feature definitely adds to the realism and challenge of Descent, and should be a great
enhancement particularly in competitive multiplayer gaming. In multiplayer games, it is of course host controlled and not available
if the game host doesn't use D2X-XL. Here are a few screen shots to give you an impression of this feature: ![]() ![]() ![]() |








