Skip to content
debuffjpPublic

About

Send your web game on a field trip: scan a QR code and test it on real phones

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FieldTrip

Send your web game on a field trip. Scan a QR code and any phone on your Wi-Fi runs the game, with its frame times, errors and live screen on a dashboard on your machine. Works with any engine, needs no phone app, and nothing leaves your network.

Early version: so far it has run on one real iPhone, in Chrome.

npx fieldtrip http://localhost:5173   # your dev server
npx fieldtrip --demo                  # built-in test game

Open the dashboard URL it prints, on this machine, and scan the QR code. If the phone can't load the page, your Wi-Fi may block devices from reaching each other, or the address may be wrong: set it with --host <your-lan-ip>. --port changes the port from 4700.

What you get

  • Frame times: fps and p95 for each phone, with a live graph.
  • Errors: uncaught errors, rejected promises, console.error and failed resources.
  • Device details: screen, GPU, and which browser APIs are missing.
  • Video: the phone's screen over WebRTC, falling back to JPEG over WebSocket if WebRTC can't connect within 5 seconds. Tap the mirrored screen to send input.
  • Comparison: "Run comparison" alternates no video, JPEG and WebRTC on each phone for about 3 minutes and saves a trip report to fieldtrip-results/. Keep the dashboard visible, because it receives the WebRTC video.

Limits

  • Anyone on your network can open the proxied game while this runs, as with vite --host. The dashboard and its controls answer only on this machine.
  • Phones load the game over plain HTTP, so APIs that need a secure context are missing. Each device card lists them.
  • Taps on the mirrored screen are synthetic and don't count as user activation, so audio unlock and fullscreen still need a real tap.
  • Phones must share a network with your machine.

License

MIT

About

Send your web game on a field trip: scan a QR code and test it on real phones

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages