# Recording Extension Wanted

**URL:** https://forum.makecode.com/t/recording-extension-wanted/16107
**Category:** Arcade
**Tags:** extension
**Created:** [October 31, 2022, 5:12pm UTC](https://forum.makecode.com/t/recording-extension-wanted/16107 "2022-10-31T17:12:33Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)
#### Post date: [October 31, 2022, 5:46pm UTC](https://forum.makecode.com/t/recording-extension-wanted/16107/2 "2022-10-31T17:46:45Z")

</div>

@UnsignedArduino did something similar in another thread

* * *

> [@Procedurally Generated Platformer](https://forum.makecode.com/t/procedurally-generated-platformer/8500/38):
>
> So I first define some variables:  
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/f09909f5db5ed701dffc7f8a494049afef582477.png)  
> Then in a game update loop:
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/5/557553d0edea0514cc32fcb85cddf483bb3b9a21.png)
> 
> Every `round(1000 / recording_fps)` (which works out to be 33ms) it will make a temporary image that is half the screen size (plus one for border) and draw the screen to somewhere past the very top left, so that the center ends up being in the actual image. Then it draws the border and inserts it to the list of the last 2 seconds, which is the list `recording_frames`. Then if the length of the recording is over `(2 * recording_fps)` (which works out to be 60 frames) then it removes the oldest frame so there are always 2 seconds in memory.
> 
> When you lose, it first splits up the recording into the first second and second second. I have _no_ idea why I did that lol.
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/d34d33a651ee0080fc08ae74faf1ad0d542d7ee7.png)
> 
> Then creates the sprite that will play back the last two seconds.
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/3b685ca0182ac56562a74700f2afed6c23b866e2.png)
> 
> Then it makes the “RIP” text: (which is just a text sprite)
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/8a485a5b0426a22f088b232d496ab8da37f40372.png)
> 
> Then it plays the melody, the recording, and then the actual game over:
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c9c77c7b8f10fc2926fc20128d842c5cf856a18e.png)

---

_[View the full topic](https://forum.makecode.com/t/recording-extension-wanted/16107)._
