record and playback in real time?

Posted By: Nicholas

record and playback in real time? - 10/17/11 01:44

I am writing variables to a file via file_var_write and need to play them back in real time the exact same way they were recorded. The problem is that every time I try to do this it always seems to be a little faster on the playback and that screws me up.
Is there any way to do this?
Posted By: MasterQ32

Re: record and playback in real time? - 10/17/11 06:47

you can do this with writing your variables with a time offset to the file.
when you start, you set your a variable to the value of total_time
then write your data with the offset (total_time - start_value).
if you read your data, also start with setting up the offset variable
now you read the first time value, wait until (total_time - start_value) >= timeOffsetFromFile, the read your first set of data.
after that read you next offset, wait for it, read the data, and so on...

Hope you get it
Posted By: Nicholas

Re: record and playback in real time? - 10/17/11 15:49

I thought I tried that. I probably just didn't implement it right.
I'll see if I can get it to work properly.
thanks
Posted By: WickWoody

Re: record and playback in real time? - 11/03/11 09:23

I think you can write position and angle(and roll, tilt etc.) of every object and variables to a file when player is playing the game, after when you want playback, you move the objects from first position to last position with you saved positions.

Sorry for my bad English.
© 2024 lite-C Forums