Starting out game programming and might need a good guide

Started by
12 comments, last by ILIKECEREAL 15 years, 10 months ago
I have chosen to learn C++ and I know some of the basics of it but not good enough just to start coding with the knowledge. I've been using VB 2008 for a little bit now and got an ok grasp on it. So now I'm wondering if someone can tell me of any good tuts on to make a 2d game with C++ or VB 2008 or just make a game just to start getting experience and work my way up on learning C++ and more programming. Thanks in advance, Tyler
Advertisement
I personally found that it helps to have a good understanding of C++ before trying out a game. It makes it easier to follow tutorials and other people's code so you can understand what they are doing instead of just copying it.

Once you feel you are ready you can try using an API like SDL. It makes it easier to set up a window and draw things.
A couple good tutorials for SDL are:
http://lazyfoo.net/SDL_tutorials/index.php
www.aaroncox.net/tutorials
Quote:Original post by absolute
I personally found that it helps to have a good understanding of C++ before trying out a game. It makes it easier to follow tutorials and other people's code so you can understand what they are doing instead of just copying it.


Definitely. Have a deep understanding of OOP and state management (Finite State Machines), or else you may find yourself starting over a lot.

A very basic start to game programming would be to program connect 4, or tic tac toe, these 2 games have simple rules, simple winning conditions and can be done with a simple text interface to start with.

Both of these games are very easy to code using any language, and you can just make them 2 player hot seat to start with, then upgrade with an AI or network connectivity.

As both of the previous posters have stated, it is worth learning a bit of the language first, at least do hello world and learn the basic language structure (loops, arrays etc). After that, choose something small like tic tac toe or connect 4, because they only use the simplest commands for functionality and in the end you will have a simple but playable game.


-------------------------------------All i know is i don't know anything
I would second the learning of object-oriented principles - they are, I think, a very useful toolset.

As to an early game project, have you done any thus far?

If not, I would suggest starting out with a text-based game, either in the console, or, if you have a simple form designer available, in text boxes and inputs.

Specifically, perhaps one of the following would be a good idea:

1) A very simple text adventure. This should have rooms, which can lead to other rooms via doors, which may be locked. Locked doors may be unlocked by "use"-ing appropriate items on them in the appropriate order. Rooms may also contain basic items, which may be collected and later used on doors. On entering a room, the room's description should be printed, along with a list of exit doors and items in the room.

2) A very simple combat RPG. The player faces a succession of monsters, and battles them using a handful of options ("hit with sword", "raise shield", "drink potion" and "use wand", perhaps - although I'd suggest shorter commands, such as "hit", "defend", "drink" and "zap", respectively). Monsters are selected at random from a list, and have a handful of stats, such as health, strength, defence, and the like. The player has a similar list of stats, which increase with each fight. The outcomes of actions are determined by background calculations. Be careful to not make this idea too complex at the start. I'd recommend getting all of the above up and running before you consider adding further features.

[edit] On second thought, nightech's suggestions are probably a better starting point; perhaps consider my suggestions once you've completed one or more of those. [/edit]

Very good luck, and enjoy your programming! ^_^

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

I've been reading about If statements and things like that in C++ but the thing that is getting to me is that I just can't just come up with the code and type it out. Thats one of the major walls I hit into. I did hello world and thats about it.
Quote: but the thing that is getting to me is that I just can't just come up with the code and type it out
Ok, so come up with an example program you want to tackle, but can’t. We’ll help get you started on it.
Well making a small game cause I get some of the coding parts but for me I need to be able to do it often and repetitive to get know it. I was thinking of doing pong,tetris or something very simple.
Quote:I was thinking of doing pong,tetris or something very simple.
How many non-graphical programs have you made so far?
To be frank none but I was just naming a few that thought might be good experience to get started.

This topic is closed to new replies.

Advertisement