pouët.net

Go to bottom

JS basic skeleton to start a demo or more...

category: code [glöplog]
 
If you don't know where to start with implementing an Old School demo or a new school demo in JavaScript, you'll find a skeleton for creating an animated canvas using double-buffering in this repository: https://github.com/Wywiwic/WyJS_Base.

Have fun!

I'll be releasing sound management and an Old School effects library soon.

Examples:
added on the 2026-01-05 10:52:01 by wywiwic wywiwic
what's the case for double buffering? i mean this honestly, i've only done a tiny bit of JS graphics programming but every time i just drew stuff to the canvas in the requestAnimationFrame callback and things Just Worked, without ever seeing any sort of artifacts. i've never before seen code swap 2 canvases with css every frame
added on the 2026-01-05 15:35:37 by skrebbel skrebbel
I agree with you on modern web browser the double buffering is already done on the canvas, but due to the fact that I mainly rasterize all by myself like lines, filled triangles, rotozoomer…

It helps me to manage the pixel by pixel works, especially on my very old CPU/GPU, and even more on my poor mobile phone.

But it's really easy to remove it if it's not needed even for a new developer who can use this skeleton to manage basic orientation, dpi, basic events. ;)
added on the 2026-01-06 08:03:17 by wywiwic wywiwic
2d_starfield.obfuscated.js
Is there any particular reason one would want to obfuscate a 2d starfield script ?
added on the 2026-01-06 09:26:11 by shantee shantee
Not really, except the batch I used that collapse all the needed js files in one, ofuscated them and upload the needed elements. :)

Due to health reasons, I don't know how much time I have left to gradually release all my old projects dating back to 1984.

That's why I've created two GitHub, the one you know for the "modern" code.

The other for the old-school stuff.

But it's taking me a while because I want to clean up all my 6809, 6502, Z80, and 680x0 source code as thoroughly as possible.

Maybe they'll be useful to a developer, or maybe not! ;)
added on the 2026-01-06 09:52:45 by wywiwic wywiwic

login

Go to top