Just a basic question about game programming

This is a discussion on Just a basic question about game programming within the Game Programming forums, part of the General Programming Boards category; well hello, im new to programming and i just started coding in C.. I just want to know is game ...

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    7

    Just a basic question about game programming

    well hello, im new to programming and i just started coding in C.. I just want to know is game programming different from C and c++ programming or what.. I just need some more info about game programing and a simple game writen in C if possible so i can get an idea what is it all about
    thanks..
    NFS.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The purpose of the forum is to discuss programming of games, rather than technical issues in C or C++. So if you have a question of "How do I sort my game objects in the 3D world", then it's a game programming question.

    If you have a question about C++ that is also about games, then it's borderline - make your best guess of whether it's more game or more C++ - and if you get it wrong, the moderators will move the post. Most people read all the forums anyways...

    Most commercial, big, games are written in C++, but games can be (and are) written in just about any language ever produced.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    The larch
    Join Date
    May 2006
    Posts
    3,573
    If that is the question then no, the syntax of C and C++ is the same regardless of what type of programs you write. So if you know how to program in C or C++ you can use these languages also for writing games.

    Game programming however is a complex field, uses many specific algorithms and techniques, and often relies on third-party libraries for graphics and sounds. That is probably why there's a separate board (you might get better advice from Gamedev forums - and tutorials - when it comes to programming games).
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,584
    ...(you might get better advice from Gamedev forums - and tutorials - when it comes to programming games).
    It's not that we do not dole out good advice for games but this board is not specifically geared to game programming. The number of members here that actually code games in their spare time is quite minimal and thus the experience base from which questions are answered is equally as minimal.

    The best thing to do when researching games and techniques for games is to use multiple sources. You may find something at gamedev that just doesn't suit your needs but you might find something somewhere else that does. Often times you will find older code that simply does not work with modern hardware or is not optimized for it for clarity's sake. Tutorials are a good place to learn but they also are quite limited in scope. Most tutorials are so hard-coded that actually integrating them into an engine is quite difficult.

    My recommendation to you for learning to program games in C++ is to first learn the language like the back of your hand. So buy books on C++, design patterns, anti-patterns (patterns that go against design but are common pitfalls), coding practices, etc, etc. These will help you immensely. And you are going to have to go far beyond "C++ for Dummies" to program games or anything useful in C++. I wouldn't even bother with a book like that. www.gamedev.net has excellent articles, reviews, and suggestions about books. They also link to the book on amazon so purchasing it is a snap. So go check out gamedev's articles and resources section as well as their book recommendations.

    Once you have a sufficient grasp of C++ I would then recommend buying books on graphics programming either in OpenGL or Direct3D. The choice is yours.

    Once you gain more experience in games and have moved far beyond what is readily available in books you will have to hunt for more books with more depth but perhaps less sales and thus less readers (which makes them hard to find). www.gamasutra.com is an excellent source for more advanced topics in games and many professional game programmers regularly post there and write articles for the site. It's not for the faint of heart since they do assume you have quite a bit of experience with game algorithms and graphics algorithms.

    As with any topic the more sources you use and research the more complete your understanding will be. One source is never going to tell you exactly how to do the specific task you want but you will find little nuggets here and there that you can incorporate into your final design. Fact is there isn't a book out there that tells you everything but across the spectrum of books available you can learn pretty much everything. I hope that makes sense.
    Last edited by VirtualAce; 01-16-2008 at 05:56 PM.

  5. #5
    Registered User
    Join Date
    Jan 2008
    Posts
    7
    Thanks everyone for replying;

    Regard;

    N4S.

  6. #6
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    i advice you to learn C++ for game programming. imho, OOP makes it much easier to program a game than C
    goodluck in your journey
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. basic question about global variables
    By radeberger in forum C++ Programming
    Replies: 0
    Last Post: 04-06-2009, 12:54 AM
  2. Help if basic question
    By Sshakey6791 in forum C++ Programming
    Replies: 9
    Last Post: 02-28-2009, 03:00 PM
  3. Basic question - press any key to continue
    By PedroTuga in forum C++ Programming
    Replies: 4
    Last Post: 05-19-2005, 10:38 PM
  4. another text game question
    By Unregistered in forum Game Programming
    Replies: 4
    Last Post: 03-09-2002, 10:02 PM
  5. Text Game Question
    By Unregistered in forum Game Programming
    Replies: 4
    Last Post: 03-08-2002, 03:55 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21