Trying to create some sort of light system that will allow to create light points and place them around in a game
there's no actuel gameplay right now, you could say it's more of a tech demo, but there are 3 hardcoded light points and one that moves around with the cursor to make it a bit more interactive
fullsize image here http://img209.imageshack.us/img209/6429 ... ightsg.jpg
so as you can see the lights blends together additive ( called linear dodge in photoshop, if you're familiar with that ), like lights do in real life - which with the 3 lights, red, green and blue, simulates RGB colors
currently there's a bug that makes it not like different sized radius on the light points, but I'll try to figure how to work that out at some point
also there's no way of blocking light with other objects and stuff like that, so that will be a thing for the future
I've uploaded the code below, so feel free to take a look or mess around with it - and ask if u've got any questions, or want me to explain how different things of the code works ( sorry for lack of comments in code ^^' ) and I've probaly also forgot a bunch of other things I wanted to say here lol
anyway enjoy
pretty lights
pretty lights
- Attachments
-
- prettyLights.zip
- (173.15 KiB) Downloaded 260 times
Re: pretty lights
Wow really like it!
I tried to make something similar by calculating the pixel underneath and then insert the light pixel kinda like half and half, but it turned out slow and shitty.
This... I like : -)
I tried to make something similar by calculating the pixel underneath and then insert the light pixel kinda like half and half, but it turned out slow and shitty.
This... I like : -)
ʕ •ᴥ•ʔ
Re: pretty lights
thanks for ur replies
i'm gonna try implementing things like walls that will cover for light, but still having it go around corners the way it should
would also like to create different types of lightsources, so I can do things like a flashlight and other random thing like that
if I get a good result on this I'll try to implement on my diggin holes game for sure - torches to hang up, lights in the ceiling and even lights on miner's helmets would be damm cool
i'm gonna try implementing things like walls that will cover for light, but still having it go around corners the way it should
would also like to create different types of lightsources, so I can do things like a flashlight and other random thing like that
if I get a good result on this I'll try to implement on my diggin holes game for sure - torches to hang up, lights in the ceiling and even lights on miner's helmets would be damm cool