Sign in to follow this  
origil

Collision prediction - Simple or complex approach?

Recommended Posts

origil    134
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 this post


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

Share this post


Link to post
Share on other sites
Skeleton_V@T    512
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 this post


Link to post
Share on other sites
origil    134
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this