olls / graphics

A console based graphics engine for simple Unicode games and animations.
GNU General Public License v3.0
11 stars 4 forks source link

Game.py Freezing #30

Closed olls closed 10 years ago

olls commented 10 years ago

Occasionally game.py will freeze when the car moves into a steep wall, but only occasionally, so it's quite hard to replicate. It must be something to do with one of the touching loops getting stuck.

olls commented 10 years ago

I fixed this for game.py in 76f10df832fe25f46a5e9ee4e53fcaca9a2cb366 but the bug in the graphics module is still there, there must be an infinite loop happening in one of the detection functions.

olls commented 10 years ago

This was due to the way the physics of the car worked before I fixed it, it would go continuously down waiting to touch something when it had already gone past the ground, this is why it was so hard to replicate, the ground had to be in the right shape to cause the physics to break. A similar effect can be seen if you go off the edge, it will freeze with one pixel left in the screen, because it is moving the car down continuously one pixel over and not printing anything.