Thread: Creating a Game

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    24

    Creating a Game

    Hey, although I am novice with programming in c++, I would like to know "how to make a game." (I know that phrase is throw around alot)

    I'm not going to attempt to any time soon, but I would like to know what it takes.

    What are the steps and what do I need to know to do so? Could I make a simple tic tac toe game with only c++? Or do I need to know how to use something like opengl? And what exactly is opengl? Is it a programming language? Can it be compiled in a c++ compiler like bloodshed dev c++? If it's not a language, how do I associate it with c++?

    Any help's appreciated.
    Last edited by RazzTheKid; 03-13-2008 at 09:56 AM.

  2. #2
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Look into what libraries are when refering to C++, that will clear up some of your questions. Right now don't worry about games, you are unlikely to understand a lot of what we would talk about if we told you even an outline of what you need to do.

  3. #3
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    You can make a game of tictactoe in the console, as long as you are happy with textonly output. It sounds like a good starting point too. If you havent done any programming at all yet, I would suggest learning how to use if statements, for loops, and arrays. Once you know about them you should be able to make a basic tic tac toe game. And if you get stuck, just post you code.

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    24
    Thanks for the info. I understand if, loops, and arrays already. I look into what libraries are and such.

  5. #5
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    In C++ iostream should do pretty much everything you need.

  6. #6
    uint64_t...think positive xuftugulus's Avatar
    Join Date
    Feb 2008
    Location
    Pacem
    Posts
    355
    My first game ever was a slot machine with very simple computed graphics using ... hold on GW-BASIC running in a DOS emulator on an Amiga-500. I was forced to learn premature optimization, as one could usually see a line of pixels being rendered on such a configuration.
    I wish i had resources then as i have now, as i would definately work in 68000 Assembler as easily as with BASIC. But it was a lot of fun!
    Code:
    ...
        goto johny_walker_red_label;
    johny_walker_blue_label: exit(-149$);
    johny_walker_red_label : exit( -22$);
    A typical example of ...cheap programming practices.

  7. #7
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    You can use the HGE game engine library to create 2D games. If you want to look at it I think this is the correct link.HGE. This uses DirectX, and if you get good with it, you can get mad frame rates. my game runs at 400 fps with 300+ sprites at a time.

  8. #8
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Why have a frame rate higher than your monitor can display?

    You may as well let the system sleep for a bit.

  9. #9
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    You may as well let the system sleep for a bit.
    The more frames you have the more you can spare for non-rendering tasks.

  10. #10
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Sure for a speed test thats fair enough, but for practical use you are better off capping the frame rate and have it wait.

  11. #11
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Sure for a speed test thats fair enough, but for practical use you are better off capping the frame rate and have it wait.
    I've never seen that in any book, forum, or code. Usually you want to cap the frame rate for physics calculations but you want the render to run as fast as it can go. The refresh rate is normally the cap but that depends what the user has vsync set to. The video card could care less how fast you render up to a point. Usually in the neighborhood of 600 to 700 fps things start to get a bit wacky (at least my experience on NVidia cards) and start to cause display artifacts. I've never seen any problems with FPS lower than that.

  12. #12
    Registered User
    Join Date
    Mar 2008
    Posts
    24
    Quote Originally Posted by Raigne View Post
    You can use the HGE game engine library to create 2D games. If you want to look at it I think this is the correct link.HGE. This uses DirectX, and if you get good with it, you can get mad frame rates. my game runs at 400 fps with 300+ sprites at a time.
    Thanks for that link. I'm sure it will come to use.

  13. #13
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    I have any physics code run off delta time just like everything else. Maybe I am mistaken in my way of doing things, but it works for me.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2D Game project requires extra C++ programmers, new or experienced
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 05-16-2007, 10:46 AM
  2. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  3. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  4. HELP!wanting to make full screen game windowed
    By rented in forum Game Programming
    Replies: 3
    Last Post: 06-11-2004, 04:19 AM
  5. Game Programmer's AIM Circle: Join Today
    By KingZoolerius66 in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 12-20-2003, 12:12 PM