What Programming Language Should I Start With for Game Development?

  • Thread starter Tyler1366
  • Start date
In summary: I don't remember... to get it running? But that's not strictly necessary, you could always just use a web browser to run the code. I'm currently looking into:C++C#Visual BasicC++ is the most popular language for game programming. It's versatile and has a lot of libraries to help you with graphics and input/output. C# is a newer language that is becoming more popular, and is designed to be more user-friendly. Visual Basic is a visual programming language that is popular for Windows programs.
  • #1
Tyler1366
2
0
So I've been looking for some guidance the past few days. I want to learn to program different things. Mainly games, or some kind of windows program. The thing is i have no idea where to begin, what program is best to start with and then eventually id learn a few.

I plan to self learn a lot then take courses if need be to back it up. As of right now this will be more of a hobby then a career path.

This forum seems to be pretty helpful and i was curious if someone could help point me in the right direction.

I'm currently looking into:
C
C++
C#
Visual Basic

I know of these ones, and that they are mainly used, but i don't know in detail what each one is actually used for. I have learned HTML and other simple stuff, I've scratched the surface of C++ a bit, but how does C++ make a game? where does the change from Command prompt output to windows/game output happen? The command prompt output such as the "Hello World" is part of the learning, but I'm just curious how it turns out later on.

So to sum this all up, I'm just looking for a step in the right direction. Thanks for any help and sorry if this has been stated somewhere before, i couldn't think of what to search to find the answers i wanted.
 
Technology news on Phys.org
  • #2
Tyler1366 said:
So I've been looking for some guidance the past few days. I want to learn to program different things. Mainly games, or some kind of windows program.

Just as a point here-- the firms that produce video games typically require VERY adept, VERY ambitious programmers. From my understanding, game programmers work nights and weekends a lot, and are generally pretty dedicated. One person's interview with a game programming company consisted of being handed a C++ engine, and having to do something specific with it over the course of a weekend. He couldn't even get it to run as-is (with help from several people), as there was little documentation. It was a test to see how tenacious you were and how good you were at fiddling around with advanced programming libraries.

Tyler1366 said:
The thing is i have no idea where to begin, what program is best to start with and then eventually id learn a few.

I'd guess C++ or Java. I don't actually know, but I expect that most PC-based games are probably written in C/C++ since it's got really good speed, and speed is VERY important for game programming.

But that doesn't necessarily apply to smaller games like Flash games which are typically designed more to be flexible and lightweight, rather than high-performance.

Tyler1366 said:
I have learned HTML and other simple stuff,

If you want something that's lightweight, there's always JavaScript (which basically has NOTHING to do with Java other than the name). I wrote a silly RPG in JavaScript, and if you know HTML, it's pretty much instant-gratification, since you can write a basic-ish interface using HTML, then use JavaScript to make the guts.

Syntax-wise, JavaScript is very similar to Java and Perl-- it's just easily tied into the DOM, so the learning curve is ... probably a lot lower.

Tyler1366 said:
I've scratched the surface of C++ a bit, but how does C++ make a game? where does the change from Command prompt output to windows/game output happen? The command prompt output such as the "Hello World" is part of the learning, but I'm just curious how it turns out later on.

Graphics packages. There are libraries you use to provide input/output to your user. Some of those libraries are really advanced, and some are more basic. But things like the "cout" command are effectively similar-- "cout" pushes output to the standard text interface, and it uses a library to do that, even though it seems like the most basic function imaginable. To push output in the form of graphics, you need a different set of libraries, some of which are very complex to use.

Tyler1366 said:
So to sum this all up, I'm just looking for a step in the right direction. Thanks for any help and sorry if this has been stated somewhere before, i couldn't think of what to search to find the answers i wanted.

Give yourself some small challenges. Something you can show off to your friends as a silly game, or something otherwise "neat". For instance, I made a fractal landscape generator that produced a single PNG image. Something bite-sized so you don't end up getting intimidated by the swath of coding, or (more likely) just never get it to a working state because it's too big to finish.

