z-buffering

Hi,

is anyone using a z-buffer in there game?
I’m currently just sorting all my objects and drawing them from front to back, however I get a few strange artifacts depending on the rotation.
I’m looking a a z-buffer, but I read that they are expensive - andyone with any experience?

I believe it is pretty expensive to do in software. Sorting seems like a good way to go, if you are getting incorrect results you may look into using a bsp tree. Check this out: http://www.gamedev.net/reference/articles/article657.asp

Hmm, one way would be to paint all your tiles into seperate java.awt.components and use JLayeredPane - however I do not know how such a solution would perform…

lg Clemens

If hes talking about using a z-buffer, its probably for a 3d game. If there are rendering artifacts while using sorting, its probably caused by something called cyclic overlap (which is hard to describe without a diagram), you solve this problem when using a bsp tree by breaking up the polygon that would cause the problem.