Remix.run Logo
gneissguise 6 days ago

Start off small, you gotta know your underlying API. For this demo it's JavaScript and the HTML5 canvas API (which is MUCH easier to learn than the languages of the 90s except for BASIC)

https://www.freecodecamp.org/news/drawing-on-a-canvas-elemen...

From there, you'll need a good understanding of loops, control flow, data structures like arrays to store the pixels, lines, shapes, and colors, wiping and redrawing the screen between "ticks" (a single pass of the main loop), and refresh timing to control the speed of the animations.

On a side note there's actually a refresh bug in my plasma demo I just noticed a moment ago... if you leave it open for too long on plasma it starts redrawing faster and faster until it looks like glitch-art!