Search Unity

Connect a client and record its screen

Discussion in 'Multiplayer' started by citron8000, Aug 2, 2019.

  1. citron8000

    citron8000

    Joined:
    Nov 25, 2014
    Posts:
    22
    Hello,

    Whenever a session is started on my multiplayer game, I would like to spawn an external client and add it to the game and record its screen (and then convert it to a video).

    This external client could be started from a cloud server for example, with a good GPU and even Windows.

    Has anyone experience doing this? Is it possible to run multiple clients on the same machine? Because having one machine per client would obviously be a problem to scale.

    Thanks!
     
  2. G44Gonzalo

    G44Gonzalo

    Joined:
    Apr 11, 2018
    Posts:
    15
    I think you must do it from scratch. Anyway, im not an expert.
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    It is not impossible, but you aren't going to find a ready made system for that. If I were to attempt something like this, my first thought would probably be to build my game and network API entirely deterministic. Maybe take the lock step approach for example. Then the recording client basically just replays the game in real time from the perspective of the player client.

    You'll have to come up with some way to efficiently record video of the game, since normally you'd do that with an outside application built for that (fraps, etc).

    That all would only be necessary though if the intention is to post the videos on some video sharing service. If you just want the player to be able to replay the game inside your game you don't even need the secondary client. You just record every player's inputs, which you can just replay in the game client to watch the entire match again. Since the game is built entirely deterministic, you take the same starting state and feed in the same inputs, and you get the exact same playback of the game as when originally played.

    That's a ton of custom work though.