Search Unity

Using OnSerializeNetworkView to record demos

Discussion in 'Multiplayer' started by CraigTimpany, Sep 21, 2009.

  1. CraigTimpany

    CraigTimpany

    Joined:
    Sep 21, 2009
    Posts:
    3
    Hi, I'm looking at ways of recording and playing back gameplay in a single player game. The networking stuff looks interesting because it's already got a bunch of state synchronisation stuff.

    Recording looks like it'll be doable, but does anybody know if it's possible to drive a client by playing back a stream of network messages? I don't see anything in the API.

    Cheers
    Craig Timpany
     
  2. psx

    psx

    Joined:
    Aug 25, 2005
    Posts:
    80
    I don't think you need the networking components at all for replaying gameplay. I think you could just record the players input along with some timestamps and use that to drive the playback.
     
  3. CraigTimpany

    CraigTimpany

    Joined:
    Sep 21, 2009
    Posts:
    3
    Good thought, but that assumes that Unity is deterministic. I guess if it were, they'd only be transmitting input for network play as well.

    From the posts I've read it sounds like the physics engine has some numerical precision issues. If anyone has more detail about specific non-deterministic bits that'd be good to know too.

    Craig Timpany