Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

Understanding how a collision detection system should work

$
0
0

I've gotten many simple games up and running, and now I'm in the process of making a bigger one. In my smaller games, I would simply check if 2 objects were colliding in the game loop, for example, in Pong:

if(paddle.collides(ball)) {
  ball.bounce();
}

But now that I'm starting to upscale, it seems that I need a better, more flexible solution. I assumed this would be a common problem, but when I looked up “Collision engine”, I mostly got results on how to implement real life physics. The problem with this is that some objects …


Viewing all articles
Browse latest Browse all 16874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>