1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What languages to learn for Game Development?

  1. Jun 20, 2011 #1
    Hello,

    I was just wondering what kind of language I should learn for getting into game development?
    I'm currently working through some pygame tutorials. Is that relevant at all?

    Thanks
     
  2. jcsd
  3. Jun 20, 2011 #2
    There's not really a good answer to your question. C++ is most likely to be relevant. Java, or C# might be useful. Lua might come in handy. Knowing how to program is far more important than what particular languages you know.

    Btw, you might get a lot more information if you look at the forums on gamedev.net or something.
     
  4. Jun 20, 2011 #3
    Is Python not as relevant in the professional world as C++? Sorry I'm a newb to this.
     
  5. Jun 20, 2011 #4
    C++. Python is a great language, however your question was specifically for game development, of which in my limited understanding would be best served by C++ and a knowledge of OpenGL.
     
  6. Jun 21, 2011 #5

    chiro

    User Avatar
    Science Advisor

    It depends on what type of game you are trying to make. I used to involved in game development as a programmer and my comments come from those experiences.

    Most games are very resource intensive. Most game engines have the goal of producing good visuals and sound, with a game that is as responsive as possible, and has a design that allows people to create a game as fast as possible with design decisions and implementations that make the above a reality.

    Most decent engines provide a completely data driven and script driven system that has specific routines and data definitions that are directly tailored for games. The game engines usually provide a scripting system that is usually event driven and has a syntax usually along the lines of a modified C/C++ language or Java.

    If you want to use an existing platform (Unreal, Doom, Quake, Torque etc), then it's likely that you will just need to get the SDK and start writing scripts, exporting models and level maps, and editing text files with a text editor.

    If you want to modify (or create your own) existing engine, C++ is the way to go.

    Because games are so resource intensive, a lot of the code is written not only in C++, but also in an assembler language of some sort: math routines are written in SIMD instruction sets like SSE2, shader routines are compiled to assembly routines that GPU's read and other routines use very optimal C++ routines that may even take advantage of specific platform execution environments.

    With a game engine there are a lot of things to understand.

    Scripting languages require compilation and interpretation. If you want to effectively unify the script environment with the C++ environment, you need to create base class design with a lot of metadata to do this effectively. Compilation requires compiler design theory.

    Graphics is also a big thing. Back in the quake days people used to write their own triangle rasterization routines, but nowadays we just make a few OpenGL or DirectX calls. But even now with that done for us, its more complicated in different ways. Graphics cards have very extensive vertex and fragment pipelines complete with a complexity of options. You will have to learn all about this for any kind of 3D rendering.

    If you want a GUI like that in Doom 3, you can do this by using your graphics routines to render to a texture. On top of that you will need a framework for UI, and you need to factor in design decisions with standard UI design to create the appropriate framework. Not easy by any means.

    Then you've got optimizations. You optimize for rendering by using spatial classification systems (BSP trees, portals, octrees, and so on). You optimize the rendering pipeline (static vs dynamic objects), physics (collision detection), game play (hit tests), and others.

    Now you have take all of this (and more) and figure out a way how to design it in such a way that its flexible and fast and allows you to create games pretty quickly while still giving good results.

    Also I didn't even mention the whole networking thing: many professional engines design themselves around network communication. The client/server architecture is a centerpiece of the design not only to make multi-player capability optimal and to allow easy capability for server-side control, but it can be used to prevent cheating, and most gamers do not like to tolerate cheats.

    To get around all of this you need to learn more than just languages: you need domain specific knowledge for things like graphics, AI, math, physics, UI, scripting languages, networking, audio, game specific, optimization, software design, and so on.

    If you want to use python as a start then by all means do so. Just understand that if you want to go deep into the rabbit hole, you will at some point have to learn the kind of stuff I have mentioned above.
     
  7. Jun 21, 2011 #6

    Thanks, that was very informative.

    I have quite a bit of time on my hands right now and I can self-teach myself pretty well.
    Would you able to recommend some introductory resources for things you've mentioned?

    I'm thinking about picking up some sort of 3D animation software. What's popular on the market right now?
     
  8. Jun 21, 2011 #7

    chiro

    User Avatar
    Science Advisor

    If you want an idea where things are going you need to understand what is current and the history of the specific domain.

    Take for example 3D rendering. Triangle rendering is a very efficient technique and processes vertices is also a very efficient technique. Since a triangle defines a plane, it is then going to be common sense that rendering triangles is better than rendering higher polygons like quadrilaterals for example. Also you can do vertex operations and fragment operations in parallel, and this is important for rendering since GPU's have many vertex and fragment processors.

    Now there are other methods of rendering such as ray-tracing, but that takes (at least at the moment) way too much processing power to render the kind of environments that games and animated movies render, even in render-farms with hundreds or thousands of computers.

    If you want to learn the rendering pipeline, I suggest you get either OpenGL or DirectX SDK's and read the docs on architecture and the rendering pipeline, and you'll get a good idea of what is behind it all.

    In terms of trends, I'm seeing that newer standards are supported patches. If you want to find out about these look at Bezier curves, B-Splines, and NURBS. I think personally this trend will continue where you supply parametric primitives that the GPU tessellates (i.e. makes into triangles) and renders.

    Also things do change fast in this industry (like most areas involving IT). If you have deep understanding of the field however, you'll be able to keep up pretty easily.

    Now there are a lot of resources out there, but I suggest that if you want to understand the stuff that is out there, look at math books, applied math books.

    One book I think that will be helpful for you is the book "Real time rendering". It is comprehensive and lists a lot of topics that you can branch out and learn deeply. It's definitely one I would recommend.

    You could pick up a "Game Programming using DirectX" book, but if you don't understand it, you'll be using it blindly and if someone goes wrong, you're screwed.

    In terms of animation software, platforms like 3DSMAX and Maya are very comprehensive and very expensive. This is what professionals use. I should warn you, learning how to use these packages is a course in itself and is no short order.

    There are some free alternatives out there however. One thing that comes to mind is the Blender program. I'm sure there are other ones out there though, just search for them.

    If you have specific questions with regard to a specific domain, I will do my best to answer. It's just hard to give you a comprehensive answer to the above question because there are so many things to mention and one post is not nearly enough to even scratch the surface.
     
  9. Jun 21, 2011 #8

    fluidistic

    User Avatar
    Gold Member

    I do know an open game where anyone can contribute with writing codes. The game is well played -there's always players 24h/24-. Google "spring project".
    If I'm not wrong Spring is an engine that can support lots of games. The most popular is "Balanced Annihilation" (you might try that in youtube) though I know some other games are pretty popular too such as "Zero K".
    There was a website that I can't find right now to show exactly the number of lines Zero K is written and in which program. Zero K was written in like (from my memory, around) 8 different programming languages and I do remember that Lua was widely used. All these games are in 3 D and really CPU eater. Even the best core i7 can't handle some of these games without lagging heavily in some situations, with all max graphics set on.
     
  10. Jun 22, 2011 #9

    chiro

    User Avatar
    Science Advisor

    With things like that the routines that are resource intensive are usually compiled to libraries which are optimized.

    Also when it comes to 3D rendering, pretty much at the end of it all, every program uses the same OpenGL/DirectX calls. So when you put up the settings like screen res, anti aliasing, texture resolution and so on, for the most part, it's just setting a few state variables, uploading higher res textures to the video card, or maybe setting a few state variables, and this kind of thing just puts burden on the graphics hardware and not so much on CPU cycles (there can be exceptions).

    I think your suggestion about looking at platforms with multiple languages is good because typically most rapid game development environments use this kind of thing. 8 languages might be pushing it though.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook