So I think I have this great LOS code idea, then I discover a major flaw in it. I was going to use a lookup table for each block in a quadrant to map shadows. Problem is, when two blocks are next to each other they block much more than the original one does.
Damn, back to the drawing board.
I've been reading others LOS code, and there seems to be tons of calculations to make it happen. How in the world did Ultima III and IV get made with great LOS, nice graphics and less than 64k RAM? Granted, it was in machine language/assembly back then, but still, memory has to be allocated.
I'm surprised that with all the roguelikes out there, that someone hasn't come up with an object oriented code module just for LOS mapping. Nothing more, like light sources, or what the map contains (treasure, weapons, monsters, etc). I've found lots of code examples, but they all seem quite complex and have lots of hacks to make them work.
Has no one come up with a clean code base for LOS mapping? I hope I can find an effective one, or a roguelike may have to wait...