Sunday, July 19, 2009

Color!

So, I've been putzing around with 3d LOS. I knew that before I could implement this, I'd need to figure out how the objects are actually represented in the 3d environment. I'm thinking about doing it this way:
Any object that blocks light will have a linked list of 'obstacles.' Obstacles will be put into the list such that those at the front of the list will have the highest priority, and this will create a sort of boolean shape. If the first list object is a smallish obstacle that allows for light to pass through its dimensions (an empty list would default to allowing light to pass), and if the next obstacle in the list blocked all the rest of the light (it would actually overalap the whole plane) rays now passing through the first object would hit the second and be blocked. This would be a window. I started to make things too complicated, so I'm going to have to really plan how detailed I want these obstacles to be. That's a job for a few days from now.

BUT!!! I've also really been feeling that I need to get it over with and impliment color. So I did. Well, I made a 'Hello World' proof of concept. I've yet to import it into my program and change modify my things so that they include color values and clever ways to modify them; but here it is. I knew this day would come, so I developed my place-holder output methods to allow for quick swapping of new ones. Hopefully it won't be too much of a burden to get this working. I've just populated it with @s with random shades of blue.

No comments: