Recommended Posts

I'm a senior in high school and I'm going to major in CS in college next year. I was going to just wait until college to start learning, but a few days ago I had a sudden desire to make my own game. I was determined to make the next Elder Scrolls within a few months time, until I realized just how much goes into game development. From what I've heard, C++ is the most common language for games, and I've downloaded a book and watched a few online tutorials on programming in C++.

My question is, how should I go about learning C++, and eventually game development (using Visual C++ with Directx, etc.) THOROUGHLY. I've seen all these "learn C++ in 24 hours!" sites, and that's not what I'm after. I want to get a solid foundation in programming/game development, and I understand that it will likely take me years to design complex games. So... where do I begin?

0

Share this post

Link to post

Share on other sites

Well, as many will tell you, you want to learn how to program, and you want to learn the think behind programming. So as a beginner, you'll want to start with a language that helps you with this. And since object-oriented programming and the use of classes is the way to go with programming, these are concepts you'll want to grasp as soon as possible. So C++ is not recommended for learning. I would go with Java, unless you really prefer C++ (as I personally do, and went with C++ despite knowing that Java would've been the better choice).

The best way to learn how to program is to just pick up a good book and read things carefully, do the exercises, make sure you understand a part well before you move on and experiment a lot on your own. I cannot stress this enough: EXPERIMENT. And study your own code, and experiment more, and try to see what your code is actually doing. So that's where you'll want to begin. Try out a few languages and pick whichever you seem to dig the most (I learned about basic statements and loops with both Java and C++ before I decided to go with C++) and pick up an appropriate book. Then get to work. Programming is very hands on, so expect many hours coding. Problem solving is going to be a huge part of your time spent programming. I think it's fun. It can be very frustrating, but it is also very rewarding.

Unless I am mistaken, C++ is inofficially considered a standard, but languages like Java, C# and Python aren't far behind.

0

Share this post

Link to post

Share on other sites

Original post by Stevenx514I'm a senior in high school and I'm going to major in CS in college next year. I was going to just wait until college to start learning, but a few days ago I had a sudden desire to make my own game. I was determined to make the next Elder Scrolls within a few months time, until I realized just how much goes into game development. From what I've heard, C++ is the most common language for games, and I've downloaded a book and watched a few online tutorials on programming in C++.

C++ is in fact the most common language for games. It's fairly fast, ties back with C (it's predecessor), and is a great general purpose language all-in-all I think (but it has some strong opposition too. It's not the perfect language by any means). However, the reason why it has such wide use is similar to the reason why people stick with imperial measurements in the U.S. It's because of the C ancestry. A lot of things have been written for C and since C++ can be integrated with it, it doesn't take much to incorporate the language into the dominant C. For a beginner, however, this doesn't really make a difference. Other languages are just as capable, and it's fairly easy to switch between different languages.

Quote:

Original post by Stevenx514My question is, how should I go about learning C++, and eventually game development (using Visual C++ with Directx, etc.) THOROUGHLY. I've seen all these "learn C++ in 24 hours!" sites, and that's not what I'm after. I want to get a solid foundation in programming/game development, and I understand that it will likely take me years to design complex games. So... where do I begin?

The reality of the matter is, experience is the key. Concepts of a language are fairly simple in and of themselves (not to imply that their "behind-the-scenes" workings are simple, but rather their use). However, there are certain quirks that really can't be taught from a book. What you must do to become a good programmer is to just... program. Learn your basics, get used to them, and get going. When you progress through learning a programming language, make sure you understand what you're doing before moving on to the next concept. If your basics are shaky, you can't expect to understand the higher concepts.

Best languages in general to start with are C# (best language for a beginner. You can get started making GUI programs a lot faster than other languages), Java (I recommend this one personally, but it's not as nice as C#. C# can get you going really fast, whereas Java has some quirks of it's own), Python (I personally don't like this language, but some people on the forums recommend it so there you have it XD), and such. The three I listed are interpreted languages, which means they are "read" by a program which executes the commands. They are still great languages and the game making process is very much similar (if not the same) as C++ or others. Once you have a good background with these languages, you can move on to other languages; however, since you're taking a CS program for a degree in college, you'll probably get started with C++ in college, so you can use Java or w.e until then.

Quote:

Original post by MetallonAnd since object-oriented programming and the use of classes is the way to go with programming, these are concepts you'll want to grasp as soon as possible. So C++ is not recommended for learning.

Share this post

Link to post

Share on other sites

My question is, how should I go about learning C++, and eventually game development (using Visual C++ with Directx, etc.) THOROUGHLY.

First off, I second Metallon's suggestion to avoid C++ like the plague as a first language. I'd recommend C# over Java, however. Java is a good language, and very similar to C#, but it does several things (such as forcing all code to be in a class) that can be very confusing to a beginner.

As for a battle plan of how to learn, I would recommend going to #bookstore_of_choice# and buying a good book on either Java or C#. Try to get one with some game based examples to help keep your interest up. And then work your way through it. Start at the beginning and do every exercise, every program. By the time you're done, you should have a decent enough grasp of the language programming constructs to start hacking away at some games.

And then this is the hard part: make games. Experience is the greatest teacher for game development. Even if you aren't really sure what to do, come up with a goal and stick with it until it is done. I recommend starting really, really small at first. Do something text based. Make a tic-tac-toe game, etc. Then once you've made a few super simple games, try something a little harder with some graphical elements. Make a maze game. A snake clone. Pong. And then move up from there again.

Good luck!

0

Share this post

Link to post

Share on other sites

I might give C# a shot, I've only been working with C++ for a few days so it's no bid deal. I've gotten to the point where I can comfortably display text, declare variables, and create loops, but I'm having trouble seeing how all this can eventually become an animated game. I know this is looking far ahead, but I want to have a basic understanding of how you use the code to display graphics. All I can imagine making at the moment is a text-based rpg, which might not be such a bad idea :P

0

Share this post

Link to post

Share on other sites

Programming, no matter the language, is actually pretty easy once you can get the syntax down. A lot of CS undergrad courses, or at least those that I have taken myself, tend to go more into theoretical topics such as automata theory, algorithms, and/or software engineering methodologies.

My suggestion for you is to make sure you have a clear understanding of basic calculus and discrete mathematics, as these maths are typically involved in sophomore - senior level courses.

Share this post

Link to post

Share on other sites

Original post by Stevenx514All I can imagine making at the moment is a text-based rpg, which might not be such a bad idea :P

THAT is an excellent idea. As if you do it well enough you can then learn a Graphics API and use the same data that you are using for logic to display things on the screen!

I think it's fine to begin with C++ or Java (Which is what I did, one at Uni and the other at home) but Pygame or Game Maker might be better starts for now. These will keep you motivated a little more and introduce you to simple concepts quickly.

Share this post

Link to post

Share on other sites

Original post by Stevenx514All I can imagine making at the moment is a text-based rpg, which might not be such a bad idea :P

Yes, in fact that is an excellent idea. You'll learn a great amount of things about game development without getting hung up on a lot of things that really don't matter in the beginning (like making it pretty/graphical). And then later on, once you've got the text version done, you can swap the text based display out with a graphic one. Not only does this break the project up into smaller chunks, it will also give you a lot of insight into modularizing your code to make it easy to replace one piece of functionality (the text display) with another (the graphic display).

0

Share this post

Link to post

Share on other sites

Original post by Stevenx514I might give C# a shot, I've only been working with C++ for a few days so it's no bid deal. I've gotten to the point where I can comfortably display text, declare variables, and create loops, but I'm having trouble seeing how all this can eventually become an animated game. I know this is looking far ahead, but I want to have a basic understanding of how you use the code to display graphics. All I can imagine making at the moment is a text-based rpg, which might not be such a bad idea :P

You should be able to make a very simple quiz game by now. I'm reaching the end of my third week and I've managed to make a program that lets you write text and get it in morse code and vice versa. Moreover, there is a menu selection (still only text) where you can choose whether you want to go text-to-morse code or morse code-to-text as well as access another menu for a user manual where you can make two selections and a third to return to the menu.

Play around, see what you can do. That's what makes you a good programmer!

0

Share this post

Link to post

Share on other sites

I'll just give another shout for C#. It's so much like java so it's like learning 2 languages at once, but it has a lot of other benefits both when you start and down the road. Personally I prefer Visual C# EE as an IDE over any java IDE I've used, and thanks to XNA there are so many C# game specific tutorials that are really easy to find and really easy to follow for beginners.

Odds are, when you start your programming in college, you will probably start with java as that's probably the most common starting language, which actually works towards C#'s favor too because they're so similar.

In the end though, I'd choose C# because it has a really nice IDE in VC# EE and so many easy to find beginner tutorials, which are probably the two biggest things that put it over other good beginner languages.