ID:929334
 
Im creating my own lighting, and im wondering how i should do it, i was thinking adding a lighting to the clients screen, but its going to be hard to update it, so then i thought about adding a overlay to every turf, but that would just create
ALOT of lag and use alot of space and be hard to update, so then i thought about adding a obj over everything, but that would just be dumb and use alot of space and make lag,
what should i do?
neither really helped me :/
i doubt that try looking at Forum_account's
ok ill look once more, but im asking how to show the lighting
They both include demos, showing exactly how they work.
Modern games calculate lighting every frame, some also have pre-calculated static lighting on top of that. However, BYOND lacks any kind of client-side processing, therefore it will lag unless you use only static lighting.
In response to Zaoshi
You COULD just change the lighting uppon movement and again uppon the addition or subtraction of light sources. This would be just as usefull and a lot less costly then updating every frame.
ok thank you for your input, but my question is still un answered, i want the best way of how to put it into the game, now how to make it work, should i put it as overlay or should i put a lighting on EVERY turf?
In response to NNAAAAHH
NNAAAAHH wrote:
You COULD just change the lighting uppon movement and again uppon the addition or subtraction of light sources. This would be just as usefull and a lot less costly then updating every frame.

This is pretty much how my lighting, F_a's lighting, and Shadowdarke's lighting function: only update when a light source undergoes some kind of change, whether it's a change in location, brightness, radius, creation, or deletion.

Shwb1 wrote:
ok thank you for your input, but my question is still un answered, i want the best way of how to put it into the game, now how to make it work, should i put it as overlay or should i put a lighting on EVERY turf?

I use /area, Forum_account uses /obj, and Shadowdarke's DAL uses /area. I've tried /image, and have discovered that it tends to be a bit slow.
Using turf overlays is also a viable option, so long as your game functionality is not affected by setting turf mouse_opacity to 0.