Sign in to follow this  
Habba

Seeing through the wall.

Recommended Posts

I'm making an isometric RPG with DirectDraw (DX7). As DirectDraw doesn't support alpha blending, I'm running out of options how to display characters and objects that are behind the wall. http://www.cdprojekt.info/nasze_gry/fallout/karta_produktu/3.jpg Here's a picture of Fallout to demonstrate what I mean. The one with number 13 on his back is behind the wall and the wall is removed around him to make it possible for player to see himself and his surronding. Got any good ideas how to remove a piece of wall when player is behind the wall? Another question: In many games objects are outlined when you move your mouse over the object. Is there any easy way to do this, or do I have to manually draw separate outlined images for each object?

Share this post


Link to post
Share on other sites
Instead of writing an alpha blending routine, maybe you could settle with a stipple routine. That is, just writing every other pixel in a checker pattern. This will create a sort of 50% transparancy. Then after you've rendered everything, you should once again draw all the characters and objects you want to show through walls, but this time in stipple mode.

As for outlines, you could create the outline surfaces automatically by analyzing the sprites you want the outlines of. For every pixel of the outline surface, check if the current pixel in the source sprite surface is transparent. If it is and any surrounding pixel is not transparent, then you make that outline surface pixel non-transparent, or otherwise transparent. This should create a decent outline sprite automatically.

Hope this helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this