Getting started with programming actual games?

Posted 31 January 2011 - 05:10 PM

So I'm trying to get started programming actual games in C++. But there's nothing I can work with! I try to make a game, using a engine like SFML, and yet I get a bunch of errors. When I ask how to fix those errors, people think that I'm some kind of idiot. They say "Get more experience before you try something like this."
But, how am I supposed to GET that experience? A simple command-line game doesn't use classes or pointers or anything like that. I know the basic if statements, for loops, etc. I just want to get experience with the higher-level stuff, like pointers and references. I could take a class, but since I'm in the middle of high school, that doesn't really mean much. Probably the only programming class they have at my school is in BASIC or something.

So how did you guys get started? Did you take a class, or did you just learn by yourself?

Replies To: Getting started with programming actual games?

Re: Getting started with programming actual games?

Posted 31 January 2011 - 05:23 PM

I don't think games are a good place to start. Why don't you buy a C++ intro course text book? It will teach you the concepts and most likely give you projects to code along the way, which is the best way to learn. If you don't want to shell out the money try typing "How to learn C++" into Google. I was forcibly introduced to programming, liked it, and decided to major in it; I found that it is is easy to learn something when you truly enjoy it.

Re: Getting started with programming actual games?

Posted 31 January 2011 - 06:55 PM

Quote

A simple command-line game doesn't use classes or pointers or anything like that.

Why not? You can use a class to hold the game status information, the player status information, game level information, etc. You will then pass these classes by reference or by pointers into functions.

Quote

Well I learn best by doing projects-like doing worksheets and stuff.

In my opinion the best way of learning programming is by programming and programming and programming.

Quote

Getting a textbook is just reading...

Get a good book on programming and as you read the chapters type in the example programs, don't cut and paste, compile the programs and insure that they work as the book's author says. Once the program works then make a few modifications and see if the modifications do as you expect. In this way you will be doing more than "just reading".

As for which book? You can search this site FAQ for a listing of books. Also you can search for free book downloads. One such book is Thinking in C++.

Re: Getting started with programming actual games?

They say "Get more experience before you try something like this."
But, how am I supposed to GET that experience?

You want to know the reason they tell you to get more experience?

You're posting on a forum. That's pretty much the bottom line. If you don't know how to debug the code yourself and figure out how to fix the errors from reference on the internet then you do not have enough experience. If you have to ask someone how to make a game then you're already a step behind.

Sorry if that was a bit harsh. I'm just being a realist.

Onto the million dollar question. How exactly do you get this experience that everyone likes so much?

You start simple. You're not going to be able to make even the simplest commercial game on the market. I don't care how easy Age of Empires, Call of Duty, whatever looks. The bottom line is that it most definitely isn't. Teams of developers with years of programming experience work on these games for a year or more at a time.

What is considered simple?
Tic-Tac-Toe, Connect Four, Rock-Paper-Scissors

After that maybe checkers and/or chess. Then maybe after you have a serious understanding of all aspects of game programming can you move to a very basic 3D game.

Well what do you use to get started in C++ game programming? SDL, opengl, and directx are popular choices.

Re: Getting started with programming actual games?

Re: Getting started with programming actual games?

Posted 31 January 2011 - 08:18 PM

what about making other things? try out making different sorting algorithms or looking at Dijkstra algorithm or maybe the shunting yard algorithm. you don't need to make games to learn to program. if you want to use classes then why not use them for something else, learn about them, experiment with them, then implement something with them. SDL is a nice place to start game dev from but it's still kind up there. maybe look into pygame or something like that

Re: Getting started with programming actual games?

Posted 01 February 2011 - 12:53 PM

I think once you feel you are proficient enough in general programming to make a game, go for it. Making small games is the best way. The biggest thing is that you need to finish the games you start. I ran into that problem a lot. Make sure your game ideas are simple enough to finish. Otherwise, you'll end up with a bunch of not working, half completed games.

Re: Getting started with programming actual games?

Posted 01 February 2011 - 01:00 PM

One well done, completed project looks a lot better to potential employers than 10 unfinished, unpolished piles of code files that you call "works in progress". Start simple like everyone else said, work your way up.

Re: Getting started with programming actual games?

Posted 03 February 2011 - 09:21 PM

Kilorn, on 01 February 2011 - 01:00 PM, said:

One well done, completed project looks a lot better to potential employers than 10 unfinished, unpolished piles of code files that you call "works in progress". Start simple like everyone else said, work your way up.

Disregard what everyone here has said. I am pretty sure that is obvious to most people. The problem is, you are a beginner at using the Internet as a resource to find absolutely anything and all you ever get from people is "learn how". How do you "learn how", when you don't know how?

I've been down that path of yours and the only help you get is: "learn how". Excuse my language but I'd like to say no sh*t Sherlock.

Let me give you a few tips on how you can increase your experience. You have a problem, the first thing you should do is read and try to fix your errors the same way you read a book: top to bottom. So focus on the very first error you get. The best method that more experienced programmers use when they run into a problem they never experienced before is to look up the meaning of such an error code on the internet (using your personal favorite search engine).

Now, you don't have to be an "expert" at C++ before you try a game, that's stupid. Honestly, once you've gotten the grasp of most of C++, doing a project like a game is the best way to hone your skills and know what areas you lack. So I say props to you for trying, don't listen to those that state otherwise.

Right now you're pretty new at being the only person to go to when you come across a problem and given the fact that writing a game is not something you're experienced with it can be more difficult than it should be. Let's take baby steps. What's the first error you receive?