New games every week!
JSE - More Color Blog
27th August 2021
NES, SMS and Atari have been added to JSE's list of available "UsePalette" colour palettes.

-=-=-

Oddly, since the Atari (2600) palette is so large (128 colours!?! Wowie!) it ends up being the case that using the Atari palette is ultimately the slowest.
How bizarre!!



Meanwhile



In addition to that, I've finally found a decent method for the BackBuffer stuff.
I've added a second canvas which sits permanently in front of the main canvas.
For the majority of the time, this second canvas is blank and transparent, so you can see the main canvas.

If and when you use the Flip command, it'll copy the main canvas onto the second canvas, meaning you can only see the contents of that.
From there onwards, you'll HAVE to use the Flip command every frame, or you'll keep seeing that previous image.

Basically, it means that if you don't use the Flip, it won't make a difference, and will continue like it used to.
But if you DO use Flip, you'll have to keep using it, or your game will appear to lock up.
Oh joy!

The overall slowdown of drawing one canvas onto the other appears to be .. manageable.
Since the Flip command also pauses the engine for a few milliseconds, it's a nice time to be doing the task of copying the buffer.

Hopefully you won't see any terrible slowdown because of this.

As always, let me know if you see any issues with any particular system/browser combos.

-=-=-

Right, that's one buffer thing out of the way.
Now to look into the possibilities of CreateImage and all the chaos that comes from that!
Views 102, Upvotes 21  
Daily Blog , Jse
New games every week!
Site credits : This was all done by Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed 3

Blog - JSE - More Color - AGameAWeek