•
u/Curious_Resource6307 5h ago
How about the pterodactyl obstacle? Its only playable for cactus part tho
•
u/Fit_Active3888 5h ago
Also the game increases in speed so the sensor would need to move further away from Dino as the level continued
•
u/ryanCrypt 5h ago edited 7m ago
The sensor could be taking the speed of the cactii. But it's probably a binary light sensor.
•
u/Fit_Active3888 5h ago
The time required for Dino to jump needs to be factored in, at that point it's simply too late.
•
u/OneDubOver 4h ago
I think that's what he means. By taking the speed into account, you can lower the delay between the action (jump) and the trigger.
I'm sure there is a delay coded in. You wouldn't need to move the sensor at that point.
Edit: i just wanted to add. If there are two sensors, you can detect the speed at which the cacti are moving. And then your "speed" could be quantified, and then your jump delay could be coded in properly.
•
•
u/Yoghurt42 3h ago
The location of the sensor is too close to the dino. At some point, the game is so fast that pressing the button the instant the sensor detects something is already too late.
•
u/Solarisphere 40m ago
Add a second sensor. Move them both further away. Measure the time delay between the two to determine speed, then add a variable delay to trigger the jump. Add a second pair of sensors higher up for the pterodactyl (you might be able to get away with only on extra).
•
•
u/red-storms 5h ago
How does it detect the birds?
•
•
u/Shahariar_909 1h ago
The ting tapped on the screen is an LDR sensor. Whenever a black part comes in front of it it , it cuts the current flow generating a signal.
So if the flying Dino's can cover the sensor, the playable dino will jump otherwise it won't.
•
u/l0ng3alls 5h ago
That thing taped to the screen is the sensor
•
u/freefiremd 5h ago
Yes we know. But later on there will be birds to duck under. How's it gonna do that?
•
•
u/ZombiesInSpace 3h ago
You can jump over all of the pterodactyls. Even the high pterodactyl that you can just walk under can also be jumped over.
•
•
u/Yoshi2255 4h ago
There are 3 pterodactyl positions, top which you can avoid by doing nothing, middle which can be either ducked or jumped over and bottom which you have to jump over, if the sensor is positioned correctly it should be able to detect the middle and bottom position and input jump while avoiding the top position.
The bigger problem is the speed which increases with distance which will most likely cause the entire set-up to fail because the sensor is too close to the dinosaur (this (or the incorrect position of the sensor for bird detection) is why the highscore shows 506 here and the video ends right before 500)
•
u/IceBandicooot 5h ago edited 5h ago
But you gotta crouch with the down button to dodge the birds
Quick edit: changed controls
•
•
u/Defiant_Wolverine_68 5h ago
You overcomplicated software engineering.
Must be a hardware engineer.
•
•
u/Millerboycls09 5h ago
A properly calibrated version of this would include one sensor at the spot where the cactuses start and another a little closer to your dino. That way, you can measure the incoming speed with enough time to react.
At low speed, the system in the video works well. As soon as the speed picks up, you'll clip into the front of a cactus.
•
•
•
u/Corchoroth 5h ago
You know the t-rex can duck as well, right? What happens when the pterodactyls come flying?
•
u/ZiltoidTheHorror 5h ago
He makes a second one of these then tapes it to that spot and has it press that button.
•
•
•
•
u/EmployerWide1123 5h ago
Be more impressive without lines of code......
•
u/kickinbucket 5h ago
You don't even need hardware for this. I could probably knock this out in AutoIt in like 20 minutes.
•
•
u/PiezoelectricityOne 5h ago
That's fun! I'm totally stealing your idea for my STEM class, I really thank you.
•
•
•
u/Its_pipo 5h ago
Pretty wild that it's basically just image recognition on a simple 2D game. Wonder if it struggles more with the bird timing or if that's actually easier to predict than the cactus obstacles.
•
•
•
•
•
•
•
•
•
u/Dazzling_Equipment_9 2h ago
Genius, but I think you have to design a plan to move the sticker to the right to cope with the increasing speed.
•
u/Potential-Shopping21 2h ago
Haha. You can make it yourself
My vesion:
https://github.com/IvoryRubble/dino_hardware_bot
•
•
•
•
u/Napunsak_Neutron 5h ago
This can be easily done using a simple python script without a need for all the hardware
•
u/mustardheadmaster 5h ago
Actually it can be even easier done to just look at the screen and manually clicking the spacebar
•
u/theFirstHaruspex 6h ago
surely you could do this locally just using python, no? still, interesting af
•
u/whyliepornaccount 4h ago
Sometimes you do things you know are objectively stupid as a personal project solely because it makes you chuckle, not because its the best way to do it.
•
u/MickesMaestro 5h ago
That’s what I was thinking. And they’re already running python on the laptop already
•
•
•
•
u/Killertofu808 5h ago
Am I the only one who didn’t know that screen turns into an actual game
•
u/Cainfaer 5h ago
Yeah you probably are, because it's a commonly well known Easter egg that became an internet meme



•
u/Evening_Ticket7638 5h ago
Is that enough distance to jump when it starts going faster?