Jump to content
Posted 20 April 2013 - 11:00 AM
Posted 20 April 2013 - 03:23 PM
I recently stumbled across this gem that explains collision techniques and physics like simulation.
There are a lot of cool interactive flash examples to help understanding the concepts.
Maybe this helps you.
Posted 20 April 2013 - 10:07 PM
Ok,Thank you..This helps!
But what I'm asking here is a comparison between the different techniques..
For example the ray casting technique gives you more awarness of what's happening around the player than the AABB technique.
What's the best method to implement 2d platformer games collision detection & response?
Posted 21 April 2013 - 08:41 AM
There isnt the one and only technique to do "most aware" collision.
It highly depends on what is needed. If you need your character to know that hes falling into oblivion you'll have a ray beneath him.
Also you will propably need a bounding box for the actual/current collision with the level etc.
So the best method is to have a set of bounding primitives that you can use in the appropriate cases.
Posted 21 April 2013 - 10:05 AM
Thak you LJ_1102,That was enlightning in some way
thanks a lot!
Posted 21 April 2013 - 10:16 PM
Generally the rule is "simpler is better" more complex methods of collision detection than simple AABB type ones tend to either cost development time or CPU time(or both!) Which method you use really goes down to the specifics of your game. If you look at a game like original pong(square boxes bouncing against other square boxes at a relatively sane speed) collision detection can be very simple. If you're doing a complex platformer game with spike balls bouncing off trampolines and flying into breakable walls then you might need to adjust to something more heavy duty.
Posted 22 April 2013 - 08:05 PM
The Metanet article really is one of the best primers on collision detection you're likely to come across. Even if you don't understand some of the more advanced techniques they discuss it will give you an overview that helps to shape your thinking about collision.