I noticed a while back that one of the posts in this section (which I can’t now find) mentioned in passing that one reason its author was sticking to adv3 rather than adv3Lite was that his game needed the various lighting levels that adv3 provides and adv3Lite doesn’t. That eventually got me thinking that this was perhaps the one remaining substantial feature of adv3 for which adv3Lite fails to provide any support.
It then struck me that this would make it a good candidate for an additional adv3Lite extension (even if there may not be that many games that would need it). I’ve accordingly now put together a Brightness extension, which represents my first attempt to fill in this gap. This has now been pushed up to GitHub and will be included in the upcoming 1.6 release. In the meantime, if anyone wants to try it out, it can be found as the brightness.t file under the extensions folder in my GitHub repo, adv3lite/extensions at master · EricEve/adv3lite (github.com). There are fairly extensive comments in the source file, but documentation for the extension is also available in the brightness.htm file under the docs folder under the extension folder.
In brief, the extension allows different light sources to have different levels of brightness and different containers to have different levels of opacity that can reduce the brightness of any light that shines in and out of them, together with the means of calculating the brightness of the light available within any room or container. This is just taken to be the brightness of the brightest source, but the extension also provides a hook to allow game code to define how it wants to calculate the accumulated brightness of multiple light sources (such as ten candles in one otherwise dark room). Some support is also provided for the transmission of brightness across a SenseRegion, but it’s inevitably a bit primitive (there are too many different kinds of situation this could be modelling for me to come up with anything much more sophisticated).