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

Slow Input #6

Closed olls closed 10 years ago

olls commented 10 years ago

The current input is very slow and doesn't update very quickly, it lags behind a lot and queues build up, this is very obvious in example.py which prints a frame when you hold space. If you hold space down for a few seconds and then release it, it will continue to print frames for a bit.

This might be fixable by clearing the input buffer or something, we had a similar problem with snake and I think we did something like that, but we were using curses for the input, so it might be completely different.

olls commented 10 years ago

This is not actually as bad as I first thought, as can be seen in game.py. I think it was more to do with the implementation of example.py.

olls commented 10 years ago

Solution: The lagging input problem only occurs when you have a slow frame rate (less than about 20 fps), so to fix it use a faster frame rate.