I'm bouncing between Lego, study stress and recoding, so I right sitting infront of my old code - trying to decipher and simplify it. One thing I always wondered was how to mix those block-covering colors on map tiles with their texture if I want to use hardware-accelerated alpha blending for display. I've used a simple method to determine whether there are volumes of the same transparency and color to keep the alghorithm from gradually reducing the light coming through transparent glass walls for example. This works fine for the light, but it seems that I didn't include in any other of the ray tracings as well as the character rendering. Means that most of my old was so damn spaghetti that I wasn't able to include it everywhere properly. I mean I only used it for player position-related filtering but not on actual light calculation. However, I'm repeatedly using what walls of the tile are visible, coming via exactly the mentioned calculation. That's interesting because I didn't wrote it down in the comments so that it is clear to see. The code is full of weird triggers and alike - I wonder how clean it becomes after I decyphered everything. I mean I DO know what to include and what not, so it should become cleary clean, shouldn't it? Well, yeah... it somehow seems that I knew where everything was and in what order. But I also know that it was hard for me to do any changes. I think I should just start and code like a madman. A few macros cause the raytracing behaviour is in abstract the same, in instance different, and then just stick them together. Or something like that. Geez, am I nervous about it.

No comments: