# DVD Logo Bounce

**URL:** <https://forum.makecode.com/t/dvd-logo-bounce/1730>\
**Category:** micro:bit\
**Created:** [April 17, 2020, 9:49pm UTC](https://forum.makecode.com/t/dvd-logo-bounce/1730 "2020-04-17T21:49:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rymc88](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rymc88/32/13577_2.png) [@rymc88](https://forum.makecode.com/u/rymc88)\
**Post date:** [April 17, 2020, 9:49pm UTC](https://forum.makecode.com/t/dvd-logo-bounce/1730/1 "2020-04-17T21:49:48Z")

</div>

For one of my classes I am teaching I assigned them to create a simple “screensaver” using the LED blocks on Makecode and I used “The Office” clip where they are watching a dvd logo bounce around the screen. This is what I want to create as a challenge on the microbit. Just a single LED bouncing around the LED grid on the microbit. Can anyone help me with this using makecode?

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [April 18, 2020, 6:19pm UTC](https://forum.makecode.com/t/dvd-logo-bounce/1730/2 "2020-04-18T18:19:22Z")

</div>

Here’s probably the simplest blocks you could get: [https://makecode.microbit.org/\_1t8M4hbMjc3T](https://makecode.microbit.org/_1t8M4hbMjc3T)

The issue is that it will always move in the exact same pattern; with a 5x5 grid and the movements constrained to 45 degree segments (when moving 1px at a time) it will always bounce between the same few pixels on the edge. I could look at writing up a nicer bounce on there, but I’m unsure it would be useful as it would like be in javascript and slightly complicated.

If it’s helpful, the [arcade editor](https://arcade.makecode.com) might be a bit better suited for this sort of thing; it has that behavior [built in for sprites](https://makecode.com/_bFLH9tPzdCLp), it’s a bit easier to write by hand if you want it to be a [challenge with conditional logic](https://makecode.com/_HvrRcDcEhKr9), and either way there can be a bit of a fun challenge to make it all a bunch of things at once if any students are feeling up to it: [https://makecode.com/\_i6gT8mdjxEDe](https://makecode.com/_i6gT8mdjxEDe) . Also, the paint brush example on the home screen under graphics and math is something I made as a variation on this, where I also gave it random acceleration and trace the path it follows 🙂

---

<div class="post-metadata">

**Author:** ![rymc88](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rymc88/32/13577_2.png) [@rymc88](https://forum.makecode.com/u/rymc88)\
**Post date:** [April 18, 2020, 7:38pm UTC](https://forum.makecode.com/t/dvd-logo-bounce/1730/3 "2020-04-18T19:38:41Z")

</div>

I see what you mean with the microbit, maybe with a shake it could send the ball in the different direction to change it up and I like your idea of changing the acceleration when it hits the edge. I really appreciate the help and all of the examples which is really cool of you. I agree arcade is better suited for this project.

Cheers and thank you!

---

<div class="post-metadata">

**Author:** ![rymc88](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rymc88/32/13577_2.png) [@rymc88](https://forum.makecode.com/u/rymc88)\
**Post date:** [April 18, 2020, 8:35pm UTC](https://forum.makecode.com/t/dvd-logo-bounce/1730/4 "2020-04-18T20:35:44Z")

</div>

> **[Bouncy #2](https://makecode.microbit.org/18620-16108-39677-61182)**
>
> Made with ❤️ in Microsoft MakeCode for micro:bit.

Some changes I made to your original code. Again, thank you for your help!
