views:

749

answers:

15

I have a choice between Physics and Economics as elective units in a course I'm about to start (undergraduate level). I'm already doing maths as part of the course, so should hopefully do some trignometry and geometry etc which is helpful for 3D game programming.

However I'm not sure if I should choose Physics over Economics. I am aware that game engines often have a physics component, but does knowledge of Physics as taught in colleges help with that? What are some examples of how Physics' theories/knowledge can assist in game development?

+2  A: 

Physics and other natural sciences help develop logical thinking and clean up the mind. This will be helpful everywhere in life, not just in game programming.

The understanding of physical processes may be of use when you try to model object interaction in space. Now they meet each other, bounce, change their courses, leave impact on each other etc. That part of course that deals with radio waves and light theories will help you understand and model complex ray tracing algorithms.

Developer Art
I prefer logic courses for this purpose.
Brian
I'm not going to downvote, but I disagree - physics has NOT made me a better software engineer. But then again, I don't work on games or simulations of the physical world...if I did, I might have a different perspective. However, mathematics, especially discrete mathematics, has improved my thought process.
Thomas Owens
+14  A: 

Certainly physics can help, but it depends greatly on the kind of game programming you're doing. Obviously, if you're working on a physics engine for a 3d game, then a solid understanding of the physics of mechanical motion will be a great help. However, I would say for most cases, game programmers probably don't deal with this kind of thing very often. Many companies use 3rd party company physics engines, and any physics that you would be doing would probably be pretty elementary.

I do not mean to discourage you from physics necessarily, and in fact, I think it's the better choice. It's a highly structured and interesting (and probably, though this is arguable, more useful) option for games programming...especially since you'll probably start on the mechanical motions area. But evaluate each class carefully, unless it's contributing to your major, since many higher end physics courses (such as electromagnetics, wave motion, quantum theory, relativity, etc.), while interesting, would not contribute much, in a direct way, to games programming.

EDIT, responding to a comment: To be a bit simplistic, the physics of mechanics is the study of how things react when forces are applied to them. The reason that understanding and replicating the physics of the real world is important is that you, as a human, already have a very intuitive sense of how the physics of mechanical motion work. You know that when you push a ball, it will roll, and you can make some guesses about where it will roll, and how far, depending on how you hard you push it, how heavy it is, etc. You have an idea that when you throw a stick, it will rotate through the air, and if it hits something it won't simply stop, but will bounce away in some direction. These are things that you know from just being alive for some time, and interacting with your environment, and a game that doesn't model these things correctly is very easy to spot, because it violates your innate sense of how things work. You may not understand exactly why something looks unrealistic, but you can spot it immediately. This is why it is so difficult to model a human walking, for instance, and movies and video games use motion capture when they want to make it look right: because our brains are very, very good at picking up a lot of subtleties in motion.

So, how does this affect you as a programmer? In many cases, if you can model the physics of what is happening, you don't need to worry about bizarre input: you can just let things happen, and they'll look good. As an example in a game, if I drop a ball in a street, and let it bounce, what happens? Realistically, it might hit a parked car, bounce at a strange angle, hit a moving car, gain some speed and launch itself over a building. Or, if it were dropped at a slightly different angle, an entirely different scenario might result. How can you possibly program in every possibility? You can't...but you can let physics do the work for you. During each cycle of the physics engine, it looks at all of the objects, and decides what happens to them. The ball, hitting the parked car, hits at velocity vector x, the car part it hits has a normal vector theta, and a speed vector z, resulting in a new velocity for the ball y. This sounds complex, boils down to a set of physics formulas that are well understood, and are relatively straightforward. You put those formulas into a physics engine, enter the various values for your objects, and start 'er up...and if you've done things right, things just look right...because they're modeled after what is going on in the real world.

Inertia, momentum, mass, force...these are all things that can be included in a physics engine, and understanding how they work and how you can model, or when and how you can fake them, is critical in handling realistic physics.

Does that help? If you're looking for something more specific, or a different example, just ask.

Beska
"Obviously, if you're working on a physics engine for a 3d game, then a solid understanding of the physics of mechanical motion will be a great help." Can you elaborate on that possibly with some examples of how mechanical motion knowledge can help?
Click Upvote
@Click Upvote: Mechanics is the term that describes the branch of physics you were probably thinking of. Quoting Wikipedia, it concerns "the behaviour of physical bodies when subjected to forces or displacements". Generally macroscopic.
Nikhil Chelliah
Nikhil: exactly so, which is what I was trying (perhaps ineffectively) to say in the original post. Mechanics is essentially *exactly* what is needed/desired for realistic 3d motion...other branches of physics...probably not so much.
Beska
Could the downvoter give me some feedback on what I could do to improve this answer?
Beska
+1  A: 

vector computations? F=MA? plays great deal in game development.

Randz
how ?
Click Upvote
well, for example, the computation of trajectory of a projectile, when you fire a cannon basically follows laws of physics (you do not want the projectile to go backward when fired ;-)). There is an article that may help further explain the role of physics in game development: http://www.gamedev.net/reference/list.asp?categoryid=28
Randz
+1  A: 

If you have never taken Economics, I recommend you take it. I had the choice between History and Economics in high-school and forever regret taking History. You will learn stuff that can be valuable not only to investing and your career, but just understand the world in general. Seriously, I'm hunting for Economics classes now at college, and since its an art school its not as easy as it sounds.

I really wish I had taken some Macro/Micro so that I could understand half the junk people say on the news better... its frustrating.

But that's just from a career path that doesn't require Physics perspective. If its really helpful for your career then maybe its the right choice. But seriously, I think everyone should take a class in Economics.

Ian Storm Taylor
+1  A: 

