# Simple Harmonics Motion (SHM) Game Example

**URL:** <https://forum.makecode.com/t/simple-harmonics-motion-shm-game-example/15321>\
**Category:** Show & Tell\
**Tags:** game, graphics-and-math\
**Created:** [September 12, 2022, 2:34pm UTC](https://forum.makecode.com/t/simple-harmonics-motion-shm-game-example/15321 "2022-09-12T14:34:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NxNMatrixGL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nxnmatrixgl/32/2553_2.png) [@NxNMatrixGL](https://forum.makecode.com/u/NxNMatrixGL)\
**Post date:** [September 12, 2022, 2:34pm UTC](https://forum.makecode.com/t/simple-harmonics-motion-shm-game-example/15321/1 "2022-09-12T14:34:48Z")

</div>

> **[Simple Harmonics Motion (SHM) Game Example](https://arcade.makecode.com/87458-39488-42164-93950)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Here is a simple example of using circular, harmonic, and pendulum motion in a game. Precise sprite placement is a bit of a pain, but I show what one can do with a quick one level game with some random sprite placement.

See if you can make it to the end. My kids seem to enjoy it for some reason. I may make more levels.

> [@Simple Harmonic Motion (SHM)](https://forum.makecode.com/t/simple-harmonic-motion-shm/15183):
>
> Add some variety to your sprites movement using simple harmonic motion. Copy and paste any of this code for use in your projects.

---

<div class="post-metadata">

**Author:** ![NxNMatrixGL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nxnmatrixgl/32/2553_2.png) [@NxNMatrixGL](https://forum.makecode.com/u/NxNMatrixGL)\
**Post date:** [September 16, 2022, 2:28am UTC](https://forum.makecode.com/t/simple-harmonics-motion-shm-game-example/15321/2 "2022-09-16T02:28:47Z")

</div>

> **[Simple Harmonics Motion (SHM) Game Example](https://arcade.makecode.com/52182-85292-14958-47989)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

My kids are coming up with more great game design suggestions.  
**Updates** :

- New level
- New palette and graphics (inspired from the MakeCode game Dungeon of the Ruthless Witch)
- New best times leaderboard (from @richard’s blocks-leaderboard project)

**Upcoming** :

- Simpler levels
- More sprites
- Maybe introduce platforms?

---

<div class="post-metadata">

**Author:** ![NxNMatrixGL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nxnmatrixgl/32/2553_2.png) [@NxNMatrixGL](https://forum.makecode.com/u/NxNMatrixGL)\
**Post date:** [September 22, 2022, 7:20pm UTC](https://forum.makecode.com/t/simple-harmonics-motion-shm-game-example/15321/3 "2022-09-22T19:20:50Z")

</div>

> **[Simple Harmonics Motion (SHM) Game Example](https://arcade.makecode.com/99759-68692-10145-16757)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

**Updates**  
Added more levels - there’s a total of 5  
Added player initials to the leaderboard
