Sign in to follow this  
DrCoolSanta

How do you exactly code a game

Recommended Posts

I know the title looks silly, but I mean how do you go about coding a game, knowledge of graphics isn't enough to teach you how to code it, till now I had been been coding games that basicall follow this pseudo code
Initialize();
Variables;

Game loop
{
    If variable at is 1 show title;
    If variable at is 2 show the first town
    ......
}

DeInitilize();
So as you can see, I have been using a variable, in this example at to tell whether I am at this place or another, and according to it, the game is rendered. Another way I had been using was by creating many game loops, keeping a condition which is made false after the work of that loop is done. Is this way systematic enough for large games, I mean can this be used in games that have long stories and such? I would appreciate if someone could give me a link to the source code of a game, preferably C++ and SDL, since I am doing 2D for now, but OpenGL would be just as nice.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this