Greetings and salutations!
For this week's screenshot, a tomb-slab found in the upper level of the barrow: (The occupant has yet to be modelled.)
The week just past was... a bit of an odd one, bumpy in places, occasionally distracted, but nevertheless with some progress made.
Monday, March 27. 2017
Bumps in the Road
Work went into a variety of elements, a fair few in number. Most were sufficiently small or uninteresting that I don't mean to cover them in depth in this post: I worked on the first level's geometry, bug-fixing, collision geometry, various tweaks, and so on.
I mentioned last week, I believe, that I had made changes to the shadow-rendering code. I discovered in the week just past that this has resulted in a number of shadows not being cast as intended. In particular, texture-mapped transparency and adjustments to vertex positions in vertex-shaders are no longer reflected in the object's shadow: the simple shaders now used by the shadows don't include either. The latter could perhaps be added--but that does likely come with an impact on performance.
In the case of curtains (which use vertex-offsetting) this has been dealt with via a tweak to their shaders. Objects placed within the offset region of a curtain will likely be incorrectly shadowed, but that should be a fairly rare occurence, I imagine.
For objects with transparent regions, my best idea thus far is to simply use geometry where feasible. For example, the leaves in trees were being shadowed via a flat, texture-mapped shadow-caster. This might be replaced by a similarly-flat caster with geometry that gives a leaf-like shadow.
As to the first level, I finished modelling its upper corridor, and partially completed the adjoining rooms.
And doing so revealed that, unfortunately, the game seems to still have performance issues.
I hunted for the source of these problems, and while I found some evidence, the source remains unclear. I have, however, posted on the Panda3D forums, and am hopefully in the process of getting some help in the matter.
(I currently suspect that the problem is related to antialiasing.)
As a result, as I recall, I was hesitant to go too much further with the level, or to show off what I had done--after all, it may well be that changes will be made. (And for that matter, I'm strongly considering remodelling the walls either way.)
Thus, at the end of the week I decided to spend some time on the combat mechanic, and to the two enemies faced in the first level.
The first mummy's AI was tweaked a little: it should now be less inclined to shove the player, and its rate of attack should increase over the course of the fight, and when it's struck. These changes should, I hope, make it feel a little more distinct from the second mummy than it already did.
I also experimented with slowing or stopping time when the player or enemy was hit, thinking that it might add weight to the blows, but decided that I didn't like it.
During combat with the mummy, I discovered a new bug: when the player held a parry, the mummy would consistently select attacks that wouldn't land, rather than ones that would.
In addition to this, there was previously-discovered issue that I had intended to fix as part of this work: attack-distances were handled in such a way that their reach to either side seemed far too long, with characters being hit when it seemed that they shouldn't be. Simply reducing the range of the attacks would have resulted, I believe, in attacks falling short of enemies directly ahead when it seemed that they should have landed.
Investigating these, I came to the conclusion that fixing them would be tricky, given the approach that I was taking to testing whether an attack would land.
And so I decided to rework that.
The process turned out to be rather more difficult than I had anticipated. This was perhaps exacerbated by my choice of line-circle intersection test: instead of the high-school maths approach, I chose something a little more arcane, but theoretically sound. (... It seemed like a good idea at the time.) It's working now, I believe, but I fear that it was a bit of a source of stress for a while!
The process is still underway, but starting to show promise. The range issue is partly fixed (with some tweaking called for), I believe, and with the new testing method I think that the AI's attack-selection logic should work rather better.
That's all for this week--stay well, and thank you for reading! ^_^
I mentioned last week, I believe, that I had made changes to the shadow-rendering code. I discovered in the week just past that this has resulted in a number of shadows not being cast as intended. In particular, texture-mapped transparency and adjustments to vertex positions in vertex-shaders are no longer reflected in the object's shadow: the simple shaders now used by the shadows don't include either. The latter could perhaps be added--but that does likely come with an impact on performance.
In the case of curtains (which use vertex-offsetting) this has been dealt with via a tweak to their shaders. Objects placed within the offset region of a curtain will likely be incorrectly shadowed, but that should be a fairly rare occurence, I imagine.
For objects with transparent regions, my best idea thus far is to simply use geometry where feasible. For example, the leaves in trees were being shadowed via a flat, texture-mapped shadow-caster. This might be replaced by a similarly-flat caster with geometry that gives a leaf-like shadow.
As to the first level, I finished modelling its upper corridor, and partially completed the adjoining rooms.
And doing so revealed that, unfortunately, the game seems to still have performance issues.
I hunted for the source of these problems, and while I found some evidence, the source remains unclear. I have, however, posted on the Panda3D forums, and am hopefully in the process of getting some help in the matter.
(I currently suspect that the problem is related to antialiasing.)
As a result, as I recall, I was hesitant to go too much further with the level, or to show off what I had done--after all, it may well be that changes will be made. (And for that matter, I'm strongly considering remodelling the walls either way.)
Thus, at the end of the week I decided to spend some time on the combat mechanic, and to the two enemies faced in the first level.
The first mummy's AI was tweaked a little: it should now be less inclined to shove the player, and its rate of attack should increase over the course of the fight, and when it's struck. These changes should, I hope, make it feel a little more distinct from the second mummy than it already did.
I also experimented with slowing or stopping time when the player or enemy was hit, thinking that it might add weight to the blows, but decided that I didn't like it.
During combat with the mummy, I discovered a new bug: when the player held a parry, the mummy would consistently select attacks that wouldn't land, rather than ones that would.
In addition to this, there was previously-discovered issue that I had intended to fix as part of this work: attack-distances were handled in such a way that their reach to either side seemed far too long, with characters being hit when it seemed that they shouldn't be. Simply reducing the range of the attacks would have resulted, I believe, in attacks falling short of enemies directly ahead when it seemed that they should have landed.
Investigating these, I came to the conclusion that fixing them would be tricky, given the approach that I was taking to testing whether an attack would land.
And so I decided to rework that.
The process turned out to be rather more difficult than I had anticipated. This was perhaps exacerbated by my choice of line-circle intersection test: instead of the high-school maths approach, I chose something a little more arcane, but theoretically sound. (... It seemed like a good idea at the time.) It's working now, I believe, but I fear that it was a bit of a source of stress for a while!
The process is still underway, but starting to show promise. The range issue is partly fixed (with some tweaking called for), I believe, and with the new testing method I think that the AI's attack-selection logic should work rather better.
That's all for this week--stay well, and thank you for reading! ^_^
Trackbacks
Trackback specific URI for this entry
No Trackbacks