Progress on v4.0157b
Code: Select all
v4.0157b
3/14 - clamped light level to avoid DIV/0 error
3/15 - added check for no/null sprite in shadow caster, deleted exception coding
3/16 - added Y-shrinking over high drop offs close to player view
3/17 - added light size adjustment based on color settings
3/17 - checks for caster lights, bug fixes for shadow pitching of long shadows (bug fix)
3/17 - check for 3d distance of light (performance)
3/17 - search animated texture lumps instead of list
Lots of progress.
I've eliminated almost all hard-coded items with the exception of flashlights (working on that, since these are inventory items), making this that much closer to universal.
Lots of code cleanup and simple bug fixes, especially in the long shadow code. Since I now pitch these shadows, I use the LineTrace HitLocation data to get the Z-height where a shadow hits a far wall. Priority is given to flashlights and missiles. It's early in testing and quite imperfect, but here are two examples of what this looks like with these shadows hugging walls:
E2M2
MAP10
Sprites still suck of course - they don't bend, fold, or mutilate - but generally it looks pretty cool.
Haven't looked at alpha as much, so there is more work to do.
I fixed a few bugs in the shadow thinker code, and while these improve performance it's not dramatic. The big improvement should be in eliminating shadow generators without a sprite to cast a shadow, more of a problem in complex gameplay mods. Reducing the number of thinkers improves performance.
I've also linked the size of dynamic lights based on the GLDEF files to menu color preferences, another universal improvement. Doom is a brown and green game, but that's not true for all games and mods (and users have their own preferences), and tweaking these values can now (very little testing) tweak dynamic light size. This was more of an afterthought on my part and isn't that dramatic, since dynamic lights lower framerates.
Many many thanks for the interest, comments, and suggestions. I appreciate it!
Release "soon."