Sign in to follow this  

Game Design: Which Programming Language First?

This topic is 3295 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to get into game design, but I'm not sure which programming language I should learn first. I'm going to use resources on the internet, but mostly I'll be teaching myself. I want to be able to design smaller games first and build a portfolio, and I eventually want to work on big multiplayer games. Which language should I learn first to get experience and prepare for more advanced projects?

Share this post


Link to post
Share on other sites
Game design or game programming? The two are actually quite different fields, though it's true that amateur programmers tend to do their own designs as well. If you're learning to program, you're doing game programming. If you're designing games, you're doing game design. If you're doing both, then I'd say it defaults to programming since a lot of your time will be spent on the programming aspect (though art asset creation can also be rather time-consuming...). Do you want to design games or do you want to program them?

Either way, if you're going to be programming, I'd recommend either C# or Java as a beginning language. I personally prefer C# over Java, but some Java people might be able to make a case that it's better for learning. :) Some people around here like Python as well, I haven't used it much so I can't really say. C++ is supposed to be the "industry standard", and you can get away with learning it first, but that's a trick route to go down and I don't recommend it.

Share this post


Link to post
Share on other sites
C# is a great high level starting point, and it'll get you familiar with a lot of basic programming techniques and concepts. Using C# with Visual Studio is extremely simple and fun, and you can have a Windows GUI app running in no time. Using XNA will also be fairly simple.

Learning C++ is very important if you want to get serious with your games. Java and C# will teach you the basics, but you won't learn much about things like pointers, which are very fundamental to more advanced (yet common) techniques. C++ is used in most "big" games for its control, speed, and power. If you are looking to get in the industry as a game programmer you will definitely need to learn C++.

Share this post


Link to post
Share on other sites
If you're looking for ease of use to get in there and start programming a game, I would actually recommend Python, especially if you have no programming experience whatsoever. I haven't tried it, by PyGame, the SDL binding for Python, seems extremely easy to set up and start programming. Also, because of Python's syntax, it'll be easy to pick up if you're entirely new. It's great if you wanna get in their and do stuff real quick.

I haven't touched Java in a while, but it's worth taking a look into. The syntax is alike to C++ which will be good for you if you plan on learning that later. You could go the route of C++, but my advice is to learn how to program in it first, learn to make games later if you do choose it.

Share this post


Link to post
Share on other sites
I would go with either Java or C#. Both have a c++ like syntax, and this is a welcome plus, I suppose. I prefer c# over java because it is simply the nicer language I have ever worked with, but java is nice also (and I prefer its windowing framework to WinForm).

