views:

776

answers:

11

Is it C++, C#, Java, C, OpenGL, ect. I want to do game programming but I don't really know what language to do it. I'm leaning toward C++.

+11  A: 

C++ is the one most widely used and supported for game programming, and generally best-performing.

Robert Harvey
Yea, throw in OpenGL (or maybe DirectX) if 3D is required
o.k.w
OpenGL is not a language, it's a library.
Ólafur Waage
Honestly the correct answer tbh. But, IIRC, Microsoft holds like contests for Xbox game making in C#? My friend mentioned something about this a while ago. But generally, I would do a game in C++, not a managed language. (Don't get me wrong, I'm a C# dev by hobby. :P)
Zack
Oh. Just read another answer. XNA/C# is what my friend was telling me!
Zack
+1  A: 
Aurélien Vallée
maybe you meant 'period'? :)
klez
English...... ;)
Aurélien Vallée
+2  A: 

For AAA-Titles C++ is still the way to go.

If you currently have no knowledge of programing AND game programing (as it seems to be) then it is likely better to choose some kind of game programing framework like XNA/C# or others and start there. You won't have much fun starting out with C++ AND game programing techniques.

OpenGL is no general purpose language. If you choose a game programing framework it will shield you from DirectX/OpenGL for some time.

Foxfire
+7  A: 

C++ is pretty much the gaming industry standard for game development, but there are many alternatives for the indie developer that you might find more developer-friendly. Here are some you can look at:

  • Python with Pygame (for mostly 2D games). The best thing about learning this combination is you will find many other uses for Python, so the time investment in learning this combo will be well worth it.
  • Unity 3D. Unity has released the basic version of their software for free. This is a fully-featured, all-in-one game development environment which uses Mono-based (.NET) scripting, so once again you can leverage prior knowledge in the .NET space and use any knowledge gained in other domains.
  • Unreal Development Kit (UDK). This one is relatively new (released for free on 5th November 2009) and uses the same technology as games like Gears of War and others that used the Unreal Engine. This one has its own scripting language called UnrealScript.
  • DarkBASIC / DarkBASIC Professional. This is also an integrated development environment for games, and uses its own BASIC dialect, which is quite user-friendly.

Hopefully you will find something suitable from this list, good luck.

Wayne Koorts
Python for game development ?
Yassir
You forgot XNA!
RCIX
There's also the Flash Game market... slightly known for use of Flash. Though whether or not its relevant depends on the OP's meaning for 'Games'
CoderTao
Python is great for game development. Of course, if you have some performance-critical code (like a physics engine), you will want to know C or C++. It's very easy to write extension modules.
ddaa
"Remember remember, the 5th of November..." (Just heard about the UDK and this was the first place I read about it's release 'date'...I'm sure it'll be remembered. :) the quote is just for fun.)
Zack
+2  A: 

I really want to say C# but almost all the great games in the market are written in C++

Yassir
That's more about the body of existing code in the hands of those who make the games than the suitability of the language though.
Kylotan
C# is a fantastic language, but isn't suited in its current form for console games. As most games in the market need to be portable across PC, PS3 and Xbox360, C# unfortunately doesn't cut it.
Matt G
+1  A: 

It depends what kind of game you want to make, and even what part of the game you want to work on. Many games have an engine written in one language, and then use a different language to fill in the details about gameplay, AI, etc. Examples would be C/C++ for the engine (of most commercial games), and Python for the AI (in Civ 4, I think) , or NWNScript for the gameplay (in NWN), etc.

For most games I would start with a higher-level language like Python; check out http://pygame.org. Harder stuff like C/C++ is really only of interest if you need extremely high performance or control over the machine. Or if you just happen to like working on those languages (as I do).

Edmund
A: 

Java?

While the industry is going for C/C++, you can always try other languages when in the process of learning.

Learn C/C++, but broaden your skills as a hobby game programmer and try out other languages to find the one that suits you for your own game.

Java is similar to C/C++. If you know C/C++, you may already know a lot of Java.

Secko
Java is nothing like C or C++.
Evan Fosmark
@EvanFosmark Check the syntax! Also, http://leepoint.net/notes-java/deployment/applications_and_applets/05intro/60JavaVsC.html
Secko
I agree, in the range of languages available to you, Java and C++ are 2 of the more similar ones. (However, that is exactly why I wouldn't recommend Java...)
Kylotan
I can't think of any major game that uses Java. It's a good all-around language and a good learning language, but it rarely makes it to gaming.
BobMcGee
Java must be one of the least used languages in game development, for good reason.
kotlinski
+1  A: 

Honestly, as mentioned above to some degree, it really depends on what you want to do. The Triple-A industry is pretty standard:

  • C++ is used for engine components and anything that needs to be performant
  • LUA/Python/C#/Or a proprietary scripting language are used for controlling world objects and abstracting away from the engine

There are also specific languages for graphics programming (shader languages) that would be beneficial to know if you're interested in pursuing a graphics programming career. However, it's worth noting that it's difficult to break-in as a graphics programmer.

Mobile development usually involves Java.

Indie development can range from C++, C#, Python, or any of the various other languages mentioned.

Basically, if you want to work on large projects like the next Call of Duty, aim for having solid C++ skills with an understanding of interpreted languages.

Of course, being able to program in a language isn't enough. You also need the math skills, an ability to work both individually and in a team, and experience (personal, professional).

Good luck!

A.A. Grapsas
+2  A: 

At the end of the day the platform you are targeting will define the language you want to use. If you want to make web games, use Flash/Flex (ActionScript), Silverlight (C#) or JavaScript. If you are making a game where performance is key, use C++. If your making a game for an iPhone, you'll use Objective-C.

If you are learning to write a program, and just using game development as a project to help you learn, pick the language you are already most familiar with. The truth is your first game will be a mess anyway, but regardless of what language you use it will be a good learning experience.

Phyxx
This is a good answer, I think. C++ is not as dominant in game development as it used to be, most game developers work with the web or iPhone these days.
kotlinski