Advertisement

Fast Collision detection algothrim...

Started by May 10, 2001 12:43 AM
0 comments, last by Esko 23 years, 9 months ago
I need help, please... What is best collision detection for my "Infity Engine". I''ve tried vectors and i have my own algothrim. Vector lines don''t work correctly and my own collision algothrim is too slow. Does anyone know good algothrim for BG style engine, my tiles are quite big: 800X600 and in one area there are about 12 tiles (of course it don''t draw them all at same time, only visible tiles are drawed on screen).
hmmm couple of suggestions... ignore them if they are dumb
ok... are you talking about environment collision detection or sprite and player CD?
for the environment cd as far as i can tell for the bg infinity engine they use a vector overlay, with simple polygons to tell you where you can and can''t go etc....would be quite easy to implement different layers, such as interactive objects or environment (eg traps in bg). for each tile you would have a corresponding cd layer.
to make it a bit faster you could divide the screen area into 4, test to see if the object and player are in the same screen quarter, if so, divide the area again and forget about the other 3 quarters... or maybe a grid system (128 x 128?) to get a quick idea about which objects to actually go ahead and test for collision.

This topic is closed to new replies.

Advertisement