Type Race multiplayer
Join a race and type the PHP snippet faster than the other visitors. Each race is a custom scope, and every keystroke updates progress and WPM for all racers.
waiting, countdown, racing and done. All transitions happen server-side; the client just sends keystrokes.Timer::tick() per race counts 3…2…1 and broadcasts to all racers each tick. WPM comes from the time since the start.withWorkerNum().Waiting for racers…
Click Start race when everyone is ready. Open this page in another tab to race yourself.
Signals
username
string session scope Racer handle, auto-assigned. Persists across tabs.
typedText
string tab scope Current textarea value. Sent to server on every input event; never broadcast. The server clears it when a race starts.
Actions
updateProgress
Called on every input event. Server counts correct leading chars, updates this racer's progress and WPM, broadcasts to race scope.
startRace
Starts the countdown of the race this tab waits in.
newRace
Resets a finished race with a new snippet and pulls in racers waiting alone in another lobby.
Views
type_race.html.twig
Lobby, countdown overlay, racing textarea + progress bars, and results podium. The race's status, kept on the server, picks the panel.