Showcase - 2D Raytracing
This is a small test I implemented in java to experiment with creating shadows to block sight of objects hidden by obstacles, in 2D. Could be used in some kind of maze game forcing the player to explore the level instead of just tracing a path. The shadows are generated per pixel from an object map.
The code is too slow for making a good realtime game, due to lack of hardware acceleration. Still, lots of improvement on performance has been done by trying different ways of computing shadows. For better performance the shadow calculation could be implemented with hardware acceleration using for example OpenGL or xna.
If you have any ideas of how to develop this technology, please share them!
Source code:
Github.com