Related Articles

Responses

  1. I think you’re almost there!
    I think you are (1) holding the light sensor by hand, and (2) holding it very far from the screen. This makes the sensor pick up lots of stray light – and the amount varies as your hand moves; plus being far from the screen means the incoming light doesn’t dim so much when a cactus comes past because there is so much surrounding light.
    Sort out your light sensor with a fixed position much closer to the screen and your dino should behave much better.
    But good job getting it to this point πŸ‘

    1. Looking a bit closer at the video, I think the issue is that you probably have ‘wait’ blocks in your loop that for the Cube to do nothing – and I think cacti move past the sensor while your code is in a ‘wait’ block, so the light sensor doesn’t get a chance to be read and report the dimming of light.
      Combined with the continual pressing of the spacebar that I hear – I think the threshold of light in your ‘if’ block is too low, so the code is always triggering a jump regardless of the light/dark background (although you might have done this to force the Dino to jump).
      So it’s pretty clode!
      #KeepGoing