I want to learn to code game physics engines. Any advice?

Fantaz

Newcomer
I am interested in learning how to program videogame and physics engines. I've got a couple years left of high school to go. I am thinking maybe I should get a dual-major in Physics and Programming in University. I got 96% average mark in Java so I think I am talented.

I am thinking maybe I should go to the Video Game Design and Development course at the International Academy of Design & Technology because I live right next door, but it's a College and I'm thinking University would make better use of my high marks. Also I don't think they would touch on Physics much.

When I look at games like Halo and Doom 3, I am just not satisfied with the physics. I also don't like how developers turn to stupid Havoc ragdoll BS for their physics.

So I am wondering where I should start. Should I buy a C++ book and start reading or take some school courses? Anyone experienced in what to learn?
 
Mathematics is probably more important than physics for this kind of job, I'd say. You need to be highly comfortable with differential equations - far more comfortable than I got from a physics degree. Much of what you would learn on a physics degree isn't likely to be applicable - nuclear, solid state, astro, plasma, meterology, optics, quantum, relativity - which probably made up more than three quarters of my degree.

Another tip: don't dismiss large scale existing work as 'BS' when you don't know you can do better (and if you're looking for courses to learn how to do it, you certainly don't know). It's generally worth avoiding making enemies in a field you work in, or plan to work in. You may end up working with or for them.
 
College vs University

Not sure if community college and University are different in the states, but I've been to both here in Canada. What I can say is, a college offering a 3 year diploma is nearly identical to the first three years of a four year degree program at a University. College is a little more narrow in it's focus, in a way. For instance, you won't do nearly as much math at a College as you would in University for the same subject. And the last year of University will provide you with more in-depth and advanced subjects that there is no time for in College. The tradeoff is a much more personable environment with hands-on instruction at College.

A double major is a pretty big aspiration. I'm not knocking you for wanting to do a double major, but if that decision is solely based around wanting to design physics engines for software, I'd be carefull. Programming is not nearly as glamorous or exciting as it sounds. There is a certain level you'll hit, probably once you start getting into more complex data structures like hashtables and linked lists and trees etc, where you'll notice that at least 1/2 of your class will drop out and switch into another field. If you have a great interest in both of those subjects and would be happy working in those fields outside of games, then I'd say go for it.

You may want to look into a computer math degree. I know one of the Universities in my city has a program called Computer Mathematics, which is far more heavy into math, but offers quite a bit of programming in the last year. Might want to look ito what a program like that has to offer.

Congrats on the Java grade.

Oh yah, as another tip ... if you're not used to doing your homework, get used to doing it now, because it will save you headaches down the road. I knew a lot of really smart people, smarter than me, that could not do well in University because they had no idea how to work. In highschool you can get by without it. In University you're frucked. You aren't gonna get your highschool grades in University without a lot of sleepless nights and heavy work.
 
Dio said:
Mathematics is probably more important than physics for this kind of job, I'd say. You need to be highly comfortable with differential equations - far more comfortable than I got from a physics degree. Much of what you would learn on a physics degree isn't likely to be applicable - nuclear, solid state, astro, plasma, meterology, optics, quantum, relativity - which probably made up more than three quarters of my degree.

That's maybe true of physics degrees in the UK these days (because students here come to Uni without any mathematical grounding whatsoever, as A-levels are no longer allowed to be challenging). Get beyond a first degree however and differential equations becomes an everyday part of the job for many physicists (particularly the theoretical persuasion).

On the other hand the degreed mathematicians I've met have generally been taught stuff which is so abstract that's it's not at all applicable to simulation (or pseudo-simulation) of the real world. So I'm not sure a maths degree would be best either.
 
hmmm

nutball said:
Dio said:
Mathematics is probably more important than physics for this kind of job, I'd say. You need to be highly comfortable with differential equations - far more comfortable than I got from a physics degree. Much of what you would learn on a physics degree isn't likely to be applicable - nuclear, solid state, astro, plasma, meterology, optics, quantum, relativity - which probably made up more than three quarters of my degree.

That's maybe true of physics degrees in the UK these days (because students here come to Uni without any mathematical grounding whatsoever, as A-levels are no longer allowed to be challenging). Get beyond a first degree however and differential equations becomes an everyday part of the job for many physicists (particularly the theoretical persuasion).

On the other hand the degreed mathematicians I've met have generally been taught stuff which is so abstract that's it's not at all applicable to simulation (or pseudo-simulation) of the real world. So I'm not sure a maths degree would be best either.

Maybe it depends on what you focus on during your studies? I know some of the physics and electronics teachers I've had in the past were mathematicians. Also one of my statistics professors was quite radical and threw the course curriculum out the window, re-writing the entire course to focus on simulations using software like MATLAB.

Maybe you should try to contact some of the people who work on HAVOC and see if they'll tell you some stuff about what they did for schooling?
 
nutball said:
Get beyond a first degree however and differential equations becomes an everyday part of the job for many physicists (particularly the theoretical persuasion).
Yes, that's why my M is in computing instead :)
 
Re: College vs University

Scott_Arm said:
more complex data structures like hashtables and linked lists and trees etc,
Crikey. I would have called that basic stuff. Those are essentials for anything in games or 3D.

Oh yah, as another tip ... if you're not used to doing your homework, get used to doing it now, because it will save you headaches down the road. I knew a lot of really smart people, smarter than me, that could not do well in University because they had no idea how to work. In highschool you can get by without it. In University you're frucked.
Very, very true. This hit me hard in my second year - I got away with doing very little to that point, but had to revise hard for the second and third year exams.
 
Re: College vs University

Dio said:
Scott_Arm said:
more complex data structures like hashtables and linked lists and trees etc,
Crikey. I would have called that basic stuff. Those are essentials for anything in games or 3D.

