Math skills required for Computer Science/Game Programming
76 replies, posted
I am now second year of Computer Science and until now we had:
1st semester: calculus, discrete mathematics, physics (and for digital chips boolean algebra)
2nd semeter: linear algebra
3rd semester: probability and statistics (the worst of them imo)
in 4th semester I took as additional subject mathematical modelling
All above subjects had 3 hours of lessons and 2 hours of practice per week.
All of them are used heavily in computer science (well, except physics) even though at first it doesnt seem so.
For example, probability and statistics is used in artificial intelligence, discrete mathematics and calculus for algorithms (like Fast Fourier Transformations), not to mention linear algebra and its vectors and matrices and so on...
Or, to better present you the task at hand:
[IMG]http://shrani.si/f/1V/SC/4ZarfyZl/1026498700bv1.jpg[/IMG]
CS majors don't know the pain of differential equations and boundary value problems. Engineering is difficult. :(
Significantly harder than algorithms, which, even when it's tough, is fun-tough, and not 'strongly-considering-jumping-in-front-of-a-speeding-bus-to-save-myself-the-pain'-tough.
[IMG]http://d24w6bsrhbeh9d.cloudfront.net/photo/216702_700b.jpg[/IMG]
Sort of relevant...
you don't really need math classes for programming. if you have a logical mind, when you encounter a math problem you need to code, you'll go look it up, read, learn, understand, and make it work. i started working with 3D back in middle school and I learned about matrices, quaternions, etc. just by programming and using them. sure, i might not be able to regurgitate random mathematical properties of them, but i can sure use them :)
[QUOTE=icantread49;33859533]you don't really need math classes for programming. if you have a logical mind, when you encounter a math problem you need to code, you'll go look it up, read, learn, understand, and make it work. i started working with 3D back in middle school and I learned about matrices, quaternions, etc. just by programming and using them. sure, i might not be able to regurgitate random mathematical properties of them, but i can sure use them :)[/QUOTE]
But you still need the math itself ;)
And unless the OP can teach himself very well, he should take these math classes provided by the university/college.
I was a bit concerned about this myself honestly. I'd love to become a CS Major, and I've always excelled in math, but I had an insane amount of trouble with Pre Calc last year and AP Stats this year because I'm taking it online with no instruction aside from prerecorded lectures and my own self-teaching skills.
The most daunting task to me is going into college and having to re-do all the stuff I didn't learn properly. Anyone want to reassure me, even in the most minimal of ways?
[QUOTE=icantread49;33859533]you don't really need math classes for programming. if you have a logical mind, when you encounter a math problem you need to code, you'll go look it up, read, learn, understand, and make it work. i started working with 3D back in middle school and I learned about matrices, quaternions, etc. just by programming and using them. sure, i might not be able to regurgitate random mathematical properties of them, but i can sure use them :)[/QUOTE]
Don't get too overconfident. That's a mistake I've made in the past.
When you learn by working on a specific problem, you only learn a very small subset of a subject. It's easy to convince yourself that you have a full working knowledge of the whole subject when you really don't.
I'm currently in the first year of my Computer Science course, and thus far I've found the maths to be mostly entirely useless, I can understand the need for trig and how to calculate line related mathematics (traces and the like), but I am yet to see the point in some of the mathematics that seems to exist for the pure sake of doing the mathematics.
However, having an understanding of how to apply some or most of the maths will be a great help but will not stop you in any way as you can always pick up the knowledge you need as you encounter mathematical problems, after all, all the mathematical calculations we may need to make in future have been done and realised by someone else before us and thus we just need to look it up.
Why waste time going to math classes in college when you have the internet?
(Joking of course.)
[QUOTE=ROBO_DONUT;33864078]Don't get too overconfident. That's a mistake I've made in the past.
When you learn by working on a specific problem, you only learn a very small subset of a subject. It's easy to convince yourself that you have a full working knowledge of the whole subject when you really don't.[/QUOTE]
who said i had a full working knowledge? it was working knowledge for what i needed it for.
[QUOTE=icantread49;33872310]who said i had a full working knowledge? it was working knowledge for what i needed it for.[/QUOTE]
The problem is you probably won't know enough to know what you don't know.
You have to understand the math so that you can recognize a potential application when it slaps you in the face. Your approach might work for game dev, where you can just google "how do I shot camera" and have the answer handed to you on a silver platter, but there are plenty of problems that aren't so simple. If you don't learn for the sake of learning, you're stuck following others instead of actually solving new and interesting problems.
[QUOTE=Echsidor;33864766]I'm currently in the first year of my Computer Science course, and thus far I've found the maths to be mostly entirely useless, I can understand the need for trig and how to calculate line related mathematics (traces and the like), but I am yet to see the point in some of the mathematics that seems to exist for the pure sake of doing the mathematics.
However, having an understanding of how to apply some or most of the maths will be a great help but will not stop you in any way as you can always pick up the knowledge you need as you encounter mathematical problems, after all, all the mathematical calculations we may need to make in future have been done and realised by someone else before us and thus we just need to look it up.[/QUOTE]
At first year we also didnt use much maths, and I guess its because they wanted us to learn how to programm first, then take us to more serious stuff. Now we already mildly use maths and I expect that well use it more and more.
For example, our last homework for subject algorithms and data structures, in which we had to make discrete fourier transformation involves linear algebra (matrices, vectors), calculus (polynomes, complex numbers and trigonometrical functions), discrete mathematics (modulus): [url]http://pastebin.com/SAPdL9P5[/url] [url]http://pastebin.com/YZzPhXLf[/url]
And I think while its annoying to do maths in college, if I didnt recieve those classes I wouldnt know what the hell is going on in that algorithm. Ofcourse you could learn all by yourself but its going considerably faster if you recieve knowledge from someone with experience than if you search for it by yourself. If you recieved a contract to write a program that needs mathematical stuff, how much time would it take you to study all the math stuff you need for it? Im sure the client wouldnt be happy to wait for you to learn that stuff and would go to some other programmer who knows maths already.
Praise math and the art of problem solving. I guess almost all programs and such at the university make you learn a bunch of courses that you may not need later, but I think it's more about developing a style of thinking.
I realised that I learn stuff so much faster after my 2 first years at uni, and I also have a better way of tackling problems I encounter by myself.
You maybe don't need that when you're developing something like a 2D platformer as you can google every single problem you encounter, but that don't really work when you start developing stuff people never done before.
[QUOTE=ROBO_DONUT;33872856]The problem is you probably won't know enough to know what you don't know.
You have to understand the math so that you can recognize a potential application when it slaps you in the face. Your approach might work for game dev, where you can just google "how do I shot camera" and have the answer handed to you on a silver platter, but there are plenty of problems that aren't so simple. If you don't learn for the sake of learning, you're stuck following others instead of actually solving new and interesting problems.[/QUOTE]
so making your program work the way you want it to work is not the same thing as solving new and interesting problems?
[QUOTE=icantread49;33875614]so making your program work the way you want it to work is not the same thing as solving new and interesting problems?[/QUOTE]
Yes.
[QUOTE=Darwin226;33876121]Yes.[/QUOTE]
okay. i guess my answer is perfect considering the thread title is "Math skills required for Computer Science/Game [b]Programming[/b]" then
It does seem to vary from uni to uni. Southampton for example want an A in A-Level maths, wheras Nottingham will take you without a maths A level.
It depends whether the university is one which is happy to spend the first year schooling pupils up to mathematical competency or not. I'm in Nottingham, and there's been some concern from our algorithm lecturer that we're all mathematically retarded, to which I pointed out the man spent 12 minutes subtracting 11 from 35.
In terms of what you do on the mathematical modules, so far its been algorithms/discrete maths, combinatorics, sets and logic stuff. Nothing I'd consider difficult, if you've done calculus you'll tend to find this much easier intrinsicly.
Infact, if you want to have a look yourself, have a gander at this:
[URL="http://www.cs.nott.ac.uk/%7Evxc/g51mcs/g51mcs.html"]http://www.cs.nott.ac.uk/~vxc/g51mcs/g51mcs.html[/URL]
Also, have a look at some Haskell. If the shit boggles your mind, do more maths.
Like others have said, it really depends on which University you go to and exactly which course you study. From what I understand, most Universities (at least within the UK) spend the first year of your course bringing everyone up to at least a basic level of mathematical understanding including some basic algebra, set theory and graph theory. This might not all seem too relevant if you are planning on studying games development, but believe me it is.
I just started the second year of games development this year and there is an absolute ton of maths involved. All of the stuff i've mentioned here will probably be covered only once it has a practical application, but reading into it will definitely give you a head start.
Graph theory - Used a great deal in AI and other problem solving algorithms. Graph theory allows you to take a seemingly massive abstract problem (such as finding your way through a maze) and program a solution that is both intuitive and computationally efficient. You should read up on a number of path finding algorithms including Dijkstra's, A* and Best-First.
Newtonian physics - Having a decent knowledge of Newtonian physics is pretty essential if you ever plan to make a game. You should read up about vectors, forces and SI units. Consider for example that you have a skydiver falling from a plane, and you want him to fall realistically (at a rate of 9.81ms^-2).
Trigonometry - Probably the most used branch of mathematics in games development. Used for calculating distances between two points, rotating objects, performing transformations on the camera etc. One important area you should study in this field is transformation matrices (Trigonometric identities used for moving / rotating objects in 2d or 3d space).
Calculus - Although not essential, at least some basic knowledge of differential and integral calculus will aid you a great deal in solving and understanding problems of a physical nature.
In terms of non-maths stuff, you should also read up on -
Graphics related stuff including shaders, vertex buffers, index buffers, rasterization, double buffering, anti-aliasing and lighting.
Object oriented programming (most likely C++). You should read up on classes, data structures (lists, arrays etc), inheritence, polymorphism. Learning how the compiler works is definitely also a good idea (linking, loading) and learning a little x86 assembler definitely wouldn't hurt.
Hopefully I haven't scared you off, and like I said most of the stuff will probably covered in great deal initially assuming only high-school level of maths knowledge.
[QUOTE=AaRoNg11;33920817]
Trigonometry - Probably the most used branch of mathematics in games development. Used for calculating distances between two points, rotating objects, performing transformations on the camera etc. One important area you should study in this field is transformation matrices (Trigonometric identities used for moving / rotating objects in 2d or 3d space).[/QUOTE]
How involved are the identities? Do you have to apply them as you did in a trig course, such as creating your own identities to suit the situation, or do basic ones work?
I found the algebra/calculus portion of Pre-Calc(which is intro to Calculus and involved trigonometry) fairly easy, but I did horribly during the trig sessions. Then again, I never once talked to my math teacher so I'm sure Uni math courses are far easier than self-teaching.
I'd say transformation matrices are more of a linear algebra or computational geometry topic.
Of course, trigonometric functions are used in rotation matrices and such, but we don't say that taking the integral of sin(x) is a trig problem (it's still calculus, even if it involves trig functions).
[QUOTE=Mr. Bleak;33923294]How involved are the identities? Do you have to apply them as you did in a trig course, such as creating your own identities to suit the situation, or do basic ones work?
I found the algebra/calculus portion of Pre-Calc(which is intro to Calculus and involved trigonometry) fairly easy, but I did horribly during the trig sessions. Then again, I never once talked to my math teacher so I'm sure Uni math courses are far easier than self-teaching.[/QUOTE]
As ROBO_DONUT said, I kind of misworded it and it's more a calculus problem. I can't really see a situation where you'd have to create identities. What I was actually talking about was transforming a vertex or set of vertices which requires you to multiply them by an identity matrix depending on what it is you want to do. For example, to an object clockwise in 2d space by angle theta we would use the following -
[img]http://upload.wikimedia.org/wikipedia/en/math/3/9/2/3926e29506f01e50efe1699029fbb6d5.png[/img]
I didn't say it was a calculus problem :S Matrices are a linear algebra thing.
[QUOTE=AaRoNg11;33923527]As ROBO_DONUT said, I kind of misworded it and it's more a calculus problem. I can't really see a situation where you'd have to create identities. What I was actually talking about was transforming a vertex or set of vertices which requires you to multiply them by an identity matrix depending on what it is you want to do. For example, to an object clockwise in 2d space by angle theta we would use the following -
[img]http://upload.wikimedia.org/wikipedia/en/math/3/9/2/3926e29506f01e50efe1699029fbb6d5.png[/img][/QUOTE]
Ah good. I absolutely despised trig because of how much fill-in-the-gaps type work there was.
I'm taking AP Calc next year, so I hope it prepares me well for a Comp Sci major with a pure math minor.
I'm programmer and half of time i program 2D/3D graphics(close to games). I don't have any technical education, I'm financier/economist.
Programming is a tool, you can program whatever you want, from "Hello world!"s to CADs and complex math calculations.
I.e. for a web-site you don't really need any math, for 2D game you'll need some and for 3D you'll need lots of math, 3D is all about trigonometry. But don't be scared if you're not dumb school level will be enough to start programming math and learning it further.
By the way all my gaming and modding experience helped me a lot.
[QUOTE=AaRoNg11;33923527]As ROBO_DONUT said, I kind of misworded it and it's more a calculus problem. I can't really see a situation where you'd have to create identities. What I was actually talking about was transforming a vertex or set of vertices which requires you to multiply them by an identity matrix depending on what it is you want to do. For example, to an object clockwise in 2d space by angle theta we would use the following -
[img]http://upload.wikimedia.org/wikipedia/en/math/3/9/2/3926e29506f01e50efe1699029fbb6d5.png[/img][/QUOTE]
Lol. I've used to do this in 2 different ways. :v:
For a graphical object I do
[CODE]yourobject.rotation = aaa;[/CODE]
For bitmap data i do
[CODE]var m:Matrix= new Matrix();
m.rotate(bbb);[/CODE]
Where aaa - angle in degrees and bbb in radians.
But this doesn't mean that i don't know this cos/sin matrix.
PS I've always had like 3/5 marks(which is minimum) at school unlike my classmates, but now no one can even dream about salary like mine, haha :dance:
Instead of making a new thread, I'll just ask in here:
I'm getting a ton of free time on my hands after I finish up schoolwork and I've taken an interest in Programming. Where would one really (and I mean fully and absolutely) begin? I've always thought of making it a possible profession.
[QUOTE=The First 11'er;33994089]Instead of making a new thread, I'll just ask in here:
I'm getting a ton of free time on my hands after I finish up schoolwork and I've taken an interest in Programming. Where would one really (and I mean fully and absolutely) begin? I've always thought of making it a possible profession.[/QUOTE]
Well you need to decide which language you would like to start with then find yourself a resource and start experimenting, see what you can come up with.
There are lots of threads on this try a search, you will find lots of info.
[QUOTE=The First 11'er;33994089]Instead of making a new thread, I'll just ask in here:
I'm getting a ton of free time on my hands after I finish up schoolwork and I've taken an interest in Programming. Where would one really (and I mean fully and absolutely) begin? I've always thought of making it a possible profession.[/QUOTE]
If you don't have any programming experience start with some old BASIC (not Visual Basic)
[CODE]10 INPUT I
20 IF I >= 0 THEN PRINT "Positive number or null" : GOTO 40
30 PRINT "Negative number"
40 END[/CODE]
So here is roadmap I would take if i started learning programming:
BASIC -> JavaScript -> C -> ActionScript3 -> Java or C++ (you decide)
BASIC: it will help you a lot in learning some basic concepts of programming, just take a look at it
JavaScript: this one is weakly typed OOP language, simple to understand and simple to start (runs in any browser)
C: not C++! Will show you static typing, low-level features and shows you how powerful programming language looks (similar to C++ and Java)
ActionScript3: really useful language, neat and logical syntax, runs everywhere(of course Flash Player is needed). Used for everything from simple HelloWorlds to games, enterprise front-ends and engineering software. Can help with earning some $$$$
Java and C++: can be used for anything and also games(though Java games are pretty rare), sometimes can make some pain in ass. These programmers are paid the most.
For games you'll need C++ and trigonometry knowledge and sometimes some sort of Programming Engineering/Computer Science education paper. But personally I would not want to be game programmer because behind the curtains it's not even close to playing games.
Contact me if you need help. ;)
BASIC actually looks kind of fun, wish I had messed around with it when I started.
I went straight to C++ dabbled a little bit and then went on to C# which I really enjoy using.
I had quite a interesting roadmap myself.
BASIC -> Actionscript -> Javascript -> Actionscript 3 -> C++ -> Java
and I really like working in java now. :P
Minecraft modding helped fuel that though.
[QUOTE=reevezy67;34010525]BASIC actually looks kind of fun, wish I had messed around with it when I started.
I went straight to C++ dabbled a little bit and then went on to C# which I really enjoy using.[/QUOTE]
I miss GOTOs. <3
By the way, I've forgotten to put C# near C++ and Java. It's pretty much like Java and salaries are equal, but I've heard Silverlight 5 is the latest version and there won't be any new versions, so no in-browser frontend for C#. Same thing with Adobe Flex 4.6, it is the latest version. HTML5 killed them all.
Sorry, you need to Log In to post a reply to this thread.