Open-source samples

  • Explore open-source web game samples showcasing various technologies and techniques on GitHub.

  • Discover and learn from Google's collection of web game examples available on the provided GitHub repository.

Start from working code. The web-game-samples repository has open-source YouTube Playables samples and SDK wrappers for popular web game engines, ready to clone, run, and remix.

  • Apache 2.0 license
  • Open to contributions
  • 6 engines and frameworks

Pick your engine

Each sample shows how to load the Playables SDK and connect your game to YouTube. Choose the one that matches your stack.

JavaScript template · Vite

A Phaser game template with the Playables SDK already wired up, built with Vite.

TypeScript template · Vite

A PixiJS starter written in TypeScript, set up to build and run as a Playable.

Unity package · WebGL

A Unity wrapper for the Playables SDK, a WebGL template, and a sample project, packaged as .unitypackage files.

Godot wrapper · Web export

A Godot wrapper for the Playables SDK, available on its own or bundled with a sample project.

Dart JS-interop wrapper

A Dart wrapper for the Playables SDK, plus the Flutter build settings a web app needs to run as a Playable.

No build step

The smallest possible Playable: one HTML page, a script, and a stylesheet. A great way to see exactly what the SDK needs.

Don't see your engine or framework? Help other developers by contributing a sample.

Run a sample

  1. git clone https://github.com/google/web-game-samples.git
  2. Each sample folder has a README.md with setup and run instructions for that engine.

  3. Check your build with the Playables SDK Test Suite. To learn more, see the Test Suite guide.

Contribute to the samples

These samples get better when developers like you share what you've learned. Whether you found a bug, improved a README, or built a template for an engine we don't cover yet, we'd love your help.

  • Report a bug or request a feature by opening an issue.
  • Improve the docs, such as setup steps or READMEs.
  • Fix or update a sample, for example to support a newer engine version.
  • Add a new sample for an engine or framework that isn't covered yet.
  1. Sign the Google Contributor License Agreement (CLA). If you or your employer already signed it for another project, you probably don't need to sign it again.
  2. Fork the repository and create a branch for your change.
  3. Open a pull request. All submissions, including those by project members, are reviewed before they're merged.

This project follows Google's Open Source Community Guidelines.