# MakeCode Arcade demoscene?

**URL:** https://forum.makecode.com/t/makecode-arcade-demoscene/16250
**Category:** Arcade
**Tags:** music, art, demo, graphics-and-math
**Created:** [November 9, 2022, 6:08pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250 "2022-11-09T18:08:34Z")
**Posts on this page:** 20
**Page:** 4

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [April 5, 2024, 4:40pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/61 "2024-04-05T16:40:22Z")

</div>

@Astronomicality22 afraid not! only 16 colors can be on screen at any given time

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 5, 2024, 5:54pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/62 "2024-04-05T17:54:00Z")

</div>

Why’s that?

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 5, 2024, 5:54pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/63 "2024-04-05T17:54:06Z")

</div>

Is it because it takes too much memory to have different palettes at once?

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [April 5, 2024, 6:10pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/64 "2024-04-05T18:10:29Z")

</div>

@Astronomicality22 yup, it’s memory once again! Specifically, arcade works by keeping two copies of the screen image in memory at all times. One screen is used for running the actual hardware screen (let’s call this the background screen image) and the other is used for drawing to (let’s call this the render screen image).

Every frame of a game, we first run physics, game code, controls, etc. (detailed docs [here](https://arcade.makecode.com/developer/game-loop)). Then, all the sprites get drawn to the render screen. Finally, we swap the render screen with the background screen and the process starts over again.

The reason we do it this way is to make the screen update smoothly. The screen refreshes very quickly, so we can’t guarantee each frame that we will have finished rendering all of the sprites to the screen before it comes time to draw to the hardware screen again. Having a background screen makes it so that we have something to draw to the hardware screen while the render for the current frame is still incomplete. This is called [double buffering](https://en.wikipedia.org/wiki/Multiple_buffering#Double_buffering_in_computer_graphics) and is a very common practice for driving hardware screens.

One side effect of this, though, is that we can’t keep around any special information like which region of the screen should be drawn with which palette. At the end of the day the background screen is an image with 16 colors just like every other image in arcade. If we wanted to store extra color information we would have to double it at least, and that would be an extra 20kb of memory gone.

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 5, 2024, 6:11pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/65 "2024-04-05T18:11:23Z")

</div>

But, is it possible to make a layering system to work on the hardware? So, say, if i had turquoise and green, I could layer, and make the colors intentionally clash, making a greener shade of turquoise?

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 5, 2024, 6:11pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/66 "2024-04-05T18:11:30Z")

</div>

I agree, so i’m not limited to my singular 16-color palette if I want to make a demo, so I could have 64 colors on screen, but it would just depend on the scan-line.

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 5, 2024, 6:15pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/67 "2024-04-05T18:15:19Z")

</div>

Wait, so it registers code on a set amount of cycles, _then_ all the video and sound data get rendered in another set amount of cycles? Wouldn’t it be more efficient to combine the video and audio data _and_ code for a character into one cycle, separately? Or, just have the screen not refresh so fast, but at a consistent enough speed?

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [April 5, 2024, 6:26pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/68 "2024-04-05T18:26:52Z")

</div>

> Wait, so it registers code on a set amount of cycles, _then_ all the video and sound data get rendered in another set amount of cycles? Wouldn’t it be more efficient to combine the video and audio data _and_ code for a character into one cycle, separately?

I’m not exactly sure what you mean by this, but I can say that partially redrawing the screen instead of double buffering is _much_ less efficient and more complicated to implement. Double buffering is what everyone does.

Also, we don’t really control the screen refresh rate, it’s set by the hardware itself. Arcade games do run at a variable frame rate, but that is independent of the screen refresh rate.

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 5, 2024, 6:34pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/69 "2024-04-05T18:34:18Z")

</div>

Oh. So, say, an extension that throws an error if you run it on hardware, can add extra video and audio capabilities is more what I’m needing?

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [April 5, 2024, 6:38pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/70 "2024-04-05T18:38:37Z")

</div>

@Astronomicality22 theoretically we could make that happen, but it would be a lot of work. We try to keep all the code that runs on hardware/browser the same as much as possible, so a lot of arcade is pretty hard coded with 16 colors in mind. I don’t see us changing that anytime soon.

Something like what @Brohann is proposing would be easier to implement, but you couldn’t do it in an extension today. We’d have to add support in the simulator. Feel free to open an issue for this on [https://github.com/microsoft/pxt-arcade](https://github.com/microsoft/pxt-arcade)

I will say, though, that power-user only features like this are usually lower on our list of priorities. I’m not saying that it will never happen, just that we have a lot of stuff that we’re trying to pack into the next release!

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 5, 2024, 8:22pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/71 "2024-04-05T20:22:33Z")

</div>

For now, though, I will use my ega color palette, and if someone sees a game with an ega color palette, they’ll figure out who did it.

---

<div class="post-metadata">

