Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Replaying a game session - help

Discussion in 'Scripting' started by Kurt123, Jan 19, 2015.

  1. Kurt123

    Kurt123

    Joined:
    Jul 20, 2012
    Posts:
    12
    I'm asking this on behalf of a friend taking his doctorate degree in communication. His team is running a simulation using Unity where each seassion is 20 minutes long. They then collect and analyze the collected data. What they would like to be able to do is record and re-play a recorded seassion from any point during the 20 minute session. I'm not sure were to start to look for a system or a code-base implementing something like this, so any given direction for picking up information or any tips would be very helpfull.

    Thanks,
    Kurt
     
  2. Zachary Van Kleeck

    Zachary Van Kleeck

    Joined:
    Oct 31, 2013
    Posts:
    40
    Couldn't you just have your friend use software like Frapse and record the sessions that way?

    Really any screen recording software could be running in the background during each session without causing much of a problem.
     
  3. Kurt123

    Kurt123

    Joined:
    Jul 20, 2012
    Posts:
    12
    Thanks for input, but that want do it. The data needs to have the ability to be played from any point during that 20 minute session to test variables causing different communicative results.
     
  4. Kurt123

    Kurt123

    Joined:
    Jul 20, 2012
    Posts:
    12
    To make it more clear. When I write "play" I understand that can be misunderstood. What I mean is not just screening the seassion back, but let's say at the 12th minute from a recorded seassion you play for 3 minutes, then collect the new data from this alteration. So in this there would first have been a full 20 minute session. The next seassion would collect the same data except those 3 new minutes played from 12minutes to 15 minutes.
     
  5. Zachary Van Kleeck

    Zachary Van Kleeck

    Joined:
    Oct 31, 2013
    Posts:
    40
  6. Random_Civilian

    Random_Civilian

    Joined:
    Nov 5, 2014
    Posts:
    55
    The answer varies depending on how the simulation is set up.
    A general thing to do would be to take a screenshot of the variables every timestep and save changes and their results as branches.
    Another way is to use a command pattern. Just save starting conditions and commands that alter the variables, undoing them when you need want to go back in "time."
     
  7. Kurt123

    Kurt123

    Joined:
    Jul 20, 2012
    Posts:
    12
    @Zachart Van Kleeck
    This could be a valid portal to start. Thanks again. I am thinking that .avi is redundant though. I would just need to capure the steps taken somehow, and we could just use the game code to re-render the playback. Sorry, thinking out loud here.
     
    Last edited: Jan 19, 2015
  8. Kurt123

    Kurt123

    Joined:
    Jul 20, 2012
    Posts:
    12
    This seems closer to what I had in mind. Thank you. Im gonna link this thread to my buddy and see what he gets out of it with his team.
     
  9. Random_Civilian

    Random_Civilian

    Joined:
    Nov 5, 2014
    Posts:
    55
    Personally, I would go for the command pattern. It is more OOP and more extendable. If you wanted, logging functions or other things could be attached to the commands to reduce the work needed,
     
    Kurt123 likes this.