PDA

View Full Version : Lighting


steve_d555
January 31st, 2006, 10:45 PM
I've been trying, for the past couple days, to figure out a lighting scheme. I was thinking entities blitted on a large surface the size of the map which is then overlayed over everything. However, I have been having trouble coming up with an entity class for the lighting. I have made them circles going from white -> transparent white, but that doesnt seem to look as good as planned. I was thinking black -> transparent black, but that also doesn't look as good as planned, and also, I can not figure out a way to get the rest of the map (which is not lit) to be black. Anyone got any ideas?

rob
February 1st, 2006, 05:21 AM
What about making each individual object responsible for its own lighting effects? This would allow each one to tackle it different ways if necessary.

steve_d555
February 1st, 2006, 08:17 PM
I'm not sure I get what you mean. Do you mean each object has lights (like powerups, weapons, ships, etc.) and they are draw when the object is drawn? Sorry if I completely missed the point :o

Sort of like this? (Forgive my Paint skills, the circles are different light intensities):
http://img90.imageshack.us/img90/4031/lighting4xy.th.png (http://img90.imageshack.us/my.php?image=lighting4xy.png)

rob
February 2nd, 2006, 05:47 PM
No you got the point. I was a little vague I know, this helps me not get into so much trouble ;)

Seriously though, if each class had certain methods, like DoLighting for example, they could be put in a collection of objects and rendered in a tight iteration, and each object could do whatever it needed to impose its lighting on the screen.