The language you choose doesn't matter THAT much. Java's free at least, as are JavaScript, Perl, and others. C++ I think you need a development kit (unless you're under Linux), and the same for Flash. PHP is technically free, although you need a webserver to actually RUN anything, which typically means getting an ISP (or again, if you've got a Linux server, you're all set).

Anyway, programming is more about learning HOW to think and how to approach problems, and is less about the particular language you're using.

DaveE
 
  • #3
C++ isn't much of an advantage or that much different from C unless you're using some C++ specific library or template package. In a video game writing evironment, you'd end up working on some small piece of code as part of a large team. Some video game programmers are more artists than programmers, simply using 3d tools to render landscapes or gaming objects. Only a small percentage of the team is involved in creating code for the physics of a video game.
 
  • #4
Wow, thanks a lot for the tips and info! I'm not sure if this is weird, but i have been playing around with C++ like i said, but the other day i looked at Python, did i ever get lost. I'm told its suppose to be easier then C++ but i find i understand C++ way more on how its used.

I was doing some reading, curious if i should learn C before C++ and at what point does C# come into play?
 
  • #5
Tyler1366 said:
Wow, thanks a lot for the tips and info! I'm not sure if this is weird, but i have been playing around with C++ like i said, but the other day i looked at Python, did i ever get lost. I'm told its suppose to be easier then C++ but i find i understand C++ way more on how its used.

Python is significantly easier - both to use and understand - than C++. As has been said on here many times, if you're interested in learning how to program, you'll progress far more quickly by first learning how to use an interpreted language like Python than by jumping straight into C++.

Get yourself a decent book on Python (or start by reading this) and take a year to learn it. Once you're comfortable with the language, attempt to write some simple games in Python; card games, simple board games and so on. Then turn to C++.

To follow this route and become a reasonably competent programmer will, realistically, take you at least a couple of years. Don't rush it.

Tyler1366 said:
I was doing some reading, curious if i should learn C before C++ and at what point does C# come into play?

No, you don't (and almost certainly shouldn't) learn C before C++. See Bjarne Stroustrup's http://www2.research.att.com/~bs/bs_faq.html.

As to C#, if you're interested in becoming a games programmer, you probably won't need to learn it at all unless you're committed to writing for the Xbox; even then, you'll only need to use it if you're using the XNA framework.
 
  • #6
shoehorn said:
Python is significantly easier - both to use and understand - than C++. As has been said on here many times, if you're interested in learning how to program, you'll progress far more quickly by first learning how to use an interpreted language like Python than by jumping straight into C++.

I dunno-- I felt learning C gave me a better understanding of "how things worked" in programming that interpreted languages like Perl, Python, and JavaScript don't offer so much. In particular, I have a hunch that I would find typecasting IMMENSELY tedious had I started with a language where it wasn't necessary.

However, that said, interpreted languages ARE much easier to think about and deal with. They're typically much more robust (though slower), and are better at "doing what I mean" than "doing what I say".

shoehorn said:
No, you don't (and almost certainly shouldn't) learn C before C++. See Bjarne Stroustrup's http://www2.research.att.com/~bs/bs_faq.html.

I must have missed it-- where does it say anything about not learning C before C++? I'm not sure I would recommend one or the other first, unless you had an intention to program in both; in which case I probably WOULD recommend learning C prior to learning C++.

DaveE
 
  • #7
davee123 said:
I dunno-- I felt learning C gave me a better understanding of "how things worked" in programming that interpreted languages like Perl, Python, and JavaScript don't offer so much. In particular, I have a hunch that I would find typecasting IMMENSELY tedious had I started with a language where it wasn't necessary.

However, that said, interpreted languages ARE much easier to think about and deal with. They're typically much more robust (though slower), and are better at "doing what I mean" than "doing what I say".

One of the principal reasons I suggest Python as being more appropriate as a first language than C++ is the Python standard library; it really is very, very good, and it's quite straightforward to write even non-trivial and rather sophisticated code with it relatively quickly. (See, for example, the Dive into Python link I pointed to earlier.)

On the other hand, the C++ STL is, in my opinion, considerably more difficult to learn. Sure, you can pick up the basics of STL containers in an afternoon, but learning how to use them effectively is going to take a long time. And that ignores the fact that it's difficult to call oneself competent at C++ without a good understanding of the STL and Boost.



davee123 said:
I must have missed it-- where does it say anything about not learning C before C++?

Stroustrup touches on why learning C first is not an optimal approach here; he goes into considerably greater detail here, where he says:

Bjarne Stroustrup said:
The C-first approach leads to an early focus on low-level details. It also obscures programming style and design issues by forces the student to face many technical difficulties to express anything interesting... C++’s better support of libraries, better notational support, and better type checking are decisive against a ‘‘C first’’ approach.
 
  • #8
