Help for a beginner

This is a discussion on Help for a beginner within the Game Programming forums, part of the General Programming Boards category; Hello! I am very interested in Programming, and Game Programming in particular, but everything seem so overwhelming right now.... (Keep ...

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    1

    Help for a beginner

    Hello! I am very interested in Programming, and Game Programming in particular, but everything seem so overwhelming right now.... (Keep in mind, I am 15 years old). The biggest problem I seem to have is understanding some general concepts, because a lot of the explanations of them are not exactly beginner friendly, and I usually need to learn by having things explained very specifically for me.

    From what I can tell, to program a game, you need to know a programming language, and also how to use something called an API, as well as a compiler. (Correct me if I'm wrong)

    I have already learned the basics of C++, but I guess I would be willing to switch to C# if that is really a better choice. I think I pretty much have the idea of a compiler understood pretty well too.

    Apparently, the API thing is very vital for making something like games. I have heard of OpenGL, DirectX and SFML for C++ and XNA for C#. I just have a problem with understanding what exactly these are supposed to do.

    If I'm correct, when using something like Open GL or SFML, pictures have to be drawn using coordinates. Excuse me if this sounds extremely noobish, but is there any better way to do this? Maybe something like flash, where you can actually draw things on the screen?

    I know I sound pretty stupid, but I really do want to learn this properly, especially with the last question, i don't want to spend years using the coordinate method, and then find out there was an extremely simple flash-like method out there all along.

    So, to summarize
    1. Should I use C# or C++ ?
    2. What exactly are APIs?
    3. What exactly is OpenGL, DirectX, SFML and XNA?
    4. Which would be the best for a beginner to use to make games?
    5. How exactly do the APIs work (With coordinates, or is there an easier way?)
    6. What are good tutorials for learning the language and/or the API you have previously recommended?

    Thank you for politely listening to my rant about how stupid I am, and hopefully you guys can/are welling to help me!

  2. #2
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,866
    1. This is a matter of opinion, look through this forum and you will find many discussions of this.
    2. API = Application Programming Interface: Basically the interface you are going to use to work with the OS, and graphical libraries, ect.
    3. These are all frameworks (engines) that handle your visual rendering/input device management/sound management ect. A quick google search will give you all the information you want and more.
    4. Refer to question 1. This is a matter of personal tast and you will get many opinions on this one.
    5. Now that we discussed what an API is, you realize this question doesn't mean anything.
    6. Take a look at the game programming links at the top of this page, they have a lot of good resources there. As for tutorials for a language, we have some at our site, however until you pick a language it is going to be impossible to answer this.
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  3. #3
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,625
    1) Have to admit that C# is better for making a game, since it supports many things C++ doesn't. But I'd still choose C++!
    2) Application Programming Interface
    3) OpenGL is a famous Graphics Library, SFML stands for Simple and Fast Multimedia Library,
    "XNA" is a brand for the game-related technologies of Microsoft. This includes DirectX, XNA Game Studio, and the XNA Framework.

    DirectX, as you know, is a C++ library for graphics programming.

    The XNA Framework is a set of .NET libraries that are, in a very simple way, built on top of parts of DirectX with some other goodies tossed in.

    XNA Game Studio is the set of Visual Studio plugins, the content pipeline, and the deployment features used with the XNA Framework. XNA Game Studio is the tool you are using when making an XNA Framework game in Visual Studio and sending it over to your Xbox.
    4) Game Maker, really. When you're not a beginner anymore, then start playing around with actual code.
    5) Not sure what you're asking
    6) Everything you can get your hand on!

    Phew, I'm done!
    Devoted my life to programming...

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    In the C++ world, 3D APIs for games are mostly just DirectX and OpenGL (and some variations which add more features, e.g. Ogre is a good extension to OpenGL, but these are the basic two). DirectX is sometimes seen as having better performance, but it's a Microsoft product and hence if you use it your program is limited to running on Windows. (Well, that and under wine. ) OpenGL is more or less the same in terms of features but it's cross-platform, with Windows and Linux and Mac support.

    That's 3D APIs. There are a huge number of 2D ones, and I can only suggest the one I am most familiar with: the SDL. If you want to use C++ and are willing to get started with 2D games at first instead of jumping right into 3D (both very reasonable sentiments), then I would recommend the SDL. It supports 2D graphics, has comprehensive mouse/keyboard/joystick support, and one very big advantage: it's easy to start using OpenGL from the SDL, once you want to work in 3D. So as you learn the SDL and how its input handling works, you're making a great basis for when you want to work on 3D graphics. It's quite pleasant to be on the verge of using OpenGL and realizing that all you have to learn is the graphics, the rest of the program is just going to be using the SDL framework you're already familiar with . . . . Anyway, that's just been my experience.

    However, the SDL is a C library at heart. So you can use it from C++ with no issues, but there are libraries out there which are designed for C++ (SGE comes to mind) and which may be a better choice. I don't know any of them, so I can't comment on this.

    The SDL is fortunately quite widely used... and there are lots of tutorials. One place to start would be Lazy Foo's SDL tutorials (google it), but don't limit yourself to just one. There are a lot of good resources out there. Grab Dev-C++ as a simple development environment if you don't already have one, download the SDL (http://www.libsdl.org/release/SDL-de...mingw32.tar.gz), write a hello world program from a tutorial and you're off. Just one of many possible pieces of advice that you could follow.

    [edit] Forgot to mention: the SDL is very much so cross-platform. The website lists 13 supported platforms an another 8 unofficially supported. As you can probably tell I prefer libraries that are cross-platform; I don't see any reason to limit yourself when you don't have to. [/edit]
    Last edited by dwks; 09-19-2011 at 11:42 AM.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    1,208
    One note: Dev-C++ is a very aging IDE that hasn't seen any development for a long long time. I'd suggest Code::Blocks or Visual Studio 2010 Express which are both up to date and free.

  6. #6
    Registered User Jacob Cannon's Avatar
    Join Date
    Oct 2011
    Posts
    4
    Well with reference to the programming language choice C++ would most likely be your best bet, and using the Allegro game programming library, it takes out a big chunk of all the work you would other wise have to do

  7. #7
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    I have already learned the basics of C++, but I guess I would be willing to switch to C# if that is really a better choice. I think I pretty much have the idea of a compiler understood pretty well too.
    You do not need any graphics right now since you are just starting C++. My advice would be to make a simple board game or adventure game with a parser. This will help you design classes and the overall system and will give you good experience as opposed to fussing about with this or that API.

    Before you choose a language choose a game to make. Then you can determine based on the requirements of your game which language you want to use. You could easily make a simple text-based game in C# with the tons of GUI functionality that C# offers. You would still need to make the parser, design the map system, rooms, items, inventory system, npcs, quests, etc. The list goes on and on. If you choose C# you can get up and running quite quickly since the GUI is a snap. One could argue that MFC is almost just as simple since you won't be needing any advanced controls like splitters, etc. that C# makes so easy to use and MFC obfuscates so well.

    So go design your game and figure out what it is you want to create. What is the goal and when is the game 'done'? You don't have to figure out everything right now but you need to do a little bit of planning before writing one line of code regardless of your language choice.

    I concur that if you are a Windows-based system and you do not care about portability then you should definitely use either MSVS 2008 Express or MSVS 2010 Express. No other free compilers come close to what these two offer. They are not perfect but they are very good.
    Last edited by VirtualAce; 10-04-2011 at 09:16 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner help
    By flyguy10269 in forum C++ Programming
    Replies: 7
    Last Post: 08-28-2010, 03:17 PM
  2. C++ Beginner
    By Ronzel in forum C++ Programming
    Replies: 2
    Last Post: 06-04-2009, 03:06 AM
  3. Beginner-need help
    By new-b in forum C Programming
    Replies: 10
    Last Post: 06-04-2009, 12:36 AM
  4. Windows programming for beginner (Absolute beginner)
    By WDT in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2004, 10:21 AM
  5. beginner ?
    By braincrash in forum C Programming
    Replies: 2
    Last Post: 02-18-2003, 02:33 AM

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