Measures round-trip TCP latency from a Playdate to a server. Displays per-frame RTT on screen. Used to validate networking viability for real-time multiplayer on Playdate hardware.
Connects to a TCP echo server, sends 8-byte ping packets (timestamp + last RTT), measures round-trip time. Displays RTT in milliseconds on the Playdate screen.
On local WiFi (2014-era router, moderate interference):
- Min: 32ms
- Avg: 46ms
- Typical: 32-33ms (75% of samples)
RTT clusters at 33ms intervals due to the Playdate's frame-quantized TCP polling at 30fps. Actual network latency is under 10ms — the 33ms floor is the polling interval.
brew install odin arm-none-eabi-gcc python3Download the Playdate SDK and set PLAYDATE_SDK_PATH.
git clone https://github.com/samuelmueller-dev/playdate-nettest.git
cd playdate-nettest
mkdir -p libs
git clone https://github.com/samuelmueller-dev/odin-playdate.git libs/odin-playdate./build.sh# Connect Playdate via USB, put in Data Disk mode
cp -R build/out/nettest.pdx /Volumes/PLAYDATE/Games/Edit src/main.odin and replace YOUR_SERVER_IP with your machine's local IP:
NET_SERVER :: "192.168.1.100" // ← your machine's IPFind your IP with ifconfig (macOS/Linux) or ipconfig (Windows).
On the machine you set as NET_SERVER:
python3 echo_server.pyThe server listens on port 9000, echoes all data back, and logs per-ping RTT with a summary on disconnect.
| File | Purpose |
|---|---|
src/main.odin |
Playdate app — connects, pings, displays RTT |
echo_server.py |
TCP echo server with RTT logging |
build.sh |
ARM cross-compilation pipeline |
tools/device_stubs/ |
C runtime stubs for freestanding ARM |