3D engine, beginning

Miscellaneous Forums/Graphics Showcase/3D engine, beginning

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.


Why do you use per-pixel collision anyways? That's like testing polygon intersection in realtime. Don't 2D games usually just move the player around in a tile-based scene?



Aligning a character to a non-straight platform (ala Jungle Hunt/BC's Quest/Sonic) would be easier to accomplish with per-pixel.


And why would you need it to work with image scaling? Image scaling, as far as I can tell, is only useful for Super Nintendo effects, like making something fly offscreen up at the camera?


Mario vs Super Mario. (Granted someone could just re-draw a larger version of Mario, but it's an example)

Here's a better example: Suppose you have a game where you control a bubble that inflates as it moves around. It would be easier on memory to scale one character than keep the different increasingly larger versions in memory. You'd need to detect collision with this "character" regardless of the method you utilized.



Hmmm...the best way to get pixel-perfect collision would probably be to draw the image with whatever settings it has, get the pixels from the frame buffer, then compare those to the other image.


That's the right track. I believe the first step is to do bounding box collision to see if it's even worth checking, and with that, only check the pixels of the bounding box created from the intersection.

Edit - Here's a website that might help you out:
http://www.kuhnstall.de/tutorials/dx9sharp6.html