Advertisement Jump to content


This topic is now archived and is closed to further replies.


Commandoes Style Viewing Regions?

This topic is 5806 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In commandoes the enemies viewing regions were represented on the screen as a triangle. When their view was obstructed by some solid object their viewing region changed shape to reflect the fact that the guards couldn''t see though the obstruction. Does anyone have any links to resources describing some potential solutions to this problem?

Share this post

Link to post
Share on other sites
O.K. So no one know''s any resources.. has anyone ever implemented a simmilar system and care to share what they learned? This could be worth writing an article about if i find a good way to do it... (if no one else has any good ideas that is)

Share this post

Link to post
Share on other sites
if i think of the right thing, it is actually the same as if the player would be a light, and you would have to create the light volume (the part where the light is in), wich is simply the inverse of the shadow volume (the region in shadow, the region the player can''t see)..

so, what you need to do is creating that shadow volume.. you can do that with a beam tree.. the difference between the shadow and the light volume is only the start point..

so, search for infos about beam trees, or similar stuff..

a simple method: create the triangle, clip it against the screen => it is possibly not a triangle anymore, if you look at an edgepoint of the screen..

next: for every object on screen, you have a 2d mesh (vertices, edges connecting vertices) describing its "view blocking volume". you now create for each edge an extruded polygon, like in the shadow volume algo.. this polygon you clip away from the base view triangle.

that for each edge (in fact only for each edge facing the player => half of the edges can get removed)..

the rest is your volume..

and btw, it _can_ take longer than 1 day for an anser.. take it easy:D

"take a look around" - limp bizkit

Share this post

Link to post
Share on other sites
I've been figuring out this thing slowly...

here's a screen shot

I do the LOS culling at the tile level, since my game is a puzzle/strategy game targeted at a general/casual audience...

I ended up using liang / barskey parametric line clipping amungst a few other tricks to get it working

[edited by - Ironside on February 27, 2003 4:12:45 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!