The lightning looks real good. Care to share some more info about it?
Hi! Thanks for showing an interest
It's really quite simple; certain entities are marked as light-producers (static things like fires, braziers, lava etc. As well as moving things like other players, NPCs, even fireballs).
When the rendering engine is building the frame, it builds a list of all the light producers in the visible area. It ends up with an array of 'LightSource' objects, each of which has a screen position and an intensity.
It then builds the darkness mask. The base colour is based on where the player is, and what time of day it is (it goes red during sunrise and sunset, is transparent during the day, and is almost opaque underground - the screenshot is underground). I simply iterate over the array of light sources, and 'carve' ovals out of the darkness mask. I do this with concentric ovals to give the 'fade out' illusion.
Finally the darkness mask is simply drawn on top of the main render, and as it has an alpha-channel, the render shows through more clearly closer to the light sources.
The position of each concentric oval is slightly randomized with each frame, so all the light sources 'flicker' slightly. The effect is quite nice, but breaks down with walls, cliffs and other '3D' parts of the game world, as the ovals don't deform around objects that have a height. There are also no shadows.
For a live demo, you can head over to
adranos.com. It's an MMORPG that I've been building in my spare time. It should be pretty simple to sign up, download and run the client
Or you can just check out some more screenshots at
adranos.com/features/screenshots/!