Oh yah, as another tip ... if you're not used to doing your homework, get used to doing it now, because it will save you headaches down the road. I knew a lot of really smart people, smarter than me, that could not do well in University because they had no idea how to work. In highschool you can get by without it. In University you're frucked.
Very, very true. This hit me hard in my second year - I got away with doing very little to that point, but had to revise hard for the second and third year exams.

Well, hashtables, trees, linked lists etc are all basic and essential. You couldn't do much with programming without them. I just found that in school, college & University, this was the point where people discovered if they actually wanted to continue with programming or not. I found most people stuck around when we were learning language syntax and O.O. programming, but once we hit data structures and algorithms a lot of people left. Then when we did compilers, that took care of a lot of the rest of'em.
 
yah

Dio said:
Those are all the fun bits! :)

I enjoy stuff like that. There are a lot of people that enjoy programming casually, but once you need to start planning or investigating algorithm performance, they kind of don't enjoy it anymore.
 
Re: hmmm

Scott_Arm said:
Maybe you should try to contact some of the people who work on HAVOC and see if they'll tell you some stuff about what they did for schooling?

As far as I'm aware a good fraction (of order 2/3's) of the people who work for HAVOC (or MathEngine) have PhD's in maths or physics, not just bachelors degrees. My point was that a physics PhD potentially contains a lot more of what's needed for a good game physics engine than a physics (or maths) BSc.

I wasn't dissing maths by the way, there's a lot that maths can contribute to this art, in particular in the area of highly robust and efficient integration schemes. It's just that when my colleagues present the results of their simulations (in theoretical astrophysics) to mathematicians the questions they get back are rather abstract (eg. "why don't you try assuming that gravity falls as 1/r^6 rather than 1/r^2? If you do that this becomes a constrained fourth-order Habnitz-Liebermann problem!"). Erm...
 
Good friend of mine working for ATI is like that. When line two of a paper begins "Obviously, this vector set forms an n-dimensional matrix in Hilbert space" then you know that mathematics is out and mathemagics is in.
 
Re: hmmm

nutball said:
Scott_Arm said:
As far as I'm aware a good fraction (of order 2/3's) of the people who work for HAVOC (or MathEngine) have PhD's in maths or physics, not just bachelors degrees. My point was that a physics PhD potentially contains a lot more of what's needed for a good game physics engine than a physics (or maths) BSc.
Now is that an indication of the level of academia needed for such a position within the company or an accurate appraisal of the sorry state of jobs for physics bachelors in the UK right now?
 
Re: hmmm

Neeyik said:
nutball said:
Scott_Arm said:
As far as I'm aware a good fraction (of order 2/3's) of the people who work for HAVOC (or MathEngine) have PhD's in maths or physics, not just bachelors degrees. My point was that a physics PhD potentially contains a lot more of what's needed for a good game physics engine than a physics (or maths) BSc.
Now is that an indication of the level of academia needed for such a position within the company or an accurate appraisal of the sorry state of jobs for physics bachelors in the UK right now?

To be truthful I don't know the answer to that question, but if I had to guess I'd say the former rather than the latter. Certainly I know that some companies like to pride themselves on such things, taking only the best of the best so to speak.

As far as I know physics bachelors are still quite attactive recruitment-fodder for large companies, because they are at least semi-numerate, semi-literate, and have some grounding in problem-solving, but my knowledge of this is somewhat third-hand.
 
Re: hmmm

nutball said:
Neeyik said:
nutball said:
Scott_Arm said:
As far as I'm aware a good fraction (of order 2/3's) of the people who work for HAVOC (or MathEngine) have PhD's in maths or physics, not just bachelors degrees. My point was that a physics PhD potentially contains a lot more of what's needed for a good game physics engine than a physics (or maths) BSc.
Now is that an indication of the level of academia needed for such a position within the company or an accurate appraisal of the sorry state of jobs for physics bachelors in the UK right now?

To be truthful I don't know the answer to that question, but if I had to guess I'd say the former rather than the latter. Certainly I know that some companies like to pride themselves on such things, taking only the best of the best so to speak.

As far as I know physics bachelors are still quite attactive recruitment-fodder for large companies, because they are at least semi-numerate, semi-literate, and have some grounding in problem-solving, but my knowledge of this is somewhat third-hand.

Does not surprise me in the least that the Havoc people are mostly PhDs. I'm not sure gunning for a PhD is such a smart idea for Fantaz, if the only reason he wants it is for videogames.
 
Don't have time to read whole reply list so I apologize if it was said before.

Take it from somebody who's in university now... All you need is two to three physics courses in university to obtian the knowledge to remake Havok. You don't need a major.

Mechanics is a fraction of what physics is. Math is a good portion as well. However the problem with physics engines today is neither math nor physics.

Don't underestimate the work in physics engines today. The people who developed Havok are absolutely brilliant. There's a reason why their physics do not appear to be 100% accourate is not because they don't understand physics.

Anybody with a few physics textbooks, basic programming knowlege and lots of time can make a percise physics engine. The problem is the result will only run on the most powerful computers in the world.

The real trick is making an approximation of physics that looks similar but isn't as computationally intensive. If you really want to improve physics in games... study math and computer science. Math will help you to derive eqn's for the approximations and computer science will help you make the physics engine efficient. 3d engine theory, c++ and assembly is where speed boosts will come.
 
If you're interested at looking at the code in a decent physics engine google "Open Dynamics Engine" or ODE.
 
chromentis said:
The real trick is making an approximation of physics that looks similar but isn't as computationally intensive.

Well that's the whole trick of numerical work in theoretical physics! Neither maths nor computer science will tell you what is a good approximation and what is a bad approximation.
 
Back
Top