I've been experimenting for a long while with ways to physically link two playdates. The product of those experiments is Playlink!
Playlink is a basic, but fully functional, webpage which links the serial ports of two playdates via a connected computer. Since there is no standard cable that can link two playdates without a computer, this seemed like the most realistic way that two players would have all the tools to link up in person.
When two devices are connected, all print()
messages that begin with msg
are forwarded to the other playdate, which receives them using the serial callback. This allows arbitrary data to be sent between two playdates, extremely quickly.
I've managed to create a working demo which shows responsive (though low-bandwidth) connection in a two-playdate pong game: video.
It is not as advanced as PDPortal, and there are some limitations.
- If games have print functions left in for debugging, this can (but does not always) cause connection issues.
- It does not have a "ping" function to allow the playdates to change behaviors once disconnected, and the "msg" prints make reconnecting hard. As a result, it is necessary to either restart the game or find another solution to allow reconnecting if disconnected.
- The status screen is too verbose (and a bit unnecessary).
I may update it, but I also hope that others consider adapting the HTML code to their own uses. Have fun!