Seems to me that learning Ragdoll Physics would benefit greatly from Physics training. http://en.wikipedia.org/wiki/Ragdoll%5Fphysics

CmdrTallen
+3  A: 

Both Physics and Economics have their place in game programming.

A healthy understanding of Physics will give you the ability to more realistically model visual interaction if you are making a graphical game.

EDIT: What I mean by that is any game you are building with graphics will be viewed by people that live in the physical world, bound by its rules. These rules and how they interact is what you'd learn in the Physics class. Knowing these basic interactions would help you build a more realistic model for the players. You'd hopefully be able to avoid comments like "the physics 4 this game are teh suk."

A healthy understanding of Economics is less important in most games, but very important in the large scale MMO type games, or any online collaborative game where you have buying/selling/auctioning available.

My personal opinion is that Physics trumps Economics both in a gaming and life experience situation. However, I would push you to take both if possible over the course of your education!

Instantsoup
"the ability to more realistically model visual interaction.." Can you elaborate on that?
Click Upvote
+3  A: 

Well, this may sound lame, but I suggest taking what interests you.

Physics can certainly help in game programming. Especially classical physics. Modern physics( particle, string, nuclear etc) won't help you too much however.

But if you have a keen interest in Economics, you should go for it.

jetru
+1 Two excellent points: Do what interests you, and most of physics won't be relevant to games (so it's probably best to take it only if it interests you).
tom10
A: 

I agree with @Instantsoup that both Physics and Economics have their place in different types of game. However, I would recommend Economics because it will show you a view of the world that is farther removed from the CS/Math world view than Physics will.

David Locke
+3  A: 

I think Physics would be extremely valuable in a very narrow programming field even within game programming (eg. 3d graphics engine), whereas Economics would be generally helpful in almost any programming field by equipping the programmer to understand the business goal of the programming task more quickly.

Also, from my experience, those who are interested in programming already have more interest and experience in natural-science subjects than social-science or humanity subjects. So learning something you had not taken much interest in, especially at an early stage of your study and career development would help you see things from a different angle.

If you are starting an undergraduate course, I would encourage you to broaden your view first by taking Economics. Economics is an excellent subject that can help you to understand the world we live in. It's not just about money, but more often than not, it's a lot about people, data and statistics, reasoning, etc. So, I don't know if I'm answering your question, but I suggest you to take Economics over Physics.

tim_wonil
A: 

As Beska says, there will usually be physics engines available for your use, and you will only specify what happens, not all the intricate details of how it happens.

Likewise, if you are programming some of the physics API's, or especially any OpenGL, or GPU programming, a solid understanding of linear algebra will be very beneficial. Perhaps more so than physics.

maxwellb
+3  A: 

It depends on what area of game development you get into..but...overall, while economics is nice too, physics definitely builds the critical thinking process you'll need to do game development far more than economics will.

Calculus probably won't come up too much, but matrix (linear) algebra and vectors definitely will. Gaining a good intuitive feel for vector math might actually be the single best benefit to come from physics as it applies to "general" game development.

Nick Gotch
+1 for linear algebra and vectors. Vectors were probably the most useful thing I learned about in my Physics classes.
Steve S
+7  A: 

Frankly, stuff like Linear Algebra >> Physics and Economics, especially for game programming.

At this point, there are entire physics engines already built for game programmers -- so focus on whichever you'll enjoy the most. The other approach is to take whichever is easiest, and spend that free time making an actual game. I picked up most of my good programming knowledge outside of class, in my spare time.

ojrac
It wasn't directly part of the question, but you get +1 anyway for mentioning Linear Algebra. Pretty much the lifeblood for a lot of 3d work, which is what (s)he seems to be asking about.
Beska
Yeah, I figured I'd go off topic a little, to emphasize that Physics vs Economics isn't going to be a critical question, compared to some potential other choices.
ojrac
+2  A: 

The engine side of a 3D game is pretty heavy on logic, trigonometry, vector math, matrices ... you can certainly use an existing engine technology if you aren't interested in creating your own. Even then, though, it will be very helpful to understand at least the fundamentals of all the above concepts. I wouldn't say you have to be an expert in these things for game development, but again, it depends on what "end" of the pipeline you want to explore.

For "general" game development, understand the APIs is more critical. As others have said, at least have a solid understanding of linear algebra and vectors and you'll be just fine.

Economics is a pretty amazing field, by the way. It would definitely broaden your knowledge and thinking in different directions.

Oh, and good luck.

S Hall
+2  A: 

Go get a copy of the syllabus for the physics class. I will imagine that you will be disappointed when you read it - you'll spend a short amount of time on the things that will be useful to you, and a much larger amount of time on things that won't have any value in game development. The subset of physics that physics engines generally cover is pretty tiny.

Economics will be useful both inside and outside of game development. I would suggest you give the syllabus of that a look as well.

quillbreaker
Depends on the physics class. At the university level, I've found that the introductory physics classes tend to be broken up into 2-3 semesters, with one semester of it being primarily devoted to the mechanics (which is very relevant.) However, your point about checking the syllabus is a very good idea...if they're going to spend 1/3 of the semester on wave motion and another 1/3 on electromagnetics, it might be a great class, but not so applicable.
Beska
I remember lots about friction, rotating objects, and thermodynamics in my physics classes, none of which are really relevant to the design of most games.
quillbreaker
A: 

I have no idea about game programming but taking physics classes may open the door for more technically challenging development than, say, pushing around API functions. Believe me, scientists could use some actual real life programmers to clean up their awful code :).

temp2290
Creating AI and designing social and economic features of a game is VERY MUCH more challenging than pushing around API
Click Upvote
Apparently some take themselves way too seriously and didnt like my snarky answer.
temp2290