Jump to content
  • Advertisement
Sign in to follow this  

How do you exactly code a game

This topic is 4002 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

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

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

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!