1
SFML projects / Re: SFML Light System - Let There Be Light
« on: June 20, 2012, 05:39:51 pm »
Many thanks
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I am not sure why you would want mirrors in a 2D game...I'm making a puzzle game based on lights. That is why I need a mirror, and colored lights and transparency and such. Without them, the puzzles would be slightly boring.
...but a planar mirror should be possible, if you render a second light representing the image of the light source in the mirror, and then invert the shadow masking for the mirror.This is exactly what I have in mind. The interesting part kicks in when some mirrors are facing at each other, or are in an angle next to each other, so light bounces off them multiple times. Ahh.. thinking is sometimes just plain tiring.
Curved mirrors would be pretty difficult...Whoa, man, these kind of ideas give me a heart attack Yes, they would be, at least with a vector-based engine. And I don't even dare to think about refractions... with curved surfaces...
I added the hull transparency feature, but it is not quite working yet . It will render a bit strangely at the moment. It will be fully functioning in the next version.