Win Engine 95: A Retro 2D Physics and Web Audio SandboxWin Engine 95: A Retro 2D Physics and Web Audio Sandbox
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
"A Windows 95-style 2D physics engine that generates live audio synthesis based on particle collisions, built in one HTML file"
I built this sandbox engine to merge tactile 2D physics with real-time web audio synthesis, all wrapped inside a nostalgic Windows 95 desktop simulation. The idea was to create a musical playground where gravity, bounce, and spatial collisions dictate the rhythm and melody, making it feel like a complex piece of forgotten 90s software.
WHAT IT CAN DO: Users can spawn particles into a physics sandbox and route them through custom tracks. The toolbox includes sounding pegs, spring like bouncers, splitters that clone balls, gravity wells, accelerators, and portals. Every time a particle hits an object, it triggers a musical note.
The right panel acts as a full synthesizer console. You can switch between FM bells, Karplus-Strong plucks, or deep sub-bass, quantize notes to different musical scales (Lydian, Pentatonic, Aeolian, etc.), and map specific pitch offsets to individual pegs. At the bottom, there is an analog-style FX rack with rotatable knobs for reverb, delay, master gain, and a live oscilloscope that visualizes the audio output. Users can even drag and drop their own .WAV/.MP3 samples to trigger instead of the built-in synths, and record their jam sessions directly to a WebM file.
THE TECHNICAL SIDE: Everything sits inside one single HTML file. No frameworks, no external libraries, zero build tools.
The UI is built with pure CSS and vanilla JavaScript, recreating the classic Win95 bevels, title bars, and dropdown menus. The sandbox runs on a custom 2D physics engine I wrote from scratch using HTML5 Canvas, featuring spatial sub-stepping, dynamic collision resolution, and vector math.
The audio engine relies strictly on the Web Audio API. It routes synthesized oscillators through custom delay nodes, biquad filters, and a dynamics compressor to prevent clipping when hundreds of collisions happen at once.
WHAT I LEARNED: The hardest part was keeping the physics and audio perfectly synced without dropping frames. When you have dozens of balls hitting pegs at the exact same time, the audio context can easily get overwhelmed. I had to implement physics sub-stepping (calculating 4 smaller simulation steps per visual frame) to prevent high-speed objects from clipping through drawn lines. I also added a slight trigger throttle so the synthesizer wouldn't distort during massive collision clusters.
Building the math for the analog FX knobs was also a fun challenge; calculating mouse drag deltas and mapping them smoothly to both the visual CSS rotation and the Web Audio delay parameters.
Shanta Islam's avatar
the retro inspired design concept is spot on.😍 Massive "W" on the overall UI💯 💯 💯 👍
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started