<font size="3">Tilebased Light - kinda like Minecraft</font>
Hi everyone! Im new to the forum but not so new to Construct.
Thanks for such a wonderful application! Free of Charge! <img src="smileys/smiley2.gif" border="0" align="middle">
Im having a brain meltdown here, and this is my last resort.
I have searched the web for this but I can only find C++ examples and Im no good at interpret that. I have also searched the forums here but I can't find any example which explains this.
As the title say: Tilebased Light, how would you go about doing that?
I have tried to add a light variable to every tile and depending on the distance to the light source it gets a certain light value. Then I used that value to set the color filter using the RGB expression. And that worked well. But with multiple lightsources when the lighted area is overlapping and should get a addative effect, I just can't work it out.
I have also looked at the Bresenham Line algorithm, which some people suggested on the net, like this:
Youtube Video
But I can't figure it out... <img src="smileys/smiley9.gif" border="0" align="middle">
So Im asking for help/directions/examples... <img src="smileys/smiley19.gif" border="0" align="middle">
That would really get me going again. <img src="smileys/smiley4.gif" border="0" align="middle">
/MJOne