Related Articles

Responses

  1. Close! But not quite. Your light sensor I think is too far from the screen – so it can’t tell from all the other light it picks up when there is a reduction in light because of the passing cactus. So your code then has a very tight range of light values to work with (576 to 578 in your video), and so you’ve probably had to choose a low value of light just to get your dino to jump – and now it jumps all the time!
    Try have your light sensor lie flatter against the screen, so that it only picks up the light *directly in front of it* and so give you something like 600+ when there’s white background and 570ish when a cactus passes. This gives you a wider range to work with and should stop your dino jumping all the time.
    Nice job getting it to this point though!