Tracks a laser pointer on a projected surface via webcam and streams its position over WebSocket. Turns any wall or projector screen into a real-time laser-controlled input device.
A C/raylib asteroid shooter, games/space-shooter, driven by the controller's WebSocket stream.
Two AIs gameplay. The game also takes mouse input for a single player, or laser input for one to two players on a projector.
webcam -> OpenCV (HSV + perspective) -> FastAPI / WebSocket -> game client
- controller/ — Python backend. FastAPI + OpenCV vision pipeline (HSV filtering, 4-point perspective transform), calibration web UI, unit tests.
- games/space-shooter/ — Reference client. Cross-platform C/raylib game that uses the controller's WebSocket stream.
- concept/ — Design notes. See concept/laser-pointer-detector.md.
- Run the controller:
cd controller make run - Calibrate at http://localhost:8000 — mark the 4 corners of the projection surface, then sample the laser color.
- Connect any WebSocket client, or launch the bundled game:
cd games/space-shooter make run
- Controller: Python 3.14, FastAPI, OpenCV, NumPy, Uvicorn, pytest
- Game client: C99, raylib, vcpkg. Cross-platform build (macOS, Linux, Windows via MinGW).
Source-available under PolyForm Noncommercial 1.0.0. Non-commercial use only; see the license for details.