Should i use a clipper ?

Started by
5 comments, last by NewDeal 24 years, 2 months ago
Hey Im currently working on an isometric map engine which means im blitting a lot of tiles for each frame. Lots of theses tiles are ofcourse blitted on the edge of the screen. At the moment im calculating how much of each tile is shown. However this has become a real bitch after i added height differences n stuff. Now to my question: How fast is a directdraw clipper - ive been told that i should avoid using clippers since they are very slow - ive tried using a clipper instead of doing the math myself, and this doesnt really seem to slow down the engine... my problem is that i dont wanna continue working with the clipper if this will screw up my engine as it gets more complicated... to shorten down a long story: does anybody got any experience on how fast/slow a clipper is ? thanx
Advertisement
Who told you the clipper is slow?

I don''t know how slow or fast the clipper is, but I suggest you continue using it until you find that is slowing down your engine. When it does just exchange it for one of your own making.

Man, that clipper is a lifesaver. I hate writing my own clip code. I agree with SpellBound. Unless you notice a significant decrease in your frame rate when using the clipper, keep it. I''ve personally never had a problem with it.
After reading how to make an isometric map engine in Tips of the Windows Game Programming Gurus, I didn''t understand it at all. And because you are making one, could you clarify it for me a bit?
Hello NewDeal!!!

I asked myself the same question a while ago...but i choosed to do the clipping myself because the clipper doesn''t cover Lock() accesses, so if you write an alpha blending algorithm, you will end up doing the clipper yourself, as happened to me.

Pseudo_code: This is a personal opinion and it''s far away from being law or even truth, but i believe you should start with something simpler, like an overhead tile engine. It is tough, even without the additional hassles of an isometric tile engine.

Daniel.
Most clippers are (or should be) fairly smart: if the tile doesn''t need clipping, it is trivially accepted and doesn''t get passed through any less-than-optimal trimming code, so only the tiles that need it are slowed down. Go ahead and use the one provided, it could save you the headache of debugging your own!
Thanx alot. im gonna stick with the clipper.
Pseudo_Code->
I dont really think i can explain it any better than the tutorials on this site. However, if u got any specific questions id be happy to help.

my e-mail: newdeal@get2net.dk


This topic is closed to new replies.

Advertisement