Inspiration
Physics has never been my favourite subject, yet there is something unendingly appealing about the concept of spacetime to me. It reminds me of just how little we truly know and how magnificent the natural world is. The discovery of relativity is also one of my favourite stories - a thought experiment by Einstein while he was on a tram from his work at the patent office to his house and was just thinking about reconciling the disjoint between Newton's Laws and electromagnetism on the speeds of light led to the development of the theory that fundamentally changed how we perceive the world. This is why the time dilation simulator was created
What it does
Essentially, time dilation works using this formula:
Δt' essentially represents the time that has elapsed in a dilated frame
Δt is the time that has elapsed in a stationary frame
v is the velocity at which you're going and
c is the speed of light
This essentially means that at a speed v (significant in comparison to the speed of light), time would pass slowed by a factor of
This is also called the Lorentz Factor
The game implements this functionality by letting the user change the velocity of travel and accordingly adjusts the Lorentz Factor. A simulation of a clock (which is in the dilated time frame) shows how time would appear to slow down for an external observer looking in.
How we built it
I used Pygame for managing the game setup and Moviepy to run the video. The structure isn't overly complicated and I mostly just added functionality one step at a time.
Challenges we ran into
Running the video of the clock at a particular FPS while not letting it interfere with the main FPS rate and simultaneously maintaining a different section with a scrolling background was difficult. Relative positioning was also a difficult task, and in some cases, the exact positions had to be hardcoded.
Accomplishments that we're proud of and What we learned
Learning and building my first game with Pygame. Learning how to show a movie using Python (while also learning about and managing FPS rates) Finally wrapping my head around 0.5% of the concept of time dilation.
What's next for LightSpeed
While this represents the basic concepts of time dilation, there is another aspect, i.e. the effect of a gravitational field that impacts time dilation. Implementing that while making bodies of different sizes appear would be the next step. Making it more engaging and developing a better UI is also on the list.

Log in or sign up for Devpost to join the conversation.