ID:1931453
 
(See the best response by Ter13.)
Code:


Problem description:
Hi this pic is from RPG maker Xp.
http://i.imgur.com/mEkN6.png
http://i60.tinypic.com/2dugryp.png
http://img142.imageshack.us/img142/9278/e77e2a809azl3.png

Is posible to do light effect like this, in byond?
I thinking about blend mode and alpha, but i don't know how to do this. :(

link to rmxp tutorial
http://www.gdunlimited.net/tutorials/t/rpg-maker-xp/ cosmetic-fog-layers
Best response
You can't do alpha masking, so you can only have one light like your last image at a time.

I wouldn't bother with lighting. It's something to jam into an already finished game, not something to distract yourself with while still working on the basics of your game.
ohhh... okay
I asked because, i made a night system and without thiss effect this all look ugly

(rain lib by: Kumorii)

Well, you might be able to get away with additive blending. It won't look as good as alpha masking, but BYOND really can't handle alpha masking.



^That's a lighting effect I made with additive blending.
There is a way to do it, but it involves partitioning the screen into tiles such that you can adjust masks per tile. D4RK3 54B3R's lighting system (as well as forum_account) use this particular method to achieve dynamic lighting.

BYOND's screen renderer doesn't really give you access to raw drawing commands directly to the screen itself. You have to treat things as sprite objects, each with their own properties of how they are rendered (atom vars).

I would probably do it this way: For each tile, implement the night sprite. Upon updating the light sources, drop the alpha on the night mask for each tile that is close to the light source. It might look blocky, but it is the primitive starting point to fine tuning a per-tile lighting system.

You can still use a multitude of masks, but they cannot overlap because they are still just images. The rest of the screen would need to be filled with night tiles.
In other words, it's not really worth doing. The knowledge level to pull it off is too high, and even with the high knowledge level, it's never going to be optimal.

Best to focus on something else for your game... You know, like actual gameplay.
Thanks you all.