Categories: Community member project
Related Articles
Dino game
It was hard to do for me this Dino game and it took a some time to finish but I am glad to finish it
Responses
Cancel reply
You must be logged in to post a comment.
It looks like leg day at the gym for your Dino – that boytjie just keeps getting yelled at by the Cube to jump 😁
I think what will help is to have the light sensor positioned *much* closer to the screen. At the moment it is so far from the screen that it can’t really detect the change in light levels from a passing cactus. So to make the dino jump you’ve probably used quite a low threshold light value, and now your dino is being triggered to jump all the time because you have ‘false positive’ cacti being detected.
So: move the sensor much closer to the screen so that it can only pick up the light from the pixels directly underneath it and watch the light reading value – you should see a much bigger difference now between the white background (probably over 620 with your setup) and the darkness of a passing cactus (maybe about 570 in your case), and your if statement can better check for a value somewhere in this range to trigger the jump.
Right now your light reading varies between 571 and 573 which is too tight a range to work with.
So you’ve got all the hard pieces built! You would just need to tweak the light sensor setup. Good job!! 😎
awesome