PadPlay

Lifecycle

What happens from a phone joining to leaving. Pick a stage to see its events and API.

  1. Show QR code

    The Host starts listening and QR View shows the code. When this PC is found to block phones, a strip appears under it.

  2. Join

    The player gets a slot. No input yet.

  3. Ready

    Input starts and the pad works. Spawn the character here.

  4. Buttons

    The button layout is sent: Settings.Buttons.Layout for everyone, SetLayout for one player.

  5. Input

    Touches arrive as uGUI events; buttons and gyro through PadPlayPad.

  6. Video

    A View sends a camera's picture to the player's phone. H.264 video appears about 0.1–0.3 s after PlayerReady; input already arrives before that. The View lowers quality on weak Wi-Fi, and the phone asks for a repair when the picture breaks.

  7. Away or drops

    When the phone's app leaves the game's screen (screen off, home screen, another app), PlayerAway comes; the connection and the slot stay, and PlayerBack comes on return. When Wi-Fi drops, or a phone that left does not come back in time, PlayerLeft comes and the host waits for the same phone. The slot and the pad stay. The SDK does not pause the game: add PadPlayAwayPause for that.

  8. Comes back

    Back within Resume Hold Seconds (default 300 s): the same slot, and Resumed is true.

  9. Gone

    Timed out (Expired), Disconnect in the app or Kick (Bye), or the host stopped (Stopped). Remove the character here.