Sunday, May 24, 2009

All Fourteen Ducks in a Row

Apparently the value of  (-5)%3 is not well defined, and is inconsistent between platforms.  Well, nuts to whoever decided that one.  I need negative % for the map code, so here's a fun hack:  to make a%b work over a exists in (-c,+c), instead use (a + d)%b where d is some multiple of b that is larger than c.  In other words, just make it positive in a way that doesn't affect the result.

The map editor is going well.  I've finished the framework for the renderer, and not only is it a bazillion times more efficient than the old one, it looks better and is more simple!

1. Map renderer
2. Bugs
3. Map Tool

One
Map still coming along.  Occluded areas are colored slightly darker to make it more obvious one cannot see them.  Going to have to use fog for pits instead of coloring the vertices, but that's not a big deal and it should be that way anyway.  A cool effect though is that I can fog an area and you can't see the pits in it, then if you fall in one you'll go "beneath" the fog and you'll be able to see them.

Two
Took a walk in the gorge, it's a beautiful day.  Also, occlusion works great!

Eight
I'm making a render-state manager that's essentially a mixed speical FX and texture manager.   This'll make it simple to integrate the same effects into the editor and client--right now they were developed separately so even though they do the same thing, they aren't a shared structure.

No comments: