Line-of-Sight, by Jim Sinha
Games like Soldat and Meteor2 would really benefit from this.
--> DOWNLOAD source-code and example.exe <--
Crappylos tool - 2D Line-of-Sight for Allegro. It
blacks out areas behind walls which the player/character cannot see.
Polygons and line segments are the supported input types.
The current code has overdraw, but is "C" compatible.
A future C++ version "Simplelos tool" will eliminate overdraw. I'll also add a utility function for your level editors to test whether your concave polygons are CW or CCW. Perhaps a vertex reverser too.
This section is only available to registered Allegro.cc members.
The Gallery | Add your own image!