https://github.com/strawdynamics/pdportal
A magic portal for Playdate that enables online multiplayer using Web Serial and WebRTC.
https://github.com/strawdynamics/pdportal
Last synced: about 1 month ago
JSON representation
A magic portal for Playdate that enables online multiplayer using Web Serial and WebRTC.
- Host: GitHub
- URL: https://github.com/strawdynamics/pdportal
- Owner: strawdynamics
- License: mit
- Created: 2023-11-08T08:10:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-06T02:13:57.000Z (about 1 year ago)
- Last Synced: 2024-04-06T04:35:48.556Z (about 1 year ago)
- Language: Lua
- Homepage: https://pdportal.net
- Size: 996 KB
- Stars: 25
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# pdportal
A magic portal for [Playdate](https://play.date) 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](./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](https://panic.com). 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](https://github.com/cranksters/pd-usb) and info from [playdate-reverse-engineering](https://github.com/cranksters/playdate-reverse-engineering) to communicate with the cheese. It's built with [Svelte](https://svelte.dev/) and [PeerJS](https://peerjs.com/).
Inspiration and help with the Lua bytecode parts in the original version came from [pd-camera](https://github.com/t0mg/pd-camera), and code from [Eric Lewis](https://gist.github.com/ericlewis/43d07016275308de11a5519466deea85).
## 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)](./CODE_OF_CONDUCT.md).
2. Before you start work, check the [open issues](https://github.com/strawdynamics/pdportal/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](https://github.com/strawdynamics/pdportal/issues/new). 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
```bash
npm inpm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```### Building for production
```bash
npm run build
npm run preview
```