The language you should choose depends on what you are planning to do.
If you want to quickly be able to make an application that would, say, work with databases, you should try C#.

I would tell you to avoid Visual Basic (especially version 6 and older). VB6 is outdated, not
supported anymore and will give you a lot of bad habits. New version look so similar to C#
(as it's the same Framework) that you should better directly use C#.

If you plan to make games for fun or to work in the industry, definitely C++.
It's been said above that they work nights and weekend. This is not totally true.
It depends on the company and the country. Video games studio require people who love
what they are doing and who are ready to do their best to get a good game.

I work in a medium french video games studio. Our teams are composed from 5 to 20 people,
depending on the game and we work from 9am to 6pm.

Now about how to get from the command prompt to a 3D game, we use several API.
Simply put:
- Win32 API: it's a set of commands which allow you to create a windows (and more)
- DirectX: a set of interfaces to control the graphic hardware
(both of them are used with C++)

Now, when we make a game, we use a lot of routines that have been written over
and over. Instead of writing these routines for each new game, we use a game framework
or engine (Renderware, Havok, Gamebryo, ...) so we can concentrate on the gameplay.

So to conclude, if you want to make games (of even physics-based applications), use C++
for it's speed and performance. If you want to make any other kind of application, you
should consider C#.

I don't know if it answers your question, but that's my advices. I haven't used Python
nor other high-level languages a lot.
 
  • #9
Computer science programs tend to require students to learn at least 2 types of language--one of which will be low level C which does require the programmer to know all about the internal computer architecture and how the operating system and compilers are allocating and arranging memory. This low level programming experience is necessary if, someday, you want to be able to make programs run efficiently.

Then, students always have to learn an object-oriented language, which in U S high schools is mandated to be Java--but it could just as well be C# which is very similar. Python, though popular, is not as good a choice to learn on because of its loose typing, although people tend to like it more because it requires less discipline--but remember, less discipline does increase the chances that the programs you write will eventually fail in some strange unexpected way.

Case in point--my husband programmed for years in Visual Basic, which has loose typing. One day, eventually, the compiler made the wrong choice and one of his integers started overflowing, and the program began failing in the weirdest way. When he finally discovered what had happened--the fix was explicitly to instruct the compiler to use a wider integer type--he was shocked and felt almost angry or betrayed. No one had ever warned him what the risks were of using "variants" (loosely typed variables, where the compiler guesses what type they should be).

Loosely typed languages are really fast for quick prototyping and learning can be facilitated by them. But if you want to know what is really going on, first learn C (not C++, it is too big and messy), and then learn a strongly typed language (Java or C#) which has lots of "type safety" (the opposite of C). C let's you hang yourself, Java refuses to let you hang yourself.

After those 2, most any other languages will come easy.
 

Related to What Programming Language Should I Start With for Game Development?

What is programming?

Programming is the process of creating instructions for a computer to perform specific tasks or operations. These instructions are written in a specific programming language and are used to develop software, websites, and other technological applications.

What are the most commonly used programming languages?

The most commonly used programming languages include Java, Python, C++, JavaScript, and PHP. However, the popularity of programming languages can vary depending on the specific industry and application.

How can I learn programming?

There are many resources available to learn programming, including online tutorials, books, and courses. It is important to choose a programming language and then find a learning resource that suits your learning style. Practice and experimentation are also crucial in learning programming.

What are some important skills for a programmer?

Some important skills for a programmer include problem-solving, attention to detail, logical thinking, and creativity. It is also important to have a good understanding of algorithms, data structures, and debugging techniques.

What are some common challenges faced by new programmers?

Some common challenges faced by new programmers include understanding complex concepts and syntax, debugging errors, and managing and organizing large amounts of code. It is also common for new programmers to struggle with finding the most efficient and effective solution to a problem.

Similar threads

  • Programming and Computer Science
4
Replies
107
Views
6K
  • Programming and Computer Science
Replies
16
Views
3K
  • Programming and Computer Science
12
Replies
397
Views
15K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
1
Views
830
  • Programming and Computer Science
2
Replies
58
Views
3K
  • Programming and Computer Science
Replies
15
Views
2K
  • Programming and Computer Science
2
Replies
54
Views
4K
  • Programming and Computer Science
2
Replies
56
Views
8K
Back
Top