Hey r/emulation! I've been working on browser-based emulation and wanted to share what I've built with the community.

TL;DR: Built a web-based retro gaming platform called Koin, then open-sourced the core emulation engine as koin.js - a React library for embedding multi-system emulation in web apps.

The Platform: Koin

Started as an experiment to see how viable browser-based emulation could be for preserving and accessing retro games. Built Koin (koin.theretrosaga.com) as a proof-of-concept platform that runs entirely client-side using WebAssembly cores.

Technical approach:

  • 28 system support (8-bit through 64-bit era - NES to PlayStation, Game Boy to Dreamcast)
  • Client-side processing - games and saves stay local, no server-side emulation
  • WebAssembly cores for performance
  • RetroAchievements API integration
  • Slot-based save states with metadata/screenshots
  • Auto-save with emergency saves on tab close
  • Frame rewind for supported systems
  • CRT shader pipeline
  • WebM gameplay recording (VP9 @ 30fps)

Open-Sourcing: koin.js

After proving the approach worked, I decided to open-source the emulation engine as koin.js - a React component library that handles the complexity of browser-based emulation.

What it provides:

  • Drop-in <GamePlayer> component for React apps
  • Automatic core selection based on file extensions
  • Touch control system with virtual gamepad (configurable per-system)
  • Save state management with hooks for custom backend integration
  • Shader support (10 CRT variants)
  • ~55KB gzipped, MIT licensed
  • Available on npm: koin.js

Why this matters for preservation:

Browser-based emulation has some interesting advantages for game preservation:

  1. Platform-agnostic - runs on any device with a modern browser (desktop, mobile, tablets)
  2. No installation friction - lowers barrier to entry for casual users
  3. Sandboxed execution - browser security model handles isolation
  4. Version control - web apps can update instantly without user action

Obviously there are tradeoffs vs native emulators (performance ceiling, input latency, limited system access), but for 8/16-bit preservation and casual retro gaming, the accessibility benefits are compelling.

Links:

Would love feedback from this community on the approach. What are the biggest technical challenges you see with browser-based emulation? What would make it more viable for serious preservation work?