snake does not move at a regular speed

Bug #631582 reported by Tom Bell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snakes
Confirmed
Medium
Unassigned

Bug Description

The snake moves faster when moving up or down than left or right on widescreen displays due to more character 'cells' in the curses screen. This could/should be regulated somehow.

Tags: graphical

Related branches

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

We don't have any `sleep` statement, so I guess it must be the poor efficiency of our program thats making the snake go at a normal speed. We'll need to find an alternative to the `sleep` statement that will take into account the time it takes for the program to run so that games will run at the same speed on both fast computers and slow computers. We also better look into the program's efficiency (bug #631702).

Changed in snakes-game:
importance: Undecided → High
status: New → Confirmed
summary: - Snake movement: Speed control required
+ snake does not move at a regular speed
Revision history for this message
Josh Brown (joshbrown) wrote :

This will need to be fixed before 1.0.

Changed in snakes-game:
milestone: none → 1.0
Revision history for this message
Tom Bell (bushbaby2511) wrote :

Related issues:

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

Related issues:
    * Esc key pauses snake for a second
    * Holding down a key speeds up the snake due to more update calls per cycle. (This indicates that the code execution speed
      is fine and the issue lies in the handling of the main function (possibly halfdelay(1)?? for 1/10 second delay...))

Sorry for repost. Connection issues

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

Sorry, I should have read up on `curses.halfdelay()` when I added it to the program. Thanks for the explanation - I'm glad to hear that our program isn't terribly slow.

I've created two new bugs for the related issues:
  * `Esc` key pauses snake for a second (bug #631804)
  * Holding down a key increases snake speed (bug #631801)

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

When you slow the program right down you can see that the snake moves at a consistent cell per second rate whichever direction you go. However, since monospace text is higher than it is wide, the snake moves at an inconsistent pixel per second rate, therefore this is merely a graphical bug.

Correct me if I am wrong.

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

If I am correct that it is a graphical bug as described above, we're going to have a hard time fixing it.

Changed in snakes-game:
importance: High → Medium
milestone: 1.0 → none
status: Confirmed → Triaged
Revision history for this message
Josh Brown (joshbrown) wrote :

This may be impossible to fix, there certainly is no easy solution.

Changed in snakes-game:
status: Triaged → Confirmed
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.