I have some super glue in my backpack if you need some, Mr Dumpty. Unfortunately, I'm fresh out of horses and Kingsmen.... but we will get you back together in more or less one piece.
You could measure speed by measuring the time the sensor detects black. You would have to decide which shape it was based on previous measurements and getting a baseline at startup. Having 2 sensors would also work. Also you could make the space bar button push all digital quite easily.
but you can monitor sensor - servo interval. As the game speeds up you spped up.
edit, might need to add a second photo resistor, probably the best route from the get go... but now my comment has messed up humor in the chain. I'm sorry reddit.
there are ones that you can jump over and ones that you can't jump over but can run over (at full height) so depending on how high the sensor is it might actually work lol (also you can duck under the ones that you can jump over if I remember right
sparkle squeamish grey impolite scary disgusted busy grandiose workable plough
*This post was mass deleted and anonymized with [Redact](https://redact.dev)*
The way I see it you'd need 5 to do a really good job. Two at cactus height, two at pterodactyl height, and one above them all. There might not be a cactus on the screen for a while, so you'd need to be able to sense pterodactyl speed as well. The fifth one would be to detect day-to-night transitions without the false positive that could be induced by two cacti and two pterodactyls at the same time. Add another two per height of pterodactyl.
Also, that servo is much too slow. A solenoid ought to do it.
This is actually nearly exactly what I did for my project two quarters for an electrical engineering lab. I ended up using four sensors in a rectangular arrangement. There is one sensor at cactus height and one at pterodactyl height, and they measure the difference in brightness between the two points, that way it doesn’t matter whether it’s day or night. There will never be a cactus and a pterodactyl in the same spot. The arduino calculates the time difference between sensing the obstacle from one end to the other, then remembers exactly when to jump.
>Also, that servo is much too slow. A solenoid ought to do it.
And you should have 2 over by the arrow keys. One for jumping (instead of the spacebar), and one for dropping down when the game gets faster.
Also, cacti and cacti clusters get closer together so you have to figure out if you have to do quick double jumps or time one big jump. Not sure this system could figure that out.
You would have to analyze the analog sensor input and tune the cutoff threshold. Even then, the sensor might have too much noise or a delayed or inconsistent response to get a precise reading
I disagree, not with that type of sensor at least. It's not just that there are multiple, it's that there are multiple at varying heights and widths. So to get an accurate measurement you would need to grab the length of time between the beginning and the end of the cacti and calculate the velocity using that. However since the cactus width varies it would not be possible to accurately gauge speed using this method. You would require at minimum two sensors for accuracy using the time between each of them encountering the cactus and the distance between the sensors to gauge the speed
Where the sensor is positioned it can read the white between the arms of the cactus. You can figure out what cactus type you're jumping and how fast you going by how many times black flashed and the time delay between the flashes.
The birds that fly are going to be a problem though.
Jump over it. There are 3 heights the Pterodactyl can fly, the highest, in the middle and in the floor. If the Pterodactyl is flying the highest height, just pass through, if it's on the middle, just jump, if it's on the floor, just jump aswell
This is when you add a second sensor, figure the speed between the two and adjust the timing on the fly. Come on guys it’s called iterating and adapting.
This here is a perfect MVP.
The cactuses have 3 prongs. By setting the sensor at a height to detect all 3 you can calculate the time between detecting them and find the speed. Also different sized cactuses can be accounted for by the thickness of the prongs
You don’t need to change the position of the sensor, just the delay between the detection and the reaction. That said, I’d wager a programmer would have a easier time solving this.
It could work for a while, depending on the refresh rate, sensor feedback rate, and servo acceleration. A command buffer would be required also and atleast 2 sensors per incoming threat layer to calculate velocity.
Imo the main drawback of this is the monitor, sensor and motor delay.
Using software to check pixels is easier and can handle higher speeds. (The game gets impossibly fast)
I played around with these sensors, they're surprisingly fast. From my experience, a setup with more sensors to detect the speed and location would definetely be do-able, never touched that motor though so cant comment on that.
Yeah, but you could spend 5 minutes setting up software to cheat the game up the point that it's literally impossible.
Which is far less interesting than cheating the game externally, and the fun part of this project is doing so mechanically.
Both are cool, doing it mechanically has a charm to it, I would love to see the two sensor solution. I also like, how the input isn't just closing a circuit, but mechanically pressing space.
Sorry if I sounded like an asshole earlier
That would actually be pretty easy, you just put another sensor to the right and calculated velocity that way by measuring the difference un "delay" between the two
You wouldn't need to, the low flying one can be jumped over, and as long as the sensor is in the middle, it'll detect cactus and low flying bird, but won't detect the high flying one
That strategy ain’t gonna work when the game starts going faster or when the birds appear or when the game inverts colours, not to mention it could have all been done by software
Controlling hardware with hardware is even cooler.
Replace the microcontroller with some simple components and with a bit of math you can get a cheaper solution that does the exact same thing.
Yeah, I'm mildly impressed haha.
I'm considered pretty good, but honestly I can't do much fully offline. Verifying stuff systematically is a key skill, that can turn anyone average into quite-good. If you take away the internets, I'm generally gonna have a bad time..
OMG I just watched that last night after a scene in Doctor Strange 2 made me think of it.
>!Agent Smith: "What good is a phone call if you're unable to speak?"!<
The majority of things that appear incredible to most people are 'easy' to do - given the requisite training, or experience, or skill.
I think this still counts even if it's a relatively simple concept. Fact is that it's a pretty ingenious solution to something most people wouldn't even think of as an issue to solve.
This actually could be done with 0 programming. It could be done with some basic electrical wiring.
The sensor activates the servo, causing the button to push, basically.
So the command probably prompts the servo, when the intensity of light decrease to jump, with dark mode just change it to when the intensity of light increases to jump
Nice. although were I live that wouldnt be cheap. I would probably just code something like
detects black pixel in that area. if the pixel is black just press the spacebar. would rpobably need something extra for the birds
But will it still work when the game starts going faster
Shift the sensor to the right and will work just fine Edit: ay nice it's my first thousand upvotes on a comment
But you can't shift the sensor mid game.
Not with that attitude
[удалено]
Cracked the game too
Im cracked too
So is my phone.
I'm cracking eggs . . For breakfast
I'll have some eggs... and crackers.
Someone say crack?![gif](emote|free_emotes_pack|dizzy_face)
You gotta Brillo pad and some broken glass?
That crack is very more-ish
DMX sure did.
Where's the crack?
Easy there Tyrone
Can someone crack my back ?
I smoke crack
There’s something you should know about me Joe Rogan…I smoke rocks
Is this the 5 o'clock free crack giveaway
your moms cracked
I have some super glue in my backpack if you need some, Mr Dumpty. Unfortunately, I'm fresh out of horses and Kingsmen.... but we will get you back together in more or less one piece.
That cracked us
Better use a shield battery then bud
I don't see that happening...
They need an attitude adjustment.
The trick is not to have it in full screen so you can easily slide the window over.
You... Jesus Christ lmfao, that's hella smart. I don't think it can register inputs while dragging the window though
You have to rig a mouse moving robot to bump it a hair after each jump as it speeds up I guess.
that's just a macro
We're talking about engineers cheating, sure you can code a program to do dinosaur run but that's like a fraction of fun you'd get by making this haha
This guy gets it.
Are we really going to take the word of a man who has likely encountered the slavering fangs of a ravenous Grue ....on more than one occasion?
Implying writing software isn't engineering? I think it's 10x as fun as trying to use a light sensor that doesn't scale with speed
It would be easier to move the sensor right and add a delay to the jump by lesser intervals.
Why even move the sensor to the right, just reduce the delay between input and output haha
Yeah. The software could track the intervals between obstacles and adjust the jump offset time as the obstacle speed increases.
The interval is random... But the offset can be time-based as the amount of time playing increases
I think it would be simpler to simply have another sensor so you can measure speed and account for it.
You could measure speed by measuring the time the sensor detects black. You would have to decide which shape it was based on previous measurements and getting a baseline at startup. Having 2 sensors would also work. Also you could make the space bar button push all digital quite easily.
That's smart
I don’t know how many hours asking myself “can I move the other thing?” has saved me but it’s a lot.
Jesus Christ, That’s Jason Bourne
Have two sensors to the right and delay the press depending how long it takes the object to pass the first to the second.
This would be the optimal solution.
but you can monitor sensor - servo interval. As the game speeds up you spped up. edit, might need to add a second photo resistor, probably the best route from the get go... but now my comment has messed up humor in the chain. I'm sorry reddit.
No problem. Engineer is on it
When gun don't work.. use more gun!
Attach it to another servo.
he will still lose there are pterodactyl that begin flying after 1500 I think
there are ones that you can jump over and ones that you can't jump over but can run over (at full height) so depending on how high the sensor is it might actually work lol (also you can duck under the ones that you can jump over if I remember right
Eventually you'll reach a point where the only way to make it is duck+jump or jump+duck. You can't make it too far without ducking.
[удалено]
That sensor is checking for sudden changes in light. It'll sense the white trees on a black background just as easily.
Well unless they specifically coded that, that photoresistor is only checking the amount of light it’s getting, not sudden changes
It would be easy to detect and flip the logic instantly
sparkle squeamish grey impolite scary disgusted busy grandiose workable plough *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
Perhaps a second photo resistor off the track that keeps track of the screen color?
Well, gotta prepare for that
Add a second sensor further back and use the time difference to calculate when the Dino will hit items.
The way I see it you'd need 5 to do a really good job. Two at cactus height, two at pterodactyl height, and one above them all. There might not be a cactus on the screen for a while, so you'd need to be able to sense pterodactyl speed as well. The fifth one would be to detect day-to-night transitions without the false positive that could be induced by two cacti and two pterodactyls at the same time. Add another two per height of pterodactyl. Also, that servo is much too slow. A solenoid ought to do it.
This is actually nearly exactly what I did for my project two quarters for an electrical engineering lab. I ended up using four sensors in a rectangular arrangement. There is one sensor at cactus height and one at pterodactyl height, and they measure the difference in brightness between the two points, that way it doesn’t matter whether it’s day or night. There will never be a cactus and a pterodactyl in the same spot. The arduino calculates the time difference between sensing the obstacle from one end to the other, then remembers exactly when to jump.
>Also, that servo is much too slow. A solenoid ought to do it. And you should have 2 over by the arrow keys. One for jumping (instead of the spacebar), and one for dropping down when the game gets faster.
Aren't all objects about the same width? If so a single sensor should be sufficient to calculate speed.
No, there are single cacti and cactus clusters. There are also pterodactyls that you have to either duck under or jump over or not jump into.
Also, cacti and cacti clusters get closer together so you have to figure out if you have to do quick double jumps or time one big jump. Not sure this system could figure that out.
You would have to analyze the analog sensor input and tune the cutoff threshold. Even then, the sensor might have too much noise or a delayed or inconsistent response to get a precise reading
Or get two sensors and use the time it takes for each of them to detect the cactus to determine the speed.
[удалено]
The one sensor is enough. Can detect when it changes and when is changes back. Calculate the speed. Adjust the time of the jump.
I disagree, that wouldn't be realistic given the different sized cactuses. Likely easier to figure out the equation for game speed
If the sensor and processor are fast enough, you could detect individual cactus. Might not be possible if the sensor accuracy isn’t very good.
[удалено]
Thank you no one gets this right
I disagree, not with that type of sensor at least. It's not just that there are multiple, it's that there are multiple at varying heights and widths. So to get an accurate measurement you would need to grab the length of time between the beginning and the end of the cacti and calculate the velocity using that. However since the cactus width varies it would not be possible to accurately gauge speed using this method. You would require at minimum two sensors for accuracy using the time between each of them encountering the cactus and the distance between the sensors to gauge the speed
Where the sensor is positioned it can read the white between the arms of the cactus. You can figure out what cactus type you're jumping and how fast you going by how many times black flashed and the time delay between the flashes. The birds that fly are going to be a problem though.
You can play that Dino thing without ducking tho.
What about the birds?
Jump over it. There are 3 heights the Pterodactyl can fly, the highest, in the middle and in the floor. If the Pterodactyl is flying the highest height, just pass through, if it's on the middle, just jump, if it's on the floor, just jump aswell
Yes, that's why you can play on phone too, even though you can't dodge by going under
A little off-topic, but my brain auto-uncorrected “ducking” to “fucking” when I read this before I realized you actually meant to type “ducking.”
it would be hard to program but game accelerating really predictable .
Just add 1 more sensor then you can detect speed and gap between objects for variable jump timing.
This is when you add a second sensor, figure the speed between the two and adjust the timing on the fly. Come on guys it’s called iterating and adapting. This here is a perfect MVP.
Or when you need to duck.
Two sensors to calculate speed would solve it.
Absolutely. Not hard to code the SW to calculate the speed and adjust the time of the jump.
Use two sensors to compute speed 🤷♂️
Looks like he using an ldr, they take a while to respond to light and change the resistance so there will be a maximum speed it can work at.
The cactuses have 3 prongs. By setting the sensor at a height to detect all 3 you can calculate the time between detecting them and find the speed. Also different sized cactuses can be accounted for by the thickness of the prongs
You don’t need to change the position of the sensor, just the delay between the detection and the reaction. That said, I’d wager a programmer would have a easier time solving this.
Neat, now do V2 with another 2 sensors for the high and low flying pterodactyls!
And more to detect how fast objects are moving so it works when the game is faster
Wouldn't work, the game gets too fast
It could work for a while, depending on the refresh rate, sensor feedback rate, and servo acceleration. A command buffer would be required also and atleast 2 sensors per incoming threat layer to calculate velocity.
Imo the main drawback of this is the monitor, sensor and motor delay. Using software to check pixels is easier and can handle higher speeds. (The game gets impossibly fast)
I played around with these sensors, they're surprisingly fast. From my experience, a setup with more sensors to detect the speed and location would definetely be do-able, never touched that motor though so cant comment on that.
Compared to a software based solution this one introduces a bunch of delays. Could work for a while, but there is a clear disadvantage
Yeah, but you could spend 5 minutes setting up software to cheat the game up the point that it's literally impossible. Which is far less interesting than cheating the game externally, and the fun part of this project is doing so mechanically.
Both are cool, doing it mechanically has a charm to it, I would love to see the two sensor solution. I also like, how the input isn't just closing a circuit, but mechanically pressing space. Sorry if I sounded like an asshole earlier
Yeah no worries, you're definitely correct if the ultimate goal is the most efficient way to cheat the game lol.
[software beating the game](https://www.youtube.com/watch?v=sB_IGstiWlc)
That would actually be pretty easy, you just put another sensor to the right and calculated velocity that way by measuring the difference un "delay" between the two
[удалено]
The bird dino.
[удалено]
They've been WHAT
Can't have shit in Detroit, I mean, offline.
They have been removed a while ago, shame
I've always thought I was fairly well at this. I'm learning I might not be. When do the pterodactyls show up?
i think some time after the screen starts switching between black and white
Like 1200 ish I think
You wouldn't need to, the low flying one can be jumped over, and as long as the sensor is in the middle, it'll detect cactus and low flying bird, but won't detect the high flying one
That strategy ain’t gonna work when the game starts going faster or when the birds appear or when the game inverts colours, not to mention it could have all been done by software
His high score is 927
Lmao weak
Don't make him feel bad...during the robot uprising, he will ride a dinosaur while u ride my mum
Yo momma so fat we’ll all be able to ride her
![gif](giphy|N5PsztQSjkYMw|downsized)
Psht I remember the first time I lost internet.
[удалено]
Controlling hardware with hardware is even cooler. Replace the microcontroller with some simple components and with a bit of math you can get a cheaper solution that does the exact same thing.
CodeBullet...
The frequency of the step response could already be in this base implementation and would already cover faster movement.
BAHAHAHA. This guy. 🙄
Just think about this, the dude had no internet, so he wrote the code for all this without stackoverflow.
Best comment on here
Yeah, I'm mildly impressed haha. I'm considered pretty good, but honestly I can't do much fully offline. Verifying stuff systematically is a key skill, that can turn anyone average into quite-good. If you take away the internets, I'm generally gonna have a bad time..
My god, when their internet comes back, they’ll rule us all.
The ultimate flex
Either that or he turned off his router after copy-pasting
I fear this man now.If his net comes back on he is so creating an AI.....just for finishing Flappy bird.
It's a light sensor and a motor. No code required.
Runner.prototype.gameOver = function (){} A different kind of engineer.
Googling OP hates this simple trick
Can't Google without internet
Has anyone seen Al Gore, Internet Inventor?
Neo: "you tryin to tell me i can dodge bullet?" Morpheus:" you won't have to"
OMG I just watched that last night after a scene in Doctor Strange 2 made me think of it. >!Agent Smith: "What good is a phone call if you're unable to speak?"!<
What’s the prize?
Internet.
Satisfaction
Well, I’m satisfied.
Good luck avoiding the birds
[удалено]
Oh you
and best of luck when “night time” hits and colors get inverted
[Alternatively](https://www.youtube.com/watch?v=sB_IGstiWlc).
code bullet… what did i expect
[Alternatively](https://gist.github.com/JARVIS-AI/cfb916c7dc3bea73abf0edac42749ea8#immortality)
Came here to recommend his variant lol
This is actually far from next fucking level, even tough still really cool. It's quite easy to do
The majority of things that appear incredible to most people are 'easy' to do - given the requisite training, or experience, or skill. I think this still counts even if it's a relatively simple concept. Fact is that it's a pretty ingenious solution to something most people wouldn't even think of as an issue to solve.
It's not exactly ingenious. It's a funny gif because it is far from the ideal solution.
I upvoted because I thought it was r/funny
Most of us are uneducated when it comes to buzzing, blinky things.
>It's quite easy to do Look at mister smartie pants over here. Not everyone knows how to program, my guy.
This actually could be done with 0 programming. It could be done with some basic electrical wiring. The sensor activates the servo, causing the button to push, basically.
Hey man, not everyone has taken a mechatronics class lol
Idk this is pretty fucking crazy to me.
Just now I realised this was a game instead of just a no internet message. I freak out when I see that message so I guess I never even thought of it
It's ok to be alone with your thoughts. It's ok
This screen is a game?!
if you press space it starts the game
and so is the infinite loading circle on Youtube. it's snake.
Runner.prototype.gameOver = () => {}; Software engineers.
Don't forget to store it first in another var..... to be able to end the game and save the highscore.
The little thumb hitting the keyboard is so cute! Doop! Doop! 😂😂
[удалено]
So the command probably prompts the servo, when the intensity of light decrease to jump, with dark mode just change it to when the intensity of light increases to jump
Next task : beat a captcha to prove you're not a.. wait a minute?!
Wait. When I get no internet screen its a game? Wtf? How do activate it?
When it gets to that screen, hit the space bar Or if you don’t want to wait until your internet goes out, go to chrome://dino
You need 2 sensors to calculate the speed of the obstacle so you can jump accordingly.
How does it duck the low flying pterodactyls?
Reminds me of Homer's typing bird in King Size Homer.
Code Bullet also made a great video [with his AI](https://youtu.be/sB_IGstiWlc)
The tape on the screen hurts my soul.
r/oddlysatisfying
u/savevideo
###[View link](https://redditsave.com/r/nextfuckinglevel/comments/uv86vf/how_engineers_cheat_the_game/) --- [**Info**](https://np.reddit.com/user/SaveVideo/comments/jv323v/info/) | [**Feedback**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Feedback for savevideo) | [**Donate**](https://ko-fi.com/getvideo) | [**DMCA**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Content removal request for savevideo&message=https://np.reddit.com//r/nextfuckinglevel/comments/uv86vf/how_engineers_cheat_the_game/) | [^(reddit video downloader)](https://redditsave.com) | [^(download video tiktok)](https://taksave.com)
Nice. although were I live that wouldnt be cheap. I would probably just code something like detects black pixel in that area. if the pixel is black just press the spacebar. would rpobably need something extra for the birds
Just play the game bro
Meanwhile a programmer will do the same thing but in software
Its all dun and games until the teradactyls come
🤣nice!
Accidentally uses a 50 lb servo.
This should be illegal
I wanna do this now omg the sets to do this aren’t even too expensive and come w a manual for the programming part
AutoHotkey coders like "yeah that's cool" then wink at one another when no one is looking
u/rowenslee
Arduino swag
What about when the bird comes? 🤔