Jump to content
  • Advertisement
Sign in to follow this  
DrCoolSanta

How do you exactly code a game

This topic is 3825 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!