Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: Game Programming

  1. #1
    Join Date
    Jan 2009
    Location
    Tech city
    Beans
    64
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Game Programming

    Hey guys,

    I was wondering what language is best suited for game programming. I know C++ comes to mind, but it seems like a lot of people dislike C++ here, and I wanted to hear some opinions.

    I know a great deal of libraries and engines are written for C++ and it is the most used language on the game dev scene.

    I will eventually want to create 3D games, and write game engines (for the educational experience... of course ) Thus the need for a fast compiled language comes into play.

    So I would like to know what you guys recommend. I know this might not be the best forums, but I love this place! You guys are always so helpful.

    Thanks in advance
    Just because a problem takes a long time, doesn't mean it's hard... It just means it takes a long time.

  2. #2
    Join Date
    Jun 2009
    Location
    new York
    Beans
    461
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Game Programming

    C++ is very prominent in game programming, I love the language, and would definitely recommend it.
    -That's just me though...

    ** Just so you know, it will take a lot of learning to to get to where you want to go, so get ready for it. **
    :wq

  3. #3
    Join Date
    Jun 2009
    Location
    California
    Beans
    1
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Game Programming

    I second C++. Most code examples, tutorials, and documentation for opengl, sdl, nvidia, ati, etc, are in C/C++.

    Others languages, like C# are not as portable. Java is portable, but 3D is more difficult to get working cross-platform, in my experience. Lua is good, but as a scripting engine for a game written in C++.

    SDL/OpenGL/C++ is excellent for starting with 3D game programming. I would recommend a lot of calculus and physics for 3D programming. Study hard

  4. #4
    Join Date
    Jan 2009
    Location
    Tech city
    Beans
    64
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Game Programming

    Thanks for your input!

    I am not scared to learn a tough language. A lot of people seem to dismiss a language because it is too difficult, but if it's the best tool for the job then I don't see why not.

    I have the book, "C++ Primer Plus" by Stephen Prata.

    Is this book any good? Or should I go out and get "Accelerated C++", or "C++ Primer"? Which book would you recommend?
    Just because a problem takes a long time, doesn't mean it's hard... It just means it takes a long time.

  5. #5
    Join Date
    Jan 2009
    Location
    Tech city
    Beans
    64
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Game Programming

    Quote Originally Posted by AtaiCirno View Post
    I second C++. Most code examples, tutorials, and documentation for opengl, sdl, nvidia, ati, etc, are in C/C++.

    Others languages, like C# are not as portable. Java is portable, but 3D is more difficult to get working cross-platform, in my experience. Lua is good, but as a scripting engine for a game written in C++.

    SDL/OpenGL/C++ is excellent for starting with 3D game programming. I would recommend a lot of calculus and physics for 3D programming. Study hard
    If there is one thing I like, it's math! And believe it or not, I am dying to put the matrix/vector math to use lol.

    And that's what I was thinking too. Pretty much everything is in C++, and I might use Python for scripting later on.

    I appreciate your help
    Just because a problem takes a long time, doesn't mean it's hard... It just means it takes a long time.

  6. #6
    Join Date
    Apr 2006
    Beans
    278

    Re: Game Programming

    I second the SDL/OpenGL/C++ combination. It's really very powerful. The tutorials here use SDL and OpenGL. Also keep an eye on NeHe as we are working on new tutorials there.

    If you need a simple math library, myself and the other NeHe maintainer have written one called Kazmath which is written in C so it integrates nicely with OpenGL.

    If I had any quick tips to learning C++, they would be:

    • Use std::string (or std::wstring) for strings, never char*
    • Learn about smart pointers (std::tr1::shared_ptr or boost::shared_ptr)
    • Prefer std::vector as your array container (e.g. don't create arrays with the "new" keyword)


    Good luck!

  7. #7
    Join Date
    Apr 2008
    Location
    Denton, Texas
    Beans
    379
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Game Programming

    Quote Originally Posted by Kazade View Post
    I second the SDL/OpenGL/C++ combination.
    I third it.
    REGISTERED UBUNTU USER - #25241
    I void warranties.
    Programming is 10% science, 25% ingenuity and 65% getting the ingenuity to work with the science.

  8. #8
    Join Date
    Apr 2007
    Beans
    2,042

    Re: Game Programming

    Quote Originally Posted by sam191 View Post
    Hey guys,

    I was wondering what language is best suited for game programming. I know C++ comes to mind, but it seems like a lot of people dislike C++ here, and I wanted to hear some opinions.

    I know a great deal of libraries and engines are written for C++ and it is the most used language on the game dev scene.

    I will eventually want to create 3D games, and write game engines (for the educational experience... of course ) Thus the need for a fast compiled language comes into play.

    So I would like to know what you guys recommend. I know this might not be the best forums, but I love this place! You guys are always so helpful.

    Thanks in advance
    You should definitely look into C++0x / OpenGL 3.1 no matter what those script kiddies said.

  9. #9
    Join Date
    May 2008
    Beans
    45

    Re: Game Programming

    It depends. C++ is the language that is used most commonly.I wouldn't say that means it is the best suited for the task, but it does have the most low level game related libraries.
    If I started a game engine, I would be very tempted to pick D, but that is because of my love/hate relationship with C++ and dislike of dynamically typed languages.

    There is no reason to dismiss other languages out of hand. I know of several commercial games written in C#, and picking a higher level language will allow you to get the game written faster. A slower written game is better than a faster unfinished game

    It is also worth pointing out that just because language X can be faster, doesn't mean it is. You can make stupid mistakes that make the result slower than it would be in a language that stops you making those mistakes. There is no reason why you can't write the performance critical sections of a engine in C, and the rest in something like Python.

  10. #10
    Join Date
    Aug 2006
    Location
    60°27'48"N 24°48'18"E
    Beans
    3,458

    Re: Game Programming

    In this particular case there are certainly good technical reasons for using C++ -- both low-level access and native compilation plus object-abstraction. Although I am not completely certain why one would not just approach the engine-authoring parts in C... I would consider it.

    Quote Originally Posted by Tux0r View Post
    You should definitely look into C++0x / OpenGL 3.1 no matter what those script kiddies said.
    ... but hey, this is a description I must take issue with. I have philosophical objections to C++ especially as it comes to teaching beginners the important concepts and mindset of programming, and when it comes personally to language level things I "bother" messing with while coding, but I can't recognize a script kiddy in me
    LambdaGrok. | #ubuntu-programming on FreeNode

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •