in
Welcome to Lionhead Community Sign in to Windows Live ID | Help

Programming and its Connection to Math

Last post 09-09-2009, 20:46 by RAVEK. 20 replies.
Sort Posts: Previous Next
  •  05-27-2008, 21:17 2927039

    • PCRYJ is not online. Last active: 08-29-2009, 3:27 PCRYJ
      //"Practice, Practice, Practice.."
    • Not Ranked
    • Joined on 05-26-2008
    • New York
    • Junior Member
    • old karma : 0

    Programming and its Connection to Math

    I'm a fairly new programmer(C++), and I have had a few questions about programming as it becomes more complicated and complex that I never seemed to find the answer to.  Do you have to be G o o d [Good] at math to be a G o o d [Good] programmer?  I'm asking this because I am concerned at the fact that I'm not exactly G o o d [Good] at math(English is more of my thing), but so far I am enjoying programming at a simple level.  Also, as programming becomes more complex, meaning development level of AAA games (Fable 2), what type of math is invloved?  Can you get by with just a simple understanding of certain math topics? 

    - If anyone from the community or hopefully someone from Lionhead, could answer any of these questions for me, or just give me some suggestions, that would be greatly appreciated! ^^ [^^]


    [ Video Game Photography ]
    sites.google.com/site/videogamephotography
  •  05-28-2008, 0:53 2927142 in reply to 2927039

    Re: Programming and its Connection to Math

    Well, first of all, think about some of the games that are out.  Take a game like Halo 3 for example.  Think about all the physics that go into that game (the interactive water alone is pretty complex physics from what I understand).  And, in terms of Math, it goes pretty high up there.  When games are being created they are being created using physics and maths from the world we live, which is very complex.  I am taking the first part of calculus right now (differential calculus), and I am still quite a few math classes from being where the professionals are mathematically.  Furthermore, I am new at C#, but can already tell you that math definitley helps you in the long run.

    Anyways, I hope that helps you somewhat.  I hope I am right on that second question, haha.
  •  05-28-2008, 3:37 2927193 in reply to 2927039

    Re: Programming and its Connection to Math

    Firstly, you're going to need to be able to handle algebra as a bare minimum, as the basic building blocks of any program are essentially just fancy algebra.

    As you get more 'serious' you'll need to pick up Discrete mathematics (boolean logic, set theory, propositional logic etc...).

    Trigonometry is extremely useful to know, especially when working on a 3d game. Vectors and Matrices are pretty much essential for 3d games too.

    Programming is pretty heavily tied into maths knowledge, but it's not necessarily the kind of 'hard maths' you might expect.

    Calculus is worth knowing but you can get by without it, even Statistics can come in handy.

  •  05-28-2008, 7:26 2927300 in reply to 2927193

    Re: Programming and its Connection to Math

    Much of the maths in a physics engine, though are handled for companies nowadays via engines like Havok.

    Other 3rd party engines like Unreal, Kynapse, etc. handle many things for you already, allowing programmers to focus on the meat of the game.

    So yes, you'll have to know some maths (at my university, a Computer Science Major ends up nearly also having a major in Maths just because of the required courses), but as we progress in the gaming industry, more is handled for you already.

    Besides, there are many programming tasks that use either no math or just simple algebra.


    Philosophical Ninja.
  •  05-28-2008, 7:40 2927304 in reply to 2927300

    • PCRYJ is not online. Last active: 08-29-2009, 3:27 PCRYJ
      //"Practice, Practice, Practice.."
    • Not Ranked
    • Joined on 05-26-2008
    • New York
    • Junior Member
    • old karma : 0

    Re: Programming and its Connection to Math

    Does AI Programming require an extensive amount of knowledge in mathematics, because that's actually what I would be most interested in doing.
    [ Video Game Photography ]
    sites.google.com/site/videogamephotography
  •  05-28-2008, 11:14 2927364 in reply to 2927304

    • Tyrkish is not online. Last active: 10-22-2009, 9:06 Tyrkish
      Chestys best friend
    • Not Ranked
    • Joined on 01-23-2006
    • somewhere in Germany
    • Rookie
    • Tyrkish
    • old karma : 0

    Re: Programming and its Connection to Math

    in my opinion, AI Programming is the development of npc behaviour.
    so the 'usual' math probably would be sufficient. anyway, you will need a G o o d [Good] knowledge of Discrete mathematics (see above) since this is the logic you need to develop the behaviour of an npc by catching the different possibilities of re-/actions. the rest of the necessary math will come as programming gets 'deeper' and improves.

    (sorry for the bad English)

    People have hope
    Because they cannot see Death standing behind them.
    -=Tite Kubo=-

  •  05-28-2008, 13:01 2927428 in reply to 2927304

    Re: Programming and its Connection to Math

    PCRYJ:
    Does AI Programming require an extensive amount of knowledge in mathematics, because that's actually what I would be most interested in doing.

     Glen Watts1
    Senior AI Programmer

  •  05-28-2008, 13:59 2927458 in reply to 2927428

    • Tyrkish is not online. Last active: 10-22-2009, 9:06 Tyrkish
      Chestys best friend
    • Not Ranked
    • Joined on 01-23-2006
    • somewhere in Germany
    • Rookie
    • Tyrkish
    • old karma : 0

    Re: Programming and its Connection to Math

    may I give you an advice; since you said for yourself that you are new in programming.
    start with some little projects and get used to apis, how to read docs and all this and after you get really into it start focusing on special fields like AI, sound, 3D, etc. etc.

    you need to know the basics really well or you might have some problems getting help or understanding the help that is given as most programmer boards 'demand' a certain knowledge. if you do not have that, they often say something like: "try to start at the beginning with some open-ebook as ....."

    that are some experiences I gained so far and want to share with you.

    just think about it; otherwise ignore this =)

    People have hope
    Because they cannot see Death standing behind them.
    -=Tite Kubo=-

  •  05-28-2008, 20:00 2927709 in reply to 2927458

    • PCRYJ is not online. Last active: 08-29-2009, 3:27 PCRYJ
      //"Practice, Practice, Practice.."
    • Not Ranked
    • Joined on 05-26-2008
    • New York
    • Junior Member
    • old karma : 0

    Re: Programming and its Connection to Math

    Well the dilemma I'm really having is that I don't think like a mathematician.  Math doesn't come naturally or very easy to me but I like programming.  Since programming IS so closely tied to math I'm not sure what other paths in the game industry I could take that would be as interesting to me..ORLY [orly]


    [ Video Game Photography ]
    sites.google.com/site/videogamephotography
  •  06-12-2008, 10:29 2937208 in reply to 2927709

    Re: Programming and its Connection to Math

    well, I'm halfway through my undergrad computer science degree, and I can tell you that while a pretty heavy math knowledge is VERY helpful, you don't need to be an A+ student all the time.  I have gotten "decent" grades in my courses and just finished the math component of my degree.  At least at my university, I had to take many math heavy courses.  At my university (www.ku.edu), my main math courses have been Engineering Calculus 1 and 2, Engineering Physics 1 and 2, Vector Calculus, Linear Algebra (think matrices), Engineering Statistics, and Discrete.

     

    However, many of these courses were taken concurrently with my first few programming classes, so it is not at all like you need a heavy math knowledge to even begin programming.

    Furthermore, there are many applications of programming that require more basic math (obviously a firm grasp of algebra is a given).  I spent quite a bit of my previous semester learning Perl, which we mostly used for text based application (i.e. regular expressions, longest common subset of two strings, etc) which required very little intensive math.

    It just depends what you want to do with your programming skills after university.  If you want to work on, say, missile guidance programs (random example) you'll obviously need heavy math for physics/trajectories/etcetc.  I think you get my point.  I hope this helped a little.  The main thing to takeaway from my long winded post is that you should NOT blow off your math classes and say to yourself "oh it doesn't matter that i'm failing calculus, i can get by" but at the same time don't think "OH GOD I GOT ONE "C" GRADE, I'M A FAILURE AND SHOULD CHANGE MAJORS!"

     

    Smily [:)]

    -Giffy


  •  06-14-2008, 10:39 2938722 in reply to 2937208

    Re: Programming and its Connection to Math

    Seriously, if you're planning to do AI then discrete will be a godsend.
  •  06-27-2008, 0:18 2948219 in reply to 2938722

    • PCRYJ is not online. Last active: 08-29-2009, 3:27 PCRYJ
      //"Practice, Practice, Practice.."
    • Not Ranked
    • Joined on 05-26-2008
    • New York
    • Junior Member
    • old karma : 0

    Re: Programming and its Connection to Math

    Thank you very much for all of the helpful suggestions! Smily [:)]
    [ Video Game Photography ]
    sites.google.com/site/videogamephotography
  •  06-27-2008, 10:21 2948563 in reply to 2938722

    Re: Programming and its Connection to Math

    Glen Watts1:
    Seriously, if you're planning to do AI then discrete will be a godsend.

     

    what particular aspect of discrete...in my discrete class we covered everything from induction proofs, combonatorial logic, sets, etc etc.

     

    some of the topics were snoozingly simple, and others i personally had a terrible time grasping.


  •  06-30-2008, 4:54 2950665 in reply to 2948563

    Re: Programming and its Connection to Math

    Hmm, induction is usually considered to be pure maths rather than discrete, guess it depends on how your uni has it's courses set up (we had two maths modules in the first year, one discrete and one pure).

    Combinatorial logic, boolean logic, propositional logic, set theory, cardinality, stuff like that really.

    To be honest, all maths is useful in games coding, just some kinds are more useful than others. Mechanics I use a fair bit, mainly the stuff at the simpler end (the day I need to use simple harmonic motion in a game is the day to quit I suspect, heh) Even stats gets a workout sometimes, there was a lot of stats work in setting up the town AI in Black and White 2 (one day I really will do a paper for AI Gems on how we did that, some really nice stuff in there).
  •  06-30-2008, 9:56 2950817 in reply to 2950665

    Re: Programming and its Connection to Math

    thanks glen


  •  11-16-2008, 13:54 3229234 in reply to 2927039

    Re: Programming and its Connection to Math

    Math got me started with programming. Programs are a very G o o d [Good] way of playing around with math problems and playing around with math problems is a G o o d [Good] way of learning to program. It gives you something to do in the run up to writing blockbuster game titles.
  •  09-01-2009, 20:45 3398884 in reply to 3229234

    Re: Programming and its Connection to Math

    See the funny thing is....I'm terrible at maths! But I'm excellent at Algebra and "Sets" and "Sub-Sets" and all thos puzzle solving aspects of maths..is this G o o d [Good] or bad?




    Take the Role-Playing Stereotype quiz.
  •  09-07-2009, 13:36 3401090 in reply to 3398884

    Re: Programming and its Connection to Math

    But all maths is the same skills. It's symbol rewriting and creativity. Obviously you can know more or less about some specific subject, and have varying amounts experience with it, but if you're rigorous enough it's all the same.

    Algebra and set theory are among the most useful maths for computer science, so being G o o d [Good] with them is definitely useful. Also group theory and category theory are incredibly useful if you want to properly generalize the structure of your code. (Especially in OOP). Of course group theory, category theory and set theory are basically all different forms of algebra or related to it.
  •  09-07-2009, 17:34 3401248 in reply to 3401090

    Re: Programming and its Connection to Math

    As his been mentioned, maths is pretty essential for programming.
    It depends on your definition of "maths" as to whether or not you will be able to grasp progamming concepts.
    It'd start with Discrete, Basic Algebra, Trigonometry and Linear Algebra if you want to work with games!

    As a network/multiplayer programmer I deal with prediction etc a lot, which is mostly algebra and trigonometry.
    Other areas of programming will require a different skillset, but you should at least understand the basics of them all.
    Joe Hegarty
    Multiplayer Programmer - Fable III
    http://blogs.msdn.com/joehegarty
  •  09-09-2009, 15:21 3401870 in reply to 3401248

    • LEORA is not online. Last active: 22/11/2009, 6:14 LEORA
      Beware the Kitty

    • Top 10 Contributor
    • On your shoulder, telling you to burn things!
    • Godlike Member
    • old karma : 678
    • FormerHK GoodMember

    Re: Programming and its Connection to Math

    Many of you have just depressed me. I was hoping to get through the rest of my uni career without looking at linear algebra again. Stick out tongue [:P] (What can I say, C's can be discouraging)

    If you plan on doing programming at university (or college, depending on your country, I guess), chances are you're going to have to do some maths subjects as a required part of your course. Other bad news is many of the introductory programming subjects like to use maths problems as examples (such as the fibonnacci sequence). I'm currently doing AI fundamentals, and it's using a lot of what we learned in discrete mathematics last year (thankfully it's the easy stuff, at least so far). My uni's games developer course (which I'm not doing) also has physics classes specifically for games programming, which I'd expect would involve more than a little maths. Of course, I don't know how great my uni's games course is... our guest lecturer was some guy who thought he was great because he worked for a company that made games for iPhone. Rolleyes [:rolleyes:]

    Anyway, this thread just caught my eye. I'll go back to not being here now Paranoid [:aranoid:]

    *Insert something amusing here*
  •  09-09-2009, 20:46 3401975 in reply to 3401870

    Re: Programming and its Connection to Math

    fibonnacci sequence

    To teach recursion, probably? Stupid instructors always do that.

    http://blogs.msdn.com/ericlippert/archive/2004/05/19/how-not-to-teach-recursion.aspx

    Eric Lippert, who writes my favorite programming blog, argues here, better than I ever could, that the Fibonacci sequence is a poor way to introduce recursion.


    As for maths in uni courses on computer science, if it were up to me they'd be a lot more maths-focused than they are now. I think it is essential for a G o o d [Good] programmer to abstract his thinking, to take a step back and look at the structure of their code, and to construct programs on logical principles and rigorous steps in stead of gut feeling and trial and error.

    Also, the most interesting developments in computer science are very mathematical results. About half the Turing Awards are for mathematical achievements, and about all of the Dijkstra Prizes.
View as RSS news feed in XML