`Esc` key pauses snake for a second

Bug #631804 reported by Josh Brown
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snakes
Fix Released
Medium
Josh Brown

Bug Description

The escape key pauses the snake for a second, then the snake carries on as usual (but at a greater speed as per bug #631801).

Related branches

Revision history for this message
Josh Brown (joshbrown) wrote :

Although this isn't a major issue, something needs to be done about it before the first release.

Changed in snakes-game:
importance: Undecided → Medium
milestone: none → 1.0
status: New → Confirmed
Revision history for this message
Tom Bell (bushbaby2511) wrote :

I think this bug is to do with lack of handling for ANSI escape sequences. I'm currently looking into it.

Revision history for this message
Tom Bell (bushbaby2511) wrote :

OK, the reason for this bug is that by default in the ncurses library the environment variable ESCDELAY pauses the execution to way for functional key sequences. the default value is 1000ms thus the second's worth of pause. The way round this seems to be modifying the os.environ['ESCDELAY'] variable during runtime execution. I haven't found any documentation on how this would be achived however..

Revision history for this message
Tom Bell (bushbaby2511) wrote :
Revision history for this message
Josh Brown (joshbrown) wrote :

I've fixed this in my branch lp:~joshbrown/snakes-game/esc-key

Changed in snakes-game:
assignee: nobody → Josh Brown (joshbrown)
status: Confirmed → Fix Committed
Revision history for this message
Josh Brown (joshbrown) wrote :

Fixed in ~snakes-game/snakes-game/code, revision 33.

Changed in snakes-game:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.