Wall clipping

From Post-Apocalyptic RPG wiki

Revision as of 02:27, 17 January 2011 by MvBarracuda (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Feature proposal.png This article covers a feature proposal.

Feature proposals are suggestions what kind of features the PARPG engine should support. Feature proposals are used as basis for code proposals, which describe how to implement the proposed features.

Wall "clipping" or that thing to make characters visible behind walls

Using this approach, each wall uses 2 different sprites. One sprite shows a normal version, while the other sprite shows a cut version of the wall.

In practice, these two versions are separate sprites

Now let's see how this works in practice. You have a simple room. When the agent is outside the room, all of the wall segments use their normal version. When the agent enters the room, the engine "sees" some of those wall objects are blocking the view. Instead of using the normal version, the wall segments which have been marked as blocking the view, now use the cut version of the sprite. This way, the player can see what would otherwise be hidden behind the walls.

Clipping walls2.png
Personal tools