Allegro.cc
Projects
Resource Directory
|
IOTD: Line-of-Sight
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.
Well, now that there's a screen shot, I'll check it out. - Miquel Burns
--> Utility Function polygon_force_CW( *verts, num_verts) <--
is ready for your level editors. - Jim Sinha This section is only available to registered Allegro.cc members.
:: Join Allegro.cc The Gallery | Add your own image! |
Poll
View Results
|