I am a programmer and I want to pursue the Game Design field. From talking to my teachers about it, they said that physics plays a major role. My Question is: How does physics transfer to a virtual computer based environment. Is it fundamentally the same or can you create a world that defies our rules.


closed as off-topic by Danu, Brandon Enright, Kyle Kanos, John Rennie, Bernhard Aug 26 '14 at 18:31

  • This question does not appear to be about physics within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 7
    $\begingroup$ Have you ever played any video games? I'd say it's quite clear that one does not have to strictly stick to the rules. $\endgroup$ – Danu Aug 26 '14 at 18:07
  • $\begingroup$ Yes I know but I was curious as to how you make things obey the laws of physics. Sorry for asking an unclear question. $\endgroup$ – theeppright Aug 26 '14 at 18:08
  • 5
    $\begingroup$ Then, this question appears to be off-topic because it is about programming rather than physics. There are other SE sites that might be more useful for you. $\endgroup$ – Danu Aug 26 '14 at 18:10
  • 1
    $\begingroup$ Generally speaking, real physics is very hard to "play", which is one reason why so few of us are great ballplayers, circus athletes etc.. The more important question for games is, how one can modify physics so that it's "fun". $\endgroup$ – CuriousOne Aug 26 '14 at 18:10
  • 1
    $\begingroup$ You can in fact create a world that defies our rules. Case in point: a game by MIT called A Slower Speed of Light in which, as you progress in the game, the speed of light is reduced so that you see some relativistic effects as you move (e.g., light shifting colors). $\endgroup$ – Kyle Kanos Aug 26 '14 at 18:11

I'll provide just one example of how to make a game obey known physics here. Note that there are countless others.

Much of classical physics is based on Newton's second law $\vec F_\text{net}=m\vec a$. Another way to write this expression is $d \vec p/dt = \vec F_\text{net}$. Or taking the liberties that physicists usually do: $$d\vec p = \vec F_\text{net}dt$$

This means that if you know all of the forces on some object (which you can again choose to obey known laws), you can figure out how the momentum $\vec p$ of the object will change in a very short time interval. This is useful because $\vec p=m\vec v$, so ultimately it allows you to figure out the trajectory of an object.

I suppose a generalization can be made from this. If you know your initial conditions, you can use a governing differential equation to figure out how the conditions will change a very short time later. This is how many simulations are done I believe.

By the way, too many spaceship games (and TV/movies for that matter!) don't obey this law. They do something more akin to $\vec F_\text{net} \propto \vec v$, which always bugs the heck out of me. If I turn my engines off I want to keep coasting, not stop.

  • $\begingroup$ Thank you very much! One games that you may enjoy is Space Engineers. It lets you coast and stuff, check it out! $\endgroup$ – theeppright Aug 26 '14 at 18:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.