# Collision prediction - Simple or complex approach?

This topic is 4866 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello everyone. I'm in the process of creating a high quality breakout game [at the very least, that's where I'm aiming at]. My problem is choosing the type of collision checking system. Would predicting collision using equations be overdoing it or would checking for the next frame state enough? The ball's acceleration is not constant [depends on a couple of objects on the level, which affect the ball]. Would I need to run a simulation of the game on the background for it to check for collisions? The game uses delta time movemet, which means the ball might skip objects on a couple of occasions. Is delta time movement generally bad for breakout games? I guess I just need someone to point me to the right direction. Thanks in advance, Ori.

##### Share on other sites
Quick question. Presumably your bricks are rectangular. Is the ball a rectangle also (presumably square), or is it a circle?

##### Share on other sites
If you use vector maths in checking collision rather pixel perfect or rectangle-based collision detections, the system won't miss any collisions even at a low frame rate (I'm talking about 2 objects, for multiple objects colliding simultaneously that is an other story). So delta time based movement is applicable.

You may consider take a serious course learning game physics as it'll be easier for you (and your engine) when moving to 3D games. GDNet's articles maybe a good place to start.

##### Share on other sites
I would suggest using a circle-line collision chech.
construct four lines out of your bricks and then check the lines
against the ball.
hope this helps.

##### Share on other sites
Thanks for the replies.
The ball is a circle and the bricks are rectangles that may be placed diagonally.
I'd just like the game to have a professional feel - a single collision miss can and will break that image.
I've got google to search for many collision methods, which I have done, but more to the point, I need a system that would suit this game's needs.
I'll try having the game predict the next frame relying on the distance delta [ommiting the change in velocity and change in acceleration in hope it'll still look precise].
If there appear to be problems with the collision's stability I'll just corss that bridge when I get there.
Hopefully I won't have to rewrite too much code, but I guess experience eventually teaches best.
Anyhow, I'd be happy if anyone would care to throw some experience at me [smile]!
Thanks again,
Ori

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 24
• 15
• 36
• 12
• ### Forum Statistics

• Total Topics
634823
• Total Posts
3019459
×