Tuesday, July 17, 2012

Towards the Light / Beaming Outward

Two terrible titles to make up for the missing title of the last post.

Moving along.  First, I was testing the order in which light scans occur by starting dark and getting lighter for each ten "pixels" scanned, the restarting. Working properly, it looked like this, and was pretty cool, so I took a snapshot.

Groovy
 I will note that the program scans in octants, 8 traingular sweeps ouward from the center of a light source (our player, at the moment).  This picture shows the lightest points at the beginning of the sweep and darkening at the end of the sweep (light multiplied by angle).


This was closer, but I found 4 points where the light overlapped still, and corrected it.  Now i need the bricks underneath to block the light.



Next, I wanted to see where the scans first detect shadow.  There seems to be some sort of offset error I need to fix, but it's close to correct.  Here's a video that is somewhat interesting!



More pics to come, as I code.

No comments:

Post a Comment