This Is How Video Game Creators Program Gravity

If you have ever wondered how video game players are made to obey the laws of physics, this video is for you.
Loukia Papadopoulos

Have you ever wondered how game developers create gravity and other laws of physics? Well, this video explains it all.

The answer lies in cutting the video games player's movements in small pieces. That mechanism is called the game loop.

The way this loop works is by first updating the position of all the players. The next step is drawing things in the new positions. 

Finally, you go back to the beginning. The question becomes how long should each of the cuts be?

The video narrator explains that in great detail. We won't tell you that part. You have to watch the video after all. 

We will share with you some answers from experts from Quora. "It’s a fairly thoroughly solved problem, so most of us don’t bother writing our own physics libraries," says Daniel Super, Professional Game Programmer & Designer.

"There are highly tested, and tuned physics libraries available with free licenses and physics are already built any game engine worth using." 

"By creating vastly simplified versions of the real thing," says Catreece MacLeod, Creator of Saorsa, World Designer; Game Designer, Writer.

Most Popular

"No one even bothers trying to attempt to describe gravity as the Einsteinian version, despite that it’s more accurate than the Newtonian version, because it’s far too slow and the differences would only matter in a tiny, tiny handful of games anyway, such as Elite: Dangerous perhaps, and even there it’s a lot of wasted processing power for something that the players couldn’t tell a difference in any way unless they scientifically measured the orbits of the planets to absolute values."

There you go! You have it from the mouths of the experts.

message circleSHOW COMMENT (1)chevron