Once more unto the breach: collision errors

It's official, I hate making collision detection.  I'm going to try and rewrite it for the 6th time this pyweek (yes, I've kept count) but not before uploading a demo.  press "r" to respawn  at the green portal thingy.  press "z" to use the ability (air doesn't have one because making it caused this little catastrophe)  I'll be back after cleaning up my code (turning Entity and Character into the Player class so that it's simpler to manage) and then fixing this problem.

(log in to comment)

Comments

I also hate (read: am bad at) doing collision detection.
 
Collisions cause problems for me, but for some reason they were a lot easier for me this week than before. No doubt I still have some collision bugs left that are going to be awful though.
The more times you do coldet the more aware you are of the difficulties involved. The problem is there are so many different kinds of scenarios, and every kind has so many different edge cases, it becomes very easy to miss things. Fast moving objects, shapes, the difference between collision detection and collision response, your games physics and how they interact... Yeah it's a complex subject.
indeed, it's when falling a certain distance then moving down a 1x1 stair, then hitting air, it slings me through the bottom... I'm just about to go into it in detail and play with what I'm doing, committing beforehand
Taking into account collisions and motion are exactly why I forced my game to run at 30fps and just move everything in pixel increments (instead of pixels per time).  Collision is simple rect collide tests. I figured for a simple game with no scrolling, it doesn't matter if one or two framse take a bit longer than usual.