It’s the Silly Mistakes
After looking at my shadow rendering code looking for ways to speed it up I discovered I had a rather silly bug in the code. In order to get out of the loop when a wall was hit I was setting the loop variable to less than the amount needed. I don’t know how this didn’t create an infinite loop or maybe it did but Java was smart enough to exit the loop.
I also lowered the accuracy to 8 pixels instead of 16. The maximum accuracy is 64 which would be pixel perfect. Another speed boost came from disallowing pixels with the color 0xFF000000 to be plotted. Instead they’re changed to 0xFF010101. For some bizzaro reason Java choaks on that pixel color.
The result is that without any non-global lighting, Bunnies now runs up to 40FPS on the test map instead of 30. Having lights that cast shadows is still expensive. I havn’t created particularly large or complicated maps yet so I don’t know how much different lighting will affect the framerate.

