Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Mpez on June 22, 2013, 06:35:21 pm

Title: Time reversal
Post by: Mpez on June 22, 2013, 06:35:21 pm
There is no option to reverse time in FS, right? Are there any workarounds to do it (to create awesome things such as the clip shows)?

(http://imageshack.us/a/img195/1310/meu1.gif)
Title: Re: Time reversal
Post by: headdie on June 22, 2013, 06:47:26 pm
in short no.

to do something like this would require some way of recording the location, velocity and status of every object in the mission space, including stuff like debris and asteroids which have minimal if no interaction in the data system over hundreds if not thousands of processing frames., no small feat.

The data needed would also go a long way to making an (auto)save feature, which i admit would be cool to have formally supported in the engine
Title: Re: Time reversal
Post by: Mpez on June 23, 2013, 02:40:23 am
Ok... So I assume everything would have to be imitated using reversed explosions and manual spawning of ships and debris (and making it go in specific directions)...

Two quick questions:
1 - can we spawn a specific debris element from a model (ex. debris01 from a Viper model) using sexp expressions - ship-create or something?

2 - can we make the debris "fly" to a specific place without having to make it a separate ship with the ability to fly in the tables? I know we can move it instantaneously using set-object-position, but I want a smooth change of position
Title: Re: Time reversal
Post by: Arpit on June 23, 2013, 07:53:30 am
Ok... So I assume everything would have to be imitated using reversed explosions and manual spawning of ships and debris (and making it go in specific directions)...

Two quick questions:
1 - can we spawn a specific debris element from a model (ex. debris01 from a Viper model) using sexp expressions - ship-create or something?

2 - can we make the debris "fly" to a specific place without having to make it a separate ship with the ability to fly in the tables? I know we can move it instantaneously using set-object-position, but I want a smooth change of position

If somebody could add the option of negative arguments (for time reversal) in set-time-compression sexp..... :nervous:

1- Err... I don't know ... You cannot create specific debris element from a model. (ship-create creates the whole ship) You can place a ship in FRED and in Ship Editor you can set the Destroyed before mission in seconds in Misc Tab. But then you will get all debris elements...  :blah:

2- You can use set-object-speed-(x or y or z), but then you will have to create a ship entry in ships.tbl .  :) However this could be achieved using a script. For example, the debris gravity script.
Title: Re: Time reversal
Post by: The E on June 23, 2013, 08:10:57 am
If somebody could add the option of negative arguments (for time reversal) in set-time-compression sexp..... :nervous:

Wouldn't help, because the engine does not keep track of objects in a way that would make this work. For simple stuff, like debris and unguided primaries or secondaries, this would be sufficient, but objects with more dynamic flight characteristics would behave completely wrong.

At some point during FS retail's development (waaaaaaaay back in 2000), :V: planned a "Replay theater" kind of feature, but it was never completed, and only existed as stubs and commented out code in the source code release. If they had completed this, it might have been used as basis for a time reversal feature, but as it is, we cut it out of the FSO codebase a loooong time ago.
Title: Re: Time reversal
Post by: Arpit on June 23, 2013, 08:29:58 am
Hey MPez, would you like to take a look at this script. (http://www.hard-light.net/forums/index.php?topic=67351.0)
Title: Re: Time reversal
Post by: mjn.mixael on June 23, 2013, 09:06:01 am
Even with the linked script, I'm highly suspect that this can be pulled off in the engine as-is
Title: Re: Time reversal
Post by: Arpit on June 23, 2013, 09:08:46 am
Even with the linked script, I'm highly suspect that this can be pulled off in the engine as-is
I second that. It is literally impossible.
Title: Re: Time reversal
Post by: Droid803 on June 23, 2013, 06:27:12 pm
Eh, you'd have to just record it in a video and reverse it.
That's how Transcend did it.
Closest you will ever get.
Title: Re: Time reversal
Post by: Mpez on June 24, 2013, 06:42:13 am
Eh, you'd have to just record it in a video and reverse it.

You're probably right. That's what I did for the gif in the first post. Still, I'll try to do it with reversed explosion effects and debris tabled as ships when I have some free time.