• Register
Post news Report RSS DevBlog 6 - Manipulating Time With Code

Implementing time dilation and collision shapes. Time dilation can be used in gameplay, but also to debug problems.

Posted by on

Time dilation allows me to speed up or slow down the passage of time.
The way this is implemented is rather simple.
The frame's global delta time is multiplied by a time dilation factor.
As I prepared my space ship models for collision, I needed a way to test if it was working.

Unfortunately for debugging projectiles are fast moving objects.
The addition of time dilation allows me to observe fast moving objects in a slow motion.
I even created the ability to manually step the frame time.
While on the topic if time, I created an engine feature of being able to set timers.
Because of the systemic nature of timers, I created an automation test system.
This allows me to make changes to the timer system and catch bugs without needing to test the game.



sa vid5 timestepping projectile

sa vid5 ship collision

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: