[gameprogrammer] Re: why Always C++

  • From: kuon <kuon@xxxxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Sun, 9 Sep 2007 15:33:52 +0200

On 9/9/07, (r)£$ǖv@M$Ħ ¢(c) $........... <theamericansushi@xxxxxxxxx> wrote:
>
> where should i start for game programming i really wanna know how rite now
> im learning c++ well plz reply i really would apreciate it



You have two options:
- Going into a school dedicated to game programming
- Learning yourself

Which one you choose depends of your motivation (hobby or living work?) your
age (if you are very young, you can learn by yourself a lot easier) and your
money (school can be expensive).

I won't say one is better than the other, it depends of yourself. As me for
example, I lack everything needed to attend a school and I had the luck to
have a Mac SE 30 at the age of 6 to start playing with it. I think I started
programming about 14years ago, it starts to be quite some experience, but it
is nothing compared to the guys who worked on early unixes nearly 40 years
ago.

I'm saying this because I think you need two things to be able to write good
programme, experience and passion. If you love what you do, experience will
come with time, just do it.

Ok, enough for the pseudo emotional crap :P

If you don't plan to go in a school, for any reason, I suggest you don't
think the way you are now. I mean, you said, I know C++, and I want a game
to "fit" that language. Of course, with C++ you can write anything you want,
but the idea behind it is wrong. To write a game, you must firstly imagine
that game. You must know how it will looks like, how you will play it and
things like that.

Start with a small project you can finish and polish, doing some testings is
nice, but finishing a project is what that will make you a "game
programmer", even if you make a pong, it doesn't matter, as long as you have
the passion and the motivation to continue.

When you have the idea of your project, separate it in parts. Like, let's
take the pong:
- Inputs
- Graphics and sound (the art, nothing to do with coding)
- Rendering
- Audio
- AI
- Core controller

Ok, now, to make that game, you need to be able to make each and all of
those parts. So, what you will do is to start a mini project for each of
them, until you succeed.

So, let's take the input, the goal is to setup a small project in which you
can move the mouse and have the coordinates printed into the console, that's
enough, for the game, you will do the same, but instead of printing to the
console, you will send it to your core controller. You can use SDL or direct
OS controls.

Then, the graphics, for a pong, it's not really a problem, but here, you can
let your imagination do some incredible things, same for the sound effects
and music. Now, I put that part in two, but that one hasn't to be done in
the same sequence as the coding parts, you can even ask someone else to do
it.

For rendering, the goal is to be able to print something on the screen, if
possible from image files. Here, I suggest you use something like SDL+OpenGL
or OpenGL directly you will find hundred of examples for both.

For audio, you can use SDL_Mixer or OS Api, also here you will find example,
the goal here is to play music with sounds triggered by something, like a
key or mouse movement (you migh want to use the input made at stage one for
this).

Then the AI, for this, a terminal application is what you need, an AI has
inputs and ouput,  in this case, you give the ball position, and the AI give
you the pallet position. Of course, this is a very simple scenario, an you
will find a lot of books on AI, but having the AI acts like a function
(in->out) is the simplest and a very powerful way of creating nice AI.

At last, the core controller, this is the final project, at this point, all
the other part should be known. When you are a skilled programmer, you can
start here directly, and add the other things on it, but remember to not add
something you don't know well to it. Always test elsewhere.



I hope this will be of some help to you, I'm not very good at explaining
things. If you have any specific question like which book, what's SDL? Try
google, then you might post here.

Best regards



-- 
Kuon

"Don't press that button."
http://goyman.com/
Blog: http://kuon.goyman.com/

Other related posts: