So with intent to start playing this game, here's what I've been working on tonight:
The idea is to use an external DLL to generate a per-client lighting mask that can just be rendered as a single client.screen obj over the top of everything, so we get nice pixel-by-pixel lighting. The current implementation is only a few hours old, so it doesn't do a lot yet - doesn't really work in circumstances where the client eye shifts around (readily fixable), probably not really fast enough for proper realtime use (less fixable), doesn't have any kind of concept of opacity (potentially fixable - need to think about that a bit), but it basically functions. Source is available here. The DLL is written in C++ using the Qt framework. And, as is my usual wont, it's not exactly documented.
If this intrigues and interests you, DarkCampainger has done some similar, very clever things.
Extensions, and Places Where This Could Go:
- Isometric mode, not just topdown mode (Would just require some maths to do the lighting in the right coordinate system)
- Coloured lights (Should actually be pretty easy)
- Just how fast can this be done? (Almost certainly much faster than I'm currently doing it, but the call from DM to the DLL is likely going to always be the bottleneck)
- Opacity. (Problems here include: How much precision do you want with the opaqueness? How do you light the tops of walls? How do you pass the information about location of opaque things to the DLL?)
EDIT: Added a DLL to the zip file. It's build for Windows, 32-bit, and does still require the Qt libraries, so I'm afraid running this will require a little work. Maybe I should host it...