How do collision algorithms work (like Angry birds)?

Click For Summary
SUMMARY

The discussion focuses on collision algorithms, specifically in the context of game development, using the example of Angry Birds and the Chipmunk physics engine. The Chipmunk engine employs a "contact persistence algorithm" for collision detection, which is essential for simulating realistic interactions between multiple objects. Basic physics principles, such as those taught in high school, underpin the development of collision algorithms, although they may not yield optimal realism due to simplifying assumptions like neglecting air resistance. Various methods for collision detection are discussed, including the simplest approach that checks for overlapping object spaces and calculates reactions based on previous velocities and positions.

PREREQUISITES
  • Understanding of basic physics principles, including projectile motion and energy conservation.
  • Familiarity with the Chipmunk physics engine and its functionalities.
  • Knowledge of collision detection techniques in game development.
  • Experience with programming languages commonly used in game development, such as C++ or Python.
NEXT STEPS
  • Research the "contact persistence algorithm" used in Chipmunk physics engine.
  • Learn about advanced collision detection techniques, such as bounding volume hierarchies.
  • Explore the implementation of physics engines in game development frameworks like Unity or Unreal Engine.
  • Study the effects of air resistance and other real-world factors on projectile motion in game simulations.
USEFUL FOR

Game developers, physics simulation engineers, and anyone interested in creating realistic collision detection systems in interactive applications.

xael821
Messages
1
Reaction score
0
Hi,
Does anyone know how to write an algorithm for collisions between many objects? An example like this would be the game Angry Birds which uses the Chipmunk physics engine? Chipmunk is based of "contact persistence algorithm" but I can't find out really what that is... any ideas on how to program it?
 
Physics news on Phys.org
Well, I can't say too much about it, but I can give some ideas. It probably involves the laws of physics and the equations that result from them. Things like ballistic projectiles typically covered in a high school physics class and work/energy. You could probably make a very basic physics engine based only on physics learned in high school, but it would not be optimal and particularly realistic, being based on assumptions that there is no air resistance, averages, and other reasonable assumptions that work in theory but produce small errors in real life.
 
I've seen several approaches for collision detection. The simplest ones seem to wait until portions of two (or more) objects occupy the same space. Then the previous velocities and positions of the objects (each integration step saves one set of values for this purpose), are used to calculate the reaction to the collision. This can get complicated if more than two objects can collide at the same time.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 35 ·
2
Replies
35
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 24 ·
Replies
24
Views
4K