could the bouncing be more precise and quickly calculated if the sensor was smaller? I am thinking of making a pinball game and rather than going through the complicated process of manually measuring all the angles, I was wondering if a smaller version of this idea would work.
Well, precision and speed seem to contradict each other in this example. But making the sensor smaller might work. It'll be less precise, however, because there are fewer possible values for the angles. Why don't you try it?
I used your idea to "answer" the same forum question. Like your project, mine doesn't work on-line! (link to project)
The thing in common (that stands out to me) is the rotate until "color" touches "color" test. Interestingly, my project resets to start conditions on my computer, but the on-line version "locks"...
Thanks, AnNoYeD. In the online version the bouncer sometimes just reverses its direction without first rotating until both sensors touch the surface. I have no idea, why, though.
Hmm... this project doesn't behave correctly online, how interesting... must be some glitch about color sensing in the java player.
Download this project!
Download the one sprite and one script of "bounce" and open it in Scratch
Project Notes
this project attempts to let a sprite bounce off irregular surfaces.
What makes this project special is that the bouncer can rotate around its center, and also around each sensor, simply using copies of the same costume with the rotation axis set to different positions each, thereby enabling it to measure the wall's slope at any point.
If it gets stuck somewhere press the green flag to reset it.
For some reason it currently does *not* work correctly online all the time. It's supposed to rotate until both sensors touch the surface in order to measure the surface's slope. If it doesn't do that online, you may need to download it.
Comments
You need to be logged in to post comments
Add a Comment
I tried a similar AI last week, missed the boat, glad to have found it here!
this game is the dumbest thing i've ever seen, whoever made it is like mental
could the bouncing be more precise and quickly calculated if the sensor was smaller? I am thinking of making a pinball game and rather than going through the complicated process of manually measuring all the angles, I was wondering if a smaller version of this idea would work.
Well, precision and speed seem to contradict each other in this example. But making the sensor smaller might work. It'll be less precise, however, because there are fewer possible values for the angles. Why don't you try it?
another great project i feel
nice work
Your such an wasome scratcher! i just love your work <3
Thanks for the compliment!
Fun And FUNNY FUNNY FUNNY
this is really good!
Teriffic! I love these one sprite, one script projects!
amazing idea
Sometimes it just bounces without turning first. This only happens online, though, mysteriously...
It seems to work ok for me in v23 of the online scratch player.
I used your idea to "answer" the same forum question. Like your project, mine doesn't work on-line! (link to project) The thing in common (that stands out to me) is the rotate until "color" touches "color" test. Interestingly, my project resets to start conditions on my computer, but the on-line version "locks"...
Very clever approach, and it runs fast! I tried to come up with something to slope detect, but it was much coarser (and pretty clunky)...
what are you some sort of robot? i
kool
not really
Nice. I made a slightly smaller version of that a while back, but yours works much faster.
Thanks, AnNoYeD. In the online version the bouncer sometimes just reverses its direction without first rotating until both sensors touch the surface. I have no idea, why, though.
Cool! But I don't see the difference between the downloaded version and this version. Its still pretty cool though
yesh right , this game is soo dumb
Hmm... this project doesn't behave correctly online, how interesting... must be some glitch about color sensing in the java player.