# Help with a student project

My students are working on their final projects for Unit 3. This student is writing a game similar to flappy bird. Once the score reaches 20 it will not go higher and we cannot figure out why. Any ideas??https://studio.code.org/projects/gamelab/GRsrJVi2KRiB4g8HsDnXoA

@michelle_johnson

Hi Michelle,

Right now, I canâ€™t get that far in the game anyway. If I were to guess, Iâ€™d say that itâ€™s because youâ€™re triggering a score increase by checking to see whether the x-coordinates of the player and the ice are exactly the same, but when the ice gets faster, it â€śskipsâ€ť the location that would make it trigger the score increase.

Right now, the ice starts at 405, so when it goes at a velocity of -2, it skips the even numbers, but always gets to 75. When it goes at a velocity of -3, it skips the numbers that are not divisible by 3, but always hits 75 (405, 402, 399â€¦ 78, 75, 72â€¦). When it goes at a velocity of -4, it hits 405, 401, 307â€¦ 81, 77, 73, â€¦ and never actually hits 75.

You could change this by changing the coordinates so that it always hits the x-coordinate of the player, or by changing the way that the score is triggered. Itâ€™s a nice point to hit with the kids that while velocity appears to be continuous because itâ€™s going so fast, we are really just using the counter pattern, so some locations get skipped in the process.

Elizabeth

1 Like

Thank you @elizabeth_admin for the explanation. That makes a LOT of sense. Iâ€™m learning a lot about javascript right along with my students this semester.

1 Like