That said, many say that python is a beatiful language: it is easy (perhaps easier than csharp or java if you don't have a c++ background) though I don't like it too much.

I can't think to any other language suited for game programming that has any advantage over those three.

Share this post


Link to post
Share on other sites
I started with Ansi C, and can't say I regret it..
I think it is a good starting point because:
1. it is very fast & easy to learn
2. You'll get a good look on what programming is like and then decide whether to continue or not without spending half a year learning a language.
3. It already includes pointers and introduces you more into memory allocation, so you'll better understand what goes on behind the scene.
4. As the others said, C++ is industry standard, and C++ builds up on C, so you can use most of the stuff you learned with C

I had The C Programming Language read in 2-3 weeks (best book for c btw) and continued with c++ then.

Share this post


Link to post
Share on other sites
Quote:
I want to get into game design


Mainly scripting languages and high level ones. Go for Python with Pygame. Then move up to C# or Java.

Now for game programming.

If you want to start game programming I suggest C# or Java, personally C#. Has more of a backing(M$) and has the XNA framework. Then move up to C++.


Edit: I also agree with or friend TTK-Bandit.(For game programming not design)


Good luck

Share this post


Link to post
Share on other sites
I'd recommend Flash or Python + Pygame, depending on how much programming you want to do up-front. I'm occasionally using Python for tools and prototyping, it's pretty easy to work with and quickly gives results, even for beginners.


Quote:
Original post by TTK-Bandit
1. it is very fast & easy to learn
2. You'll get a good look on what programming is like and then decide whether to continue or not without spending half a year learning a language.

Could be, though it takes some time to understand the finer points of the language. If learning C is very fast, then learning C#, Java, Python, etc. is lightning fast. Development with C takes longer, bytheway, and to really make the most of it, you'll have to know what you're doing. I don't think those aspects make it a good language for beginners, nor a good language for game-logic (which often needs to be tweaked a lot). I would also say that programming in Python is just as much programming as doing so in C, minus the manual (tedious) memory management.

Quote:
3. It already includes pointers and introduces you more into memory allocation, so you'll better understand what goes on behind the scene.

Good point, although I'd say this is also one of the things that confuses beginners the most. Having a garbage collector taking care of this for you not only simplifies many cases, but also helps you focus on the actual task at hand.

Quote:
4. As the others said, C++ is industry standard, and C++ builds up on C, so you can use most of the stuff you learned with C

Not really, no. You'll actually need to unlearn some C habits if you want to get to grips with C++. If you're going to use C++, then just go for C++, not C first. C++ is a different language with different idioms, not just a set of additions to C.


C has it's uses, but I think it's ill equipped as a beginners or rapid-development language.

Share this post


Link to post
Share on other sites
Quote:
Original post by TTK-Bandit
C++ builds up on C, so you can use most of the stuff you learned with C

Yes, you can, but it doesn't mean that you should. For example, idiomatic C code is full of pointers, while idiomatic C++ code almost never uses them. In C you need the preprocessor quite often, in C++ almost never.

You can learn C++ just fine without ever touching C - sadly, a lot of C programmers never learn real C++ but program in "C with classes".

Quote:
Original post by TTK-Bandit
The C Programming Language (best book for c btw)

How many C books do you know? Programming in C seems to be very popular.

Share this post


Link to post
Share on other sites
Quote:
Good point, although I'd say this is also one of the things that confuses beginners the most. Having a garbage collector taking care of this for you not only simplifies many cases, but also helps you focus on the actual task at hand.

Yeah, but having a garbage collector doing all the work for you makes you work more sloppy and less focused.

Quote:
Not really, no. You'll actually need to unlearn some C habits if you want to get to grips with C++. If you're going to use C++, then just go for C++, not C first. C++ is a different language with different idioms, not just a set of additions to C.

Well you shouldn't learn c and stay with it, you should move on to c++ once you got a grip on c. if you use it as starting point to get into programming, but then go further to c++, you don't develop any habits.

Quote:
How many C books do you know? Programming in C seems to be very popular.

Seems ? I can't speak for this book.. never read it.
I've read quite a few different books, not all completely, but to the point where the author showed that he had no good understanding of the language.
The book was my 3rd book and I came to read a few more in school and from other guys who tried learning c.. they where all miserable.
Besides, every other established c programmer I've talked to so far agreed with me when the discussion about good books came up.
Sure there might be a better one, noone can read all the books on earth..
who would buy another book if he had one that explained everything so good you didn't need any further instructions..

Share this post


Link to post
Share on other sites
Quote:
Original post by TTK-Bandit
Quote:
Good point, although I'd say this is also one of the things that confuses beginners the most. Having a garbage collector taking care of this for you not only simplifies many cases, but also helps you focus on the actual task at hand.

Yeah, but having a garbage collector doing all the work for you makes you work more sloppy and less focused.[...]
More sloppy with memory management and less focused on memory management. If your goal is writing a game, then a garbage collector allows you to focus more on writing a game and less on memory management, and thus you can be more focused on your goal.

Share this post


Link to post
Share on other sites
yeah, go to hell with performance and stability, the gameplay makes up for it..
That's why a lot of games today require more cpu & ram than it should for the visuals you get for it.
That is in fact developing bad habits..
But meh, we're getting offtopic here.. Topic author has got to find out what way to take.
we can't decide for him.

Share this post


Link to post
Share on other sites
Surprisingly, I would point to javascript as an interesting alternative for first-timers:
  • You already have an interpreter on your computer (your web browser).
  • Firebug (a Firefox plugin) is an excellent debugging environment.
  • You don't need complex install/setup/link steps for getting a graphics library on your computer.
  • The language is sturdy enough that you can ignore 50% of programming difficulties (memory, scope, explicit types) until you're ready to handle them.
  • When you're done playing with javascript (say, after one or two months of learning), you can move on to C++, C# or ActionScript (all three are reasonably close languages in terms of syntax and general semantics) based on what your initial feeling was about the language.


While we're at it, I wrote this small game programming tutorial in javascript the other day.

I tend to consider C an interesting language to start general programming in. Not because it teaches you anything unique (all of the concepts, including manual memory management, are equally taught by many other programming languages that would be more adapted to learning how to program games, such as Python+PyGame), but rather because it defines a small set of semantic actions that are fairly consistent with each other, restrictive enough to avoid the "Too Much Freedom" one encounters with Lisp yet providing elementary functionality for getting elementary things done. I still consider C as the best language for learning array manipulation (although it's of course utterly useless for learning anything of a higher level than that).

Share this post


Link to post
Share on other sites
Quote:
Original post by TTK-Bandit
yeah, go to hell with performance and stability[...]
If, by stability, you mean robustness to errors, my experience is that less complicated code is more stable, and that higher level languages generally result in less complicated code because the framework handles details so you don't have to.

As far as performance, I think more people would produce reasonably performant games if fewer people worried about performance. Time spent prematurely optimizing is time not spent on game development.

Share this post


Link to post
Share on other sites

This topic is 3295 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this