#22381 - mr_schmoe - Sat Jun 19, 2004 8:10 pm
There's two things I really look for. First off, my game isn't 3D exactly so I don't need polygon collision. It's more of a 2.5D, like Mario RPG, so it's more than just sprite collision. I was thinking of doing bounding boxes, but sometimes the boxes need to be at odd angles like a 45 degree downward tilt. But then that might get a little complecated, so I could just not allow odd angle objects. There also sphere or ellipsoid collision, that could solve my angle probelm, but that would require a bit more CPU expensive calculation. But the point is, because it's not completely 3D, I need something simpler than polygon collision.
And second, I was wondering how all this is implemented. I suppose what would be the simplest way is have an array of pointers to the each objects data such as position, size and shape. And when detection time comes around, you check the object in question against the rest of the objects in the array and if collision is detected there is does the appropreate reaction. And if you want, you can go so far as to use a pseudo object of where the real object would be the next frame to catch a future collision with a wall or something before it happens and stop it. But you run the risk of a collision with itself. I use ID's for my objects so it can just skip over itself in the array.
So, I am hoping someone read something somewhere along the lines of what I just said in some artical somewhere that they would like to share with me so I can learn from those who wrote the artical, maybe. Anyone?
_________________
How many boards could the Mongols hoard, if the Mongol Hored got bored
And second, I was wondering how all this is implemented. I suppose what would be the simplest way is have an array of pointers to the each objects data such as position, size and shape. And when detection time comes around, you check the object in question against the rest of the objects in the array and if collision is detected there is does the appropreate reaction. And if you want, you can go so far as to use a pseudo object of where the real object would be the next frame to catch a future collision with a wall or something before it happens and stop it. But you run the risk of a collision with itself. I use ID's for my objects so it can just skip over itself in the array.
So, I am hoping someone read something somewhere along the lines of what I just said in some artical somewhere that they would like to share with me so I can learn from those who wrote the artical, maybe. Anyone?
_________________
How many boards could the Mongols hoard, if the Mongol Hored got bored