@Astronomicality22 afraid not! only 16 colors can be on screen at any given time
Whyâs that?
Is it because it takes too much memory to have different palettes at once?
@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). 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 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.
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?
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.
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?
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.
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?
@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
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!
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.
Wait, was it premature to start holding my breath for this?âŚ
hehe your fake wireframe demo has nothing on me
Wireframe is just the basic lines of a 3d polygonal shape, not an actual 3d model.
umm⌠no
wireframe is a skeletal three-dimensional model in which only lines and vertices are represented.
Well, actuallyâŚa wireframe can be either. Itâs also evolved to mean âa simplified versionâ of anything. Youâre both correct. Conversation over.
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â?
Someone can make the spinning rat meme with this
Giant leaps in voice synthesizing, which could be great for a demo!:
Courtesy of a new legend: @chembot
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!