### Author: ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)
#### Post date: [April 5, 2024, 10:10pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/72 "2024-04-05T22:10:15Z")

</div>

> [@216 COLORS IN MAKECODE?! ...sort of](https://forum.makecode.com/t/216-colors-in-makecode-sort-of/25616/24):
>
> arcade runs at 30fps, which i don’t think will be fast enough for that kind of color swapping. I wonder if we should make a 60fps version…

Wait, was it premature to start holding my breath for this?… 😉

---

<div class="post-metadata">

### Author: ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)
#### Post date: [April 9, 2024, 5:57pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/73 "2024-04-09T17:57:20Z")

</div>

> [@Astronomicality22](#):
>
> [https://arcade.makecode.com/S44745-12193-05248-45979](https://arcade.makecode.com/S44745-12193-05248-45979)
> 
> This is my wireframe demo, with music. Up is “Jailhouse Rock”, down is “Ode to Joy”, and Right is “Blue Suede Shoes”, because us memphians worship Presley more than God.

hehe your fake wireframe demo has nothing on me

> **[3D dinosaur model resolution increase](https://arcade.makecode.com/63267-22937-24639-34241)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 9, 2024, 6:19pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/74 "2024-04-09T18:19:28Z")

</div>

Wireframe is just the basic lines of a 3d polygonal shape, not an actual 3d model.

---

<div class="post-metadata">

### Author: ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)
#### Post date: [April 10, 2024, 12:15am UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/75 "2024-04-10T00:15:51Z")

</div>

umm… no

wireframe is a skeletal three-dimensional model in which only lines and vertices are represented.

---

<div class="post-metadata">

### Author: ![KIKIvsIT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kikivsit/32/10492_2.png) [@KIKIvsIT](https://forum.makecode.com/u/KIKIvsIT)
#### Post date: [April 10, 2024, 12:16am UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/76 "2024-04-10T00:16:54Z")

</div>

Well, actually…a wireframe can be either. It’s also evolved to mean “a simplified version” of anything. You’re both correct. Conversation over.

---

<div class="post-metadata">

### Author: ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)
#### Post date: [April 10, 2024, 12:17am UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/77 "2024-04-10T00:17:11Z")

</div>

Nice, @Brohann!

With all the great stuff/snippets around on the forum, aren’t you gues really pretty close to compiling a demo soon and making a first competition entry for MakeCode in a demo party?

Just to rattle the usual crowd, I was hoping @richard, who clearly also is interested in the subject, would make a contribution, too, so that we could have an official Microsoft representative in a cool scroller text, which might also be “a first”?

---

<div class="post-metadata">

### Author: ![Astronomicality22](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/astronomicality22/32/18365_2.png) [@Astronomicality22](https://forum.makecode.com/u/Astronomicality22)
#### Post date: [April 10, 2024, 4:03pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/78 "2024-04-10T16:03:43Z")

</div>

Someone can make the spinning rat meme with this

---

<div class="post-metadata">

### Author: ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)
#### Post date: [April 10, 2024, 11:10pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/79 "2024-04-10T23:10:10Z")

</div>

Giant leaps in voice synthesizing, which could be great for a demo!:

> [@Custom audio clips, possibly using queuePlayInstructions](https://forum.makecode.com/t/custom-audio-clips-possibly-using-queueplayinstructions/28168):
>
> Trying to play custom audio in makecode arcade. So far I’ve had luck layering waves using the method in this thread: [Sound effect demo (no extensions)](https://forum.makecode.com/t/sound-effect-demo-no-extensions/5833) to make simple sounds, and I’ve seen piano sounds made from scratch here: [Various Instruments Recreated in Makecode Arcade](https://forum.makecode.com/t/various-instruments-recreated-in-makecode-arcade/24040), but I want to go further. I tried using similar syntax to melody.addNote and calling queuePlayInstructions to play several sine waves (generated using a Fourier analysis tool, and a few others) but the results are a little s…

Courtesy of a new legend: @chembot

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [April 11, 2024, 4:41pm UTC](https://forum.makecode.com/t/makecode-arcade-demoscene/16250/80 "2024-04-11T16:41:38Z")

</div>

> [@richard](#):
>
> I will say, though, that power-user only features like this are usually lower on our list of priorities. I’m not saying that it will never happen, just that we have a lot of stuff that we’re trying to pack into the next release!

Very fair; you see this with minecraft updates. The redstone (ingame programming) community is always begging for HUGE overhauls that would remove the biggest challenges, but that isn’t necessarily the best update!  
Limitations drive creativity. Implementing an asset manager to change colors inspired innovation in a way that destroying the 16-color system never would. Props to the team!

[Previous page](https://forum.makecode.com/t/makecode-arcade-demoscene/16250.md?page=3)

[Next page](https://forum.makecode.com/t/makecode-arcade-demoscene/16250.md?page=5)
