DarkXL adds optional dynamic lighting that affects things like powerups, various props and weapons fire. As you can see from the following screenshot (a wireframe view of DarkXL), the vertex density in the environment is fairly low.
This means that vertex lighting is right out. Outlaws used vertex lighting in the hardware version for the headlamp... unfortunately it quite often looked awful because of the low vertex density. Jedi Knight suffered from this problem a lot too, although most lights were static so it was easier to deal with. Because of this I implemented per-pixel lighting. I do 2 lights per pass in order to support shader model 2 (dynamic lighting isn't available on lower end cards, other then the headlamp/flash when you fire like in the original), and just zero out the color for the second light if only 1 light is to rendered in that pass.
Here are some screenshots with dynamic lighting highlighted:
The lighting uses a smoothstep for attenuation, like so:
attenuation = smoothstep(0.0f, 1.0f, 1.0f-saturate(d));
where d = scaled distance from the light source (scaled by 1/light_radius).
This allows light attenuation to end at exactly zero at the radius but still have a smooth non-linear falloff. By changing 0.0f to some other value, you can get an "inner radius", where the attenuation is 1.0 inside the inner radius and falls off towards the outter radius.
I've also started a "secret" project recently that I haven't talked about until now: DaggerXL - a Daggerfall port/remake similar to DarkXL. The project takes a back seat to DarkXL until atleast beta, but allows me to work on something else with my free time (maybe once a week) so I don't get burned out. And a Daggerfall remake has been something I've wanted to do for a long time. Like DarkXL, it will use the original game data and emulate the original game play. It will also add easy moddability like DarkXL. Where it will diverge somewhat is that extended features will include adding a lot of gameplay elements that were intended for the original and got canned. Of course there will be the "classic" mode for people that want a truly faithful experience. The enhancements will include things like being able to dock your ship in a town with docks, sailing your ship, proper shape changing spells, being able to store items in your house (in the furniture) and more. :) So far I've got the basic engine up and running, using code from DarkXL. Things like core rendering, player physics, scripting, control mapping and so on. I've got 3D objects rendering, although I'm not loading the proper textures yet. And I'm parsing and building dungeon blocks, although the positioning/orientations aren't right yet - it does load and cache all the models and render.
3D models with a default texture (not a Daggerfall texture):
So stay tuned for more progress on both these projects. I'm going to try to maintain a journal entry at least once a week. Next time I'll talk about the visibility system in DarkXL, which is suprisingly different then you'd expect from a modern engine due to things like overlapping sectors. Also I expect to get dungeon blocks working with DaggerXL, possibly with textures. We'll see how it goes. Any comments are welcome. :)