Prof. Monster's Timeshift - replay recorded position and orientation

Hello again!

Again? do I repeat?

YES, with TimeShift. This cool new (cool again) module allows you to let one or more objects follow another object.


That is not new?
TrackTo can do that already?
And SlowParent too?

Nope! TrackTo and slowParent try to make shortcuts to the current position.
TimeShift records the location and orientation of the object and let the followers repeat the exact path of the original (with a time shift).

The module is small and handy with just 3 BGE callable functions.
I will produce the documentation later.

Version: 1.0
Date: 13.Dec.2010

BGE version: 2.49 and 2.5

FollowMe = object to be followed:

  • TimeShift.record - record the FollowMe’s motion

    • maxShift = the maximum number of frames to be recorded. By registering followers with larger shifts, this value is automatically increased.
    • Follower = object following a FollowMe object
  • TimeShift.register - Followers must register (once) the FollowMe before following.

    • follow = the name of the object to follow. Should be unique and in the same scene.
    • shiftBy = the number of frames the play should be delayed
  • TimeShift.follow follow the object

    • shiftBy = the number of frames the play should be delayed

Watch the demo. It works in BGE 2.49 and 2.5 :cool:!
TimeShiftDemo.blend (362 KB)

Hints:

  • Make sure the Follower is not visible as long as the shift isn’t reached. Alternative, the Followers could be placed at the start location of the FollowMe.
  • Remember to use the Module mode of the Python controller!

Pretty cool :smiley:
i also liked the motion-blur like effect

Really nice!!

Awesome! :yes::yes:

With some semitransparent followers, it looks a bit like motion blur ;). The Followers can be anything, but should have ghost and collision on faces disabled.

Nice job - this could prove very useful for a lot of people.

Very useful, thanks.^^

Nifty- if these values are stored in a more permanent way (perhaps dumped to a file every X frames, to save on ram but not take the CPU time to write to the HD every frame) you’ve got yourself recordings you can play back a la Halo or COD.

It might be worth noting that the name is a bit misleading though, I came to the thread expecting a system to slow down or speed up time in-game.

@Captain - That’s true, I, too, thought it had something to do with shifting time in-game.

I took the name form the current HDD recorders. At least in Germany they call it TimeShift. Maybe the modified title is better.

Finally it “shifts the time”, you can even use it to go back and play the game from an earlier stage. Rather than using the recorded data on another object, you could use it on the same object.

I dont understand it, i can only see the something like motion blur,

motion blur is “just” an effekt.

TimeShift is like this:

imagine you are walking through snow.
Someone else is following you putting his feets in the foot steps you left in the snow.

So he is following your steps … but later. That is TimeShift.

It does not matter what object follows the first one. It does not need to be a copy.
The demo shows you that suzanne is followed by other suzannes with transparency switched on. So it looks like motion blur. Watch the sphere. It is followed by some cubes, another cube and a cylinder.

Cool Thenk you monster

Hey thats pretty cool.

Thank you monster

in 2.77 this really runs slowly O.O

probably throwing some errors Rocky,

For me in 2.77, it is very slow as well but there are no errors

there are some physics issues is all it looks like,

Suzannes -> intersecting themselves and using triangle mesh and convex hull (big hit)

Cubes -> not marked no collision -> intersecting themselves. (smaller hit)

edit: fixed

Attachments

TimeShiftDemo_BPRFix.blend (654 KB)