Start from working code. The
[web-game-samples](https://github.com/google/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

[Browse on
GitHub](https://github.com/google/web-game-samples) [Contribute
a sample](https://developers.google.com/youtube/gaming/playables/samples/oss_samples#contribute)

## Pick your engine

Each sample shows how to load the [Playables SDK](https://developers.google.com/youtube/gaming/playables/reference/sdk) and connect your game to
YouTube. Choose the one that matches your stack.

### Phaser

JavaScript template · Vite

A Phaser game template with the Playables SDK already wired up, built
with Vite.
[Guide](https://developers.google.com/youtube/gaming/playables/samples/phaser) [Source](https://github.com/google/web-game-samples/tree/main/phaser)

### PixiJS

TypeScript template · Vite

A PixiJS starter written in TypeScript, set up to build and run as a
Playable.
[Guide](https://developers.google.com/youtube/gaming/playables/samples/pixijs) [Source](https://github.com/google/web-game-samples/tree/main/pixijs)

### Unity
Experimental

Unity package · WebGL

A Unity wrapper for the Playables SDK, a WebGL template, and a sample
project, packaged as `.unitypackage` files.
[Guide](https://developers.google.com/youtube/gaming/playables/samples/unity_wrapper) [Source](https://github.com/google/web-game-samples/tree/main/Unity)

### Godot
Experimental

Godot wrapper · Web export

A Godot wrapper for the Playables SDK, available on its own or bundled
with a sample project.
[Guide](https://developers.google.com/youtube/gaming/playables/samples/godot_wrapper) [Source](https://github.com/google/web-game-samples/tree/main/Godot)

### Flutter web
Experimental

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.
[Guide](https://developers.google.com/youtube/gaming/playables/samples/flutter_wrapper)

### Plain HTML, JS, and CSS

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.
[Source](https://github.com/google/web-game-samples/tree/main/plain-html-js-css) [### Your engine here
Don't see your engine or framework? Help other developers by
contributing a sample.](https://developers.google.com/youtube/gaming/playables/samples/oss_samples#contribute)

## Run a sample

1.

   ### Clone the repository

       git clone https://github.com/google/web-game-samples.git

2.

   ### Open a sample

   Each sample folder has a `README.md` with setup and run
   instructions for that engine.
3.

   ### Test your integration

   Check your build with the [Playables
   SDK Test Suite](https://developers.google.com/youtube/gaming/playables/test_suite). To learn more, see the
   [Test Suite
   guide](https://developers.google.com/youtube/gaming/playables/reference/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.

### How to contribute

1. **Sign the Google
   [Contributor License
   Agreement](https://cla.developers.google.com/about)** (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](https://opensource.google/conduct/).
[Read
the contributing guide](https://github.com/google/web-game-samples/blob/main/docs/contributing.md) [Open
an issue](https://github.com/google/web-game-samples/issues/new) [Join the
Discord](https://discord.gg/eEFBtMswKT)