# .

This topic is 2134 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

.

Edited by Carbon101

##### Share on other sites
Can you give some examples of what you mean? I'm confused because every physics system I've used contains both calculus AND algebra.

##### Share on other sites

.

Edited by Carbon101

##### Share on other sites
Well most physics engines have an integration phase. Here's an article:
http://gafferongames.com/game-physics/integration-basics/

Since both classes will probably cover vector algebra, it probably wouldn't matter much.

You'll find, when doing physics in a game you usually go ahead and use a third party library. The reason being that making a physics engine is very hard, and usually a lot less calculus in it than you'd expect. Calculus likes to deal in time steps very close to zero, which is something computers end up having a hard time doing.

Best of luck! :)

##### Share on other sites

Physics equations are derived using calculus (which also involves some algebra). You can do physics and some physics simulations using only algebra (i.e. you are given what equations you need, and you "solve" for the variable you need). But this only works for the simplest, most basic physics simulations.

For everything else, you need calculus. You need to do numerical integration (the most popular methods for physics I've seen are semi-implicit Euler and RK4, sometimes Verlet too). Rotational physics use Jacobians. Collisions are often resolved using impulses. Basically, physics becomes a system of differential equations, and you need both algebra and calculus to solve it. This is one major reason people often use physics libraries instead of rolling their own physics engine; it's complicated and time consuming (and requires a good amount of background knowledge).

So if you're going to take a physics course, and you want to actually use physics, I'd take the calculus based course. They'll likely get into more of the "meat" of the physics, which is what you really need to do anything useful with physics. An algebra-based course will likely try to keep things too simple (where they'll just give you the equations instead of showing you how to derive them using calculus, and then you just solve for x).

##### Share on other sites

That makes more sense  but I'm not entirely sure what your two classes involves. It sounds like the algebra one might be an introduction to physics, whereas the calculus one is a more advanced dynamics class?

The most basic physics system in a game is very simple. You use forces to compute acceleration, add acceleration to velocity, then add velocity to position.

gameplay variables:
gravity = Vec3D( 0, -9.8, 0 );
thruster = Vec3D( 100, 0, 0 );
...
every frame:
acceleration = gravity + thruster;
velocity = velocity + acceleration * elapsedTime;
position = position + velocity * elapsedTime;

However, that above bit of code actually represents an approximate solution to integrating the basic formula for constant acceleration:

s = ut+0.5at2

or

position = velocity * time + 0.5 * acceleration * time2

In that straightforward code, it doesn't look like you're using calculus; it just looks like some simple algebra. However, you've making use of Eulers method of numerical integration by advancing the simulation with small steps in time.

So, you can actually get a fair way without knowing a lot of calculus, and just relying on some tried and true integration techniques such as the above, without fully being able to derive them for yourself. The above few lines of code probably power hundreds of games

##### Share on other sites

you don't really need to go to those classes, If you want to do a game just start learning DirectX or OpenGL and as you learn it by osmosis you just start making more and more complex things, and as you go you will find everything you need on the internet. Going to university(in programming) is more about meeting other people.

Edited by lomateron

##### Share on other sites

you don't really need to go to those classes, If you want to do a game just start learning DirectX or OpenGL and as you learn it by osmosis you just start making more and more complex things, and as you go you will find everything you need on the internet. Going to university(in programming) is more about meeting other people.

this actually depends on the person, some people learn much better when being taught the subject in person rather than reading it online.

Anyways assuming this is a standard physics class and not for game programming, yes I agree with Hodgens. Formulas used in programming are all usually derived from calculus, but look like simple Linear Algebra and are usually common and can be found online.  Linear Algebra is the only real thing you need to know. I would say Linear Algebra is a requirement for Game Programming, but that's just me.

• 13
• 18
• 29
• 11
• 27
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!