VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

OPTIMISED circular collision detection100% performance speed upgrade from most traditional methods

(Tim Miron) yar-interactive software  (13 Submissions)   Games   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

This code performs a collission-detection calculation between two circles using some really basic trig. Usefull for games... Performance much higher than traditional circle-collision detection... only takes 45% the amount of time to do the same thing as most circle collision detection functions!!! thats over 100 percent performance increase. Just thought it'd be usefull to game programmers and such...
I bet your wondering "What did this guy do to speed things up so much?" Well thats plain and simple!!! I just replaced the (A)^2 part of the equation, where A = Y2 - Y1 or X2 - X1, with A * A, because its ALOT faster... just doing that, AND storing A in its own variable, speeds things up ALOT, it only takes aprox 45% of the time to do the same collision dectection task!!! Woopty-Dooo!!!! =)

Rate OPTIMISED circular collision detection100% performance speed upgrade from most traditional methods (2(2 Vote))
OPTIMISED circular collision detection100% performance speed upgrade from most traditional methods.bas

OPTIMISED circular collision detection100% performance speed upgrade from most traditional methods Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters