Trying to get an idea of the math involved (details inside)

Hey guys, I’m currently doing some exercises over at Khan Academy, just to brush up on my math skills. I was one of those kids in high school that didn’t take classes very seriously, but I’m no idiot (although I may act that way at times) :wink:

I’m trying to get an idea of the level of math I should get into, in order to take on a game that has projectiles, animations, and collisions. Shaders will more than likely be absolutely necessary (and I’m scared to death of them), so that’s also something to keep in mind.

My programming venture will not begin for about a year or so. Therefore, I am taking that time to level up my math skills. What sort of math would you recommend?

Let’s assume I know everything up to, and including algebra/geometry.

Algebra II? Trig? Calculus?

I won’t pretend that I will be able to master any of the above in a reasonable time frame, but would a good grasp of the fundamentals of the above be crucial for coding things like projectiles, physics of moving things, such as jumping, throwing, bouncing, floating, water, and collision?

I have a brother-in-law that teaches high school physics/math, so I have a tutor at my disposal :wink:

Any advice would be appreciated. Thanks!

For those things, general algebra and linear algebra is good. Trig is also useful. I haven’t used my calculus since I left university. Not to say it can’t be useful, it just hasn’t come up for me in any of the things I do :slight_smile:

Math literacy (both text and equation) is more important than your familiarity with any specific type of math.

I’ll skip a tirade about cranks/reinvention/idiots … short-version: illiteracy is massively limiting.

My programming venture will not begin for about a year or so. Therefore, I am taking that time to level up my math skills. What sort of math would you recommend?

Learning without application is easily lost. Putting your game aspirations on hold would be one thing, not doing basic throw-away / visualization programs is not a great idea, both in retention of stuff learned and deep understanding of it.

At least set yourself up something basic with a moveable fly-camera, and line-drawing - even if you don’t understand anything about how it works except for the few spots you edit to make stuff happen. That alone will go a long way and you can incrementally expand on it.

Shaders will more than likely be absolutely necessary (and I’m scared to death of them),

They’re micro-programs. You can almost think of them as running 2 console programs and piping the output of the first into the input of the second. Most confusion comes from the transition and the rules of those transitions - otherwise they’re freestanding little programs.

Pretty much just RTFM (or RTFED for GL [ext. docs.]).

Your advice regarding the application of math within the context of actual coding makes perfect sense. I can certainly see it’s advantages. However, I feel there’s nothing wrong with having learned the fundamentals before the application.

I should have pointed out that my C# skill level is basically zero. The reason for the coding delay has to do with other, current business obligations. I won’t have the time to do both the math, and learning to code, at the same time. My current (and ongoing) schedule just won’t allow it. This is why I am taking this year or so to brush up on my math skills.

With that said, if I can include little snippets of code into my daily/weekly routine while soaking in some math, I’ll take that opportunity.

RTFM… hmm, point taken.

If you dont mind using other libraries premade by other programmers to accomplish alot of the same tasks you can get by with very little to no advanced math skills… My highest math skills from school end at Geometry -> No Alg2 or Calc or trig and I’ve done a good bit of stuff without any of it.I was using Unity a while back and needed to hand code jumping without gravity in 3d space and got by with a parabolic calculator someone wrote out for anyone to use on the internet u can find alot of stuff like that…

It might help you to find out what the goals you have in mind are, how many resources are available to help you achieve them and get into the code as soon as possible so you can spend more time developing rather than overprepairing yourself and accomplishing nothing.

Just in case you missed it … it wasn’t meant derogatively. Shaders are super terse and so “do whatever you want” that RTFM might be all you need. If you need more do turn to books/tutorials though - you’ll probably need to since you don’t have a lot of programming background.

To be a bit more useful:

MonoGame provides a lot of stuff out of the box, but you could exercise material you learn by writing Matrix3 (3x3) and Matrix3x4 types for your own use beyond just the Matrix (4x4) … Matrix2 (2x2) is really uncommon, pretty exclusive to interpolants in my experience (uv coords / perspective correct mapping).

Everything laplace is useful to know. Normalization and denormalization should be burned into your brain with an iron. Pure functional curves are handy (MKCB form, ie. regular line is mx+b).

Springs are great … a rabbit-hole, but great. You can use them for all sorts of things.

I bloody love Geometric Algebra, but it’s a PITA to work with in C# as the C# build->debug pipelines suck for the degree of preprocessing required to make it fast (C# really needs a full preprocessor and a compiler/debugger that is indicator friendly [#line]). You can do some incredibly complicated things, specifically form-factors and projections in just a few multiplications in Geometric Algebra. It’s the god of transforming a rect into another space and anything that bounces.