Skip to content

A magic portal for Playdate that enables online multiplayer using Web Serial and WebRTC.

License

Notifications You must be signed in to change notification settings

strawdynamics/pdportal

Repository files navigation

pdportal

A magic portal for Playdate that enables online multiplayer using Web Serial and WebRTC. This is the web interface (available for use with any Playdate game at https://pdportal.net). If you want to make a multiplayer game that uses pdportal, check out the lua subfolder.

This technique should now be compatible with Catalog games!

+------------+                             +------------+
|            |                             |            |
| Playdate 1 |                             | Playdate 2 |
|            |                             |            |
+------------+       WebRTC P2P conn       +------------+
       ^            established with              ^
       |                 PeerJS                   |
    Serial                  |                  Serial
       |                    v                     |
       v                .-------.                 v
+------------+       ,-'         '-.       +------------+
| Computer 1 |      ;               :      | Computer 2 |
| (Browser @ |<---->:   Internet    ;<---->| (Browser @ |
| pdportal)  |       \             /       | pdportal)  |
+------------+        '-.       ,-'        +------------+
                         `-----'

⚠️ DISCLAIMER

pdportal is not affiliated with or endorsed by Panic. Use it at your own risk. If you're having a problem with a game that uses pdportal, contact that game's author for support.

Docs? Currently, the source code is the documentation. Limitations? Probably many. Check out the various README.md files for more details.

Thanks

pdportal uses pd-usb and info from playdate-reverse-engineering to communicate with the cheese. It's built with Svelte and PeerJS.

Inspiration and help with the Lua bytecode parts in the original version came from pd-camera, and code from Eric Lewis.

Want to help?

Contributing

Thanks for your interest in contributing to pdportal! Before you get started:

  1. Read and agree to follow the code of conduct (Contributor Covenant 2.1).
  2. Before you start work, check the open issues to make sure there isn't an existing issue for the fix or feature you want to work on.
  3. If there's not already a relevant issue, open a new one. Your new issue should describe the fix or feature, why you think it's necessary, and how you want to approach the work (please use one of the issue templates).
  4. Project maintainers will review your proposal and work with you to figure out next steps!

Running locally

npm i

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building for production

npm run build
npm run preview