pretty lights

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
EdadTace
Posts: 32
Joined: April 22nd, 2012, 10:28 am

pretty lights

Post by EdadTace » May 23rd, 2012, 8:36 pm

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

Image
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 :D

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 :)
Attachments
prettyLights.zip
(173.15 KiB) Downloaded 257 times

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: pretty lights

Post by LuX » May 24th, 2012, 10:20 am

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 : -)
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: pretty lights

Post by chili » May 24th, 2012, 12:39 pm

Pretty colors. :)
Chili

EdadTace
Posts: 32
Joined: April 22nd, 2012, 10:28 am

Re: pretty lights

Post by EdadTace » May 25th, 2012, 10:32 am

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

Post Reply