Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Looking to make my first basic game (maybe some platformer) but haven't got across the "which language" barrier yet and hoping to get a few tips.

I have basic knowledge of C++ and classes and can pass by with PHP. Did a tad bit with Java but not much past basic stuff that's shared in C and made a few goodies in Visual Basic, but nothing special.

Based on what I know, I felt C++ would be my ideal choice to write a game in since I have the most experience with it and can learn the rest of the language as I go. But every site I've read on this topic say "DO NOT USE C++" because of the complexity of the language. I've read that Python is a good language to use for games and it's similarity with PHP would help me start off. Never made anything in Python before and was wondering if the effort would be worth it.

Based on this, what tips would you give me?

Thanks for any help, I'll appreciate it!

share|improve this question

closed as not constructive by bummzack, jhocking, Tetrad Jan 3 '12 at 14:55

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

This kind of question is always largely a matter of taste, but what it boils down to is, use whatever you feel most comfortable with. Anything can be used to make a game. – Jari Komppa Jan 3 '12 at 9:42
There have been a lot of questions regarding the language (here, there, or this, that, etc.). – bummzack Jan 3 '12 at 9:56
@bummzack I realize that and have read many articles on the subject as well. I asked the question because it was specific to me and wanted a customized answer. Sorry if this is "abusing" the system. – Kevin Duke Jan 3 '12 at 10:12
Initially I was just going to vote to close this as a duplicate. However after seeing your response to bummzack I am downvoting this. You knew this was a duplicate but you still posted it anyway? – jhocking Jan 3 '12 at 13:41
@bummzack I only meant it light-heartedly, no offence meant! – SirYakalot Jan 3 '12 at 15:03
up vote 4 down vote accepted

It all depends on your aims and skills.

I would argue that the language is not the major choice... The engine/framework is. You can write your own (largest game companies do just that). There are many already available.

But keep in mind that very few major games are not written at least partly in C/C++ or similar. The company I worked for was doing AAA titles for console PC and mobile (and on occasions for Mac).

I can attest that C and C++ are prominently used. Even for Microsoft's platforms where the common mortals have access only to higher level APIs large companies are given access to C/C++ APIs.

Although not everything is necessarily written in C/C++. Some platform specific functions are only available from another language, so some of that is always present. LUA is used a lot (as a script language), Python ends up being used in the pipeline and to a lesser extent in games (I haven't personally encountered such code but I heard they had python scripts in some games).

So the choice is yours. Do you feel you want to invest in learning a major language (Although not the nicest or cleanest to use)? Or do you want to start making games quickly?

  • If you are OK doing memory management and being careful with your code go with C++
  • If you want to leave some of the memory management and keep most of the portability of the language, go with C++ and smart pointers. Remember to make good use of STL and BOOST.
  • If you want to get a game or two on one major platform choose the platform you think is the best for you and you will probably find tools and resources to guide you.
  • If you simply want to make a game for fun and maybe release it at some point in time chose a language you are comfy with, find the libraries and engines that will help you with the low level stuff and go for it.
  • If you want a fast way to develop games without too much programming there are many game engines and game kits available.

Wherever you use C, C++, C#, Java or Python... you will have a lot of to do if you don't use any game engine, framework or libraries. Therefore you could have a look at Ogre, SlimDX, Unity...

Whatever you choose remember to use a source control system for your code... I have never benefited from a tool more than from that. I would recommend GIT as you don't need to setup a server but you can if you need to do so later down the road. Take the time to properly setup a branching strategy or integrate the branching model from nvie.

Also remember about licensing. If your game is ever to be released you should be careful about the libraries you chose to use. Sometimes it's better to use commercial libs sometimes not.

Edit: Someone said: "There are only two kinds of programming languages: those people always bitch about and those nobody uses."

share|improve this answer

I would recommend C# and the XNA framework. The language is very similar to C++ but far simpler to use and a good place to start learning, also it's similar to Java which you say you've used.

Even if you haven't, I'd actually recommend C# as one of the best first languages to learn because of its simplicity, automatic garbage collection and tendancy to call in-built functions very self explanatory things.

XNA is a game framework that could be described as 'beginners DirectX' and is a good introduction to the ideas such as the update and draw cycles that are common to almost all games.

C# and XNA go hand in hand.

There are good tutorials here:

share|improve this answer
I don't really have any Java experience besides basic C syntax like stuff. But I'm loving the tutorials so far, might be easy to learn if I just follow those – Kevin Duke Jan 3 '12 at 10:09
some quick questions about xna: Can I make cross-platform programs? Does the license allow me to freely distribute my work? Does it run in a virtual machine? – Kevin Duke Jan 3 '12 at 10:18
XNA by itself runs on Windows, Windows Phone 7 and the XBox360. Using MonoGame or ExEn you can port your game to most other platforms too. There's also this currently in development to similar effect. – David Gouveia Jan 3 '12 at 10:49
Another plus is that there is an extensive education catalog available. Certainly helps when starting out. There's even one sample there for a platformer. – David Gouveia Jan 3 '12 at 11:03
there are also many community sites, and in general more accessible resources for XNA than anything else. – SirYakalot Jan 3 '12 at 13:03

If you have only a basic knowledge of C++, I don't think that's going to be enough to (easily) develop something like a platformer. Python is an easy to learn language so it's not a bad choice at all.

If you pick C++ I recommend you use SFML for graphics and sound, and either Box2D or Chipmunk for physics, if you want such a thing. If you do pick Python have a look at Pygame (graphics) and Pymunk (physics).

But developing a platformer isn't exactly easy; you might want to start with something easier, like an adventure game (where you only click around the screen and you don't have to worry about complex character interactions).

share|improve this answer

I agree mostly with Asher, XNA is ... was a good language to learn on and C# is very intuitive and far easier to work with than C++. C# and Java are incredibly similar, so you'll feel something familiar there. What you know in C++ can be applied to C#, you just have to forget about all the annoying and confusing stuff :) But if you are going to learn a framework, just start learning SlimDX, I've recently given up on XNA because well... it's based upon DX9, an aging framework, and it looks like XNA has reached the end of the road. It cannot run DX10/11 under the hood, and that's what you want to be using. That is current technology. Using SlimDX is incredibly similar to using XNA but it is far more powerful and you know you are learning current technology.

share|improve this answer
Then you might as well give up on SlimDX and start using SharpDX just because it's supposedly faster and is ready for DirectX 11.1 and Windows 8. – David Gouveia Jan 3 '12 at 10:43
That is to say, XNA is still relevant, and a great starting place for any beginner. It's a framework designed specifically for games which takes care of many things that might be difficult to implement yourself when starting out. And it's not likely he'll be needing DX10/11 features anytime soon given he's just starting anyway. – David Gouveia Jan 3 '12 at 10:55
IS XNA reaching the end of it's road? Is a 5.0 even being developed? – FrenchyNZ Jan 3 '12 at 11:14

I know your asking about language, but I would really have to say that it doesn't matter. Unless you really know your going to be hitting some performance barrier, need a certain level of portability, or really know what your doing.

If you want to learn how to make games, then I would recommend this book, it will have you up and running in no time what so ever. Beginning Game Development with Python and Pygame

However, if you want to combine this learning with sharpening your c++ skills, then maybe that would make a decent choice. It depends what you want to learn. How to make a game, or how to make a game in a certain language.

You really shouldn't find python any more effort to learn than any other language. And it's not like your switching to functional programming or anything, it's all the same. Just not as much memory management.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.