Space Bar ending the Level

In CS Discoveries U3 L16, Level 7, the space bar is used to “boost” the emoji.

Link to the project or level: Game Lab - Code.org
What I expect to happen: The emoji will “boost”.

What actually happens: The emoji boosts and then the level ends immediately, as if I pressed the “reset” button. Every time I press the space bar, the level gets “reset”.

What I’ve tried: refreshing the browser. It didn’t help. I’ve never had this problem in prior years. I got a new computer from my school, a Dell Latitude 5350 and I’ve had non-stop problems with many applications. I’m not sure if the new computer is the problems

Hi @lpiazza,

Interesting problem. The solution app works for me and allows me to simply “boost” and speed up the emoji. Are you sure you are only adding 10 pixels to the emoji for the boost? (emoji.x = emoji.x + 10;). If you are sure the code is correct - I am not sure what the issue is.

I researched your Dell Latitude 5350 and it doesn’t seem to have a keyboard with a faster speed or rate like a gaming computer. The frame rate for GameLab is around 30 and I am not sure why the default frame rate would be faster? You can try to slow down the frame rate with World.frameRate = 20; (it would go at the very top) and just see if the game is more playable. Even if this is the case, I am not sure why that would be. Perhaps others have ideas?

~Michelle

Thank you! It’s only happening in this level.

In U3L14, level 6, the space bar does not “end” the program. I’m not sure why it happens in one level of one lesson, but not another.

I think you mean L16 - correct? The best way to truly see what is happening would be for you to click the Share button and share the link here to the level that is working and paste another Share link to the level that is not working. That way we can test on different machines and look at the code. We can also be sure we are looking at the same lesson:)

Sorry about that.

Unit 3 Lesson 16, Level 7, Part C, “Emoji Booster” https://studio.code.org/projects/gamelab/Ui7b4CqNibGAa9Usw28e9F52cUb4GFhy-vaTGLTHy7U
There is nothing wrong with my code (that I can tell). When I click the space bar, the emoji boosts (like it’s supposed to) and then “resets” my program immediately, as if I pressed the “reset” button, even though I didn’t.

As an example, I was mentioning that in Unit 3, Lesson 14 “Mini-Project Animation”, I can press the space bar as much as I want, and the program doesn’t reset.
https://studio.code.org/projects/gamelab/dWUsNRrW92KAT1TusBBviiHOGtMPflxbRNv4huXXkdY

I’m trying to figure out why my Emoji booster automatically resets after boosting, when pressing the space bar.

Again, sorry for the confusion and thanks for any help you have to offer!

Thanks for clarifying! The app works fine for me and does not reset. Some suggestions:

  • Have you checked in Windows settings and your keyboard accessibility settings? Make sure there isn’t a setting for space bar that is on.
  • Run the this app in another browser and test.
  • Try a different keyboard.

Let us know how those tests go to try and figure out what the culprit might be.

Michelle