C# Sketchbook: Creative Coding in the Browser with a Real Roslyn Compiler

A new browser playground lets people write creative code in C# the same way they would in p5.js: open a page, type a sketch, hit run, and watch the canvas update. C# Sketchbook, built by CodeGuppy, runs the real Roslyn compiler in WebAssembly, so there is no install, no server, and no setup step between an idea and a drawing on screen.
The API is deliberately familiar. A sketch subclasses a Sketch base class and overrides Setup() and Draw(), the two hooks anyone who has touched p5.js or Processing already knows. Inside those methods you get CreateCanvas(), Background(), Fill(), Circle(), and the usual drawing primitives, plus the standard input and frame helpers such as MouseX, MouseY, and FrameCount. The bundled default sketch draws a circle that follows the cursor, prints the canvas size and frame number to the console, and doubles as a working example of the whole structure.
The notable part is the compiler. Instead of translating C# to JavaScript or emulating a subset of the language, the playground loads the actual Roslyn compiler compiled to WebAssembly and executes the code in the browser. That means sketches behave like real C#, with the language's type system and standard library intact, while the output stays as lightweight as a p5 canvas. Because everything runs client-side, sketches are self-contained: the page includes a save button that stores work in the browser, a save-copy option for forking, and a download button for exporting sketches.
C# Sketchbook comes from CodeGuppy, a free coding platform aimed at middle and high school students. The wider CodeGuppy site teaches computer science concepts — coordinates, recursion, strings, big numbers — through JavaScript lessons, and this playground extends the same approach to C#, giving educators and self-learners a zero-install way to try a compiled language in a visual context. The choice of a p5-style API is deliberate: students who learn the Sketch pattern can carry it across languages.
The project surfaced on r/creativecoding in mid-August 2026, where its author shared it as a browser playground with a p5.js-style API and asked for feedback. For artists and tinkerers who work in the browser but think in typed languages, it is a rare middle ground: the immediacy of a sketch canvas with the compiler-level fidelity of C#. It is free, runs entirely in the browser, and needs nothing more than the page itself.