Jump to content

Shard's Blog

  • entries
    5
  • comments
    35
  • views
    6,994

Continuum


Shard

2,426 views

 Share

A lil project I've been working on.

Unfortunately, I can't post to the gallery as I seem to not have that ability.

 

http://www.youtube.com/watch?v=FDif_bKEbW0

 

Features:

Forward, rewind and pausing of time on all objects.

Gravity gun ability on all objects.

 

Future Plans

Ability to load a scene (through load scene) and search for all bodies on the map and attach a Time Capsule object to all of them to allow for time warping on all objects.

 Share

8 Comments


Recommended Comments

Agreed with the above!

 

That was really nicely done. It seems very smooth too which is a big plus. Well done!

Link to comment

really cool. Can you tell us bit how the time control and the gravity attraction works?

 

Sure.

 

The gravity is really simple, I use the gravitational formula to calculate the force that the gun would put on objects around it and then use ForEachEntityDo and apply the force to them (using a pivot that I place at their position, point to the grav source and then TFormVector on it). The rest is all realistic physics.

 

The time control is done a lot less efficiently at the time. I record the position, rotation, velocity and angular momentum in a vector for each object for each frame when its playing forward.

When its paused, I set physics mode to off and remove all momentum on the object.

And for rewind, I set objects position, rotation, angular momentum and velocity as its played back in time using a pop on the vector.

Link to comment

The time control is done a lot less efficiently at the time. I record the position, rotation, velocity and angular momentum in a vector for each object for each frame when its playing forward.

When its paused, I set physics mode to off and remove all momentum on the object.

And for rewind, I set objects position, rotation, angular momentum and velocity as its played back in time using a pop on the vector.

 

That must take up a ton of memory, storing all that information about so many bodies... Does this happen 60 times per second? Is there a maximum rewind time (for example 10 seconds) Or will it try to save as much as it can until it runs out of memory?

Link to comment

That must take up a ton of memory, storing all that information about so many bodies... Does this happen 60 times per second? Is there a maximum rewind time (for example 10 seconds) Or will it try to save as much as it can until it runs out of memory?

 

 

At present state it will go until it runs out of memory.

Storing 12 floats for 500 objects for 60 frames results in 360000 bytes or 0.00034 Gigs of memory.

I have not placed a cap on the rewind time right now but I can easily do that.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...