Basics of C/C++ game programming

This is a discussion on Basics of C/C++ game programming within the Game Programming forums, part of the General Programming Boards category; Hi, I'm new here and to C/C++. Now before you start bashing me and telling me to learn more C++ ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    6

    Basics of C/C++ game programming

    Hi, I'm new here and to C/C++.

    Now before you start bashing me and telling me to learn more C++ before trying to attempt a game, please understand that I've been programing games for a while in Macromedia Flash. The only diffrence is in Flash, I didn't have to worry about displaying graphics or sound ect..

    I just have a couple of questions that hopefully you can answer, or give me a link to a tutorial.

    One, what is the best compiler for creating games?
    And second, how do you display tiles of gif's?

    I've googled these questions, but didn't come up with anything good. So thanks for any help.

    EDIT: Didn't see the sticky at the top. I'll check it out, but still if you have any comments please post them.
    Sorry for not looking before I post.
    Last edited by XvXJTNWXvX; 10-22-2003 at 03:50 PM.

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    73
    I will confess outright that I have never made anything in Flash before. I am willing to bet, however, that making anything in C++ is different than making something in Flash.

    Thus we return to the problem of you not knowing C++ (Unless Flash programming uses C++ in some way). If you don't know C++, then you obviously can't use graphics and make games. C++ as a language does not provide support for graphics. Certain software companies and groups (like Microsoft) have made graphic libraries for C++. But, you can't use them until you now C++.

    The best compiler hands down is MS Visual C++. The problem, however, is that it costs over a thousand dollars. Thus, I recommend Dev C++. Again, I cannot stress enough that you WILL have to learn C++. Knowing another language only helps you learn C++, it doesn't automatically give you the ability to make games.

    Good luck!

  3. #3
    ...
    ... is offline
    Registered User
    Join Date
    Feb 2002
    Posts
    465
    you can pick up visual C++ .NET standard for around $100. if you have the resources and you really plan on sticking with this, i highly reccomend that compiler.

    otherwise, if you just want a free compiler to get you started, i got my start on Dev C++ and i feel that, while not nearly as capable as MSVC, the ease of use and good design makes up for it.
    I came up with a cool phrase to put down here, but i forgot it...

  4. #4
    Registered User
    Join Date
    Oct 2003
    Posts
    6
    Yes, programming in Flash is completly different. As I said, you don't have to worry about displaying graphics, Flash does it automatically by simply setting properties like _x, _y, _width, _height... and setting a frame rate. Also, It gave you simple key press detection (ie if(Key.isDown(Key.ENTER)) ).

    Allthough I'm new to C++, I'm not new to game logic and all the functions that they both share. All I really had to do was learn the syntax, some new stuff like pointers and of course displaying graphics.

    I searched download.com and came up with this Bloodshed Dev-C++ 4.0, is that what you were reffering to?

    Thanks for your help.

  5. #5
    Registered User
    Join Date
    Oct 2003
    Posts
    6
    ... (weird name ) :
    I'll probably pick that up soon. Since I'm still a student, I can probably get a student copy for about $25.

  6. #6
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    If you want to learn graphics programming in C++, I suggest 13h graphics. It is an EXCELLENT learning tool for beginning graphics programmers.

    www.brackeen.com

    that link should get you on your way.

    Once you feel like you are superior in 13h graphics, here are 3 more API's to master:

    SDL
    OpenGL
    DirectX

    I suggest SDL first, because OpenGL and DirectX are huge steps from 13h, although that huge step can be done, and many have taken it before.
    My Website

    "Circular logic is good because it is."

  7. #7
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    DavidP forgot Allegro, which many people here seem to like.
    Away.

  8. #8
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Talking Just thought I would post something ...

    I just wanted to say I never used 13h graphics or console games or allegro. I DID do a few game in the Win32 API, after I got the hang of it. That was when I moved out of console apps. I was using Bloodshed Dev-C++ at the time. It wasn't a bad, free compiler. I now have MS Visual C++ 6.0 and do most of my Windows apps in Microsoft Foundation Classes. I made an MFC Hangman game not too long ago, and I posted it here. Anyhow, when I moved on to graphical games, I started out with OpenGL, using NeHe's nice website as a guide. I now use, OpenGL, SDL, and DirectX. At the time, I have just finished a 3D engine in DirectX and started a new project. It's a first-person shooter paintball game. Terrain and objects are preset on a map, but it will randomly place trees using billboard images. I will post some more information in a NEW thread once I get some more done. I don't know that this had much to do with this post, but I just wanted to say a little something.
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  9. #9
    Registered User
    Join Date
    Oct 2003
    Posts
    6
    Wow, thanks for all the replies!

    I downloaded Bloodshed Dev-C++ 4.0 and after a quick look at it, it seems great.

    I'll take a look at 13h graphics and play around with it later. It might be a good choice for me since I won't be doing 3D procesor intensive games, just simple tile based games.

    SyntaxBubble: Can't wait to see the game, I want to see how powerful C++/DirectX is.

  10. #10
    Registered User
    Join Date
    Oct 2003
    Posts
    4

    Check your school

    Check your school bookstore for a compiler, I got MS Visual Studio.Net Academic version for $99 at my school. It has everything that the $1074 professional version has except for the OS and server software and version control, which a single developer doesnt need anyways.

  11. #11
    Registered User
    Join Date
    Oct 2003
    Posts
    6
    Ok, thanks Xeren. I'll ask about it tommarow.

  12. #12
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    >I want to see how powerful C++/DirectX is.

    Well you can do that by looking at any modern Windows game.
    My Website

    "Circular logic is good because it is."

  13. #13
    Registered User
    Join Date
    Oct 2003
    Posts
    6
    Do you have a link to it? I couldn't find it.

    If it's at your site, your out of bandwidth.

  14. #14
    NIM
    NIM is offline
    Registered User
    Join Date
    Oct 2003
    Posts
    24
    Wow - My school was giving away Visual Studio 6 and I recently found out they are giving away the .Net package. I'm surprised that your schools are not allowing students to use the software.

    When I purchased my laptop through the school they installed it on there for me, but if I ever decided to format harddrive I know where to look/go to install the software again. And its a known download so I am not hacking the school for the software.

    I would contact the IT department or even you CS/CIS departments and ask politely if they are "supporting student development with software". if not then like mentioned above there are some great free compliers out there.

  15. #15
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    The best compiler hands down is MS Visual C++.
    don't make me laugh. Hands down the best compiler?

    IMHO, mode 13h is a waste of time. Start out with a actual graphics library. I recommend Allegro, some recommend SDL, a few ClanLib. Just reasearch, and find the library you like.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Open-source Game Project
    By Glorfindel in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 03-24-2009, 01:12 AM
  2. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 04:48 PM
  3. HELP!wanting to make full screen game windowed
    By rented in forum Game Programming
    Replies: 3
    Last Post: 06-11-2004, 04:19 AM
  4. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM
  5. Game Basics
    By lemon-heads in forum Game Programming
    Replies: 4
    Last Post: 04-13-2002, 12:04 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21