Thread: General Blurry Understanding of C++/game development, would appreciate clarity

  1. #1
    Compile Errors = Schwa?!
    Join Date
    Aug 2005
    Location
    Ohio
    Posts
    15

    General Blurry Understanding of C++/game development, would appreciate clarity

    About a week ago I started learning C++, I've read over the tutorials on this site and others. I get the idea behind many of the concepts but wouldn't say I know them.. just because I haven't created a program that needs to use such things as classes/structures, I'm still small scale here heh with cout, cin, ofstream, ifstream .

    I'm anxious to get started more specefically in game development, which has been negative considering I've skimmed over many topics that look less important with the mindset of "I'll come back when I need it, currently it won't solidify in my mind because I have no use for it at the moment" (In regards to C++ concepts).

    I now have been crash coursing over the thousands of tutorials floating around the web for every type of game under every programming language. It's left me a little confused on where I need to get started. I've taken the advice of Geoff Howland on <a href="http://www.lupinegames.com/articles/path_to_dev.html">"How do I make games?"</a> basically his advice was to start small with games like tetris, and then move on to other games with additional concepts that will all be extremely beneficial to you when creating your "Dream Game."

    So, I'd like to make tetris.. without just copy pasting someone else's code and modifying it... I'd like to create these games in C++ because its more mainstream universal whatever, but most articles I find on game design like creating a tilebased game have been based around Python, Flash, VB. I've learned from the ideas they offer but their syntax is for another language then I want to learn and it distracts me with questions like "How would I tell the computer to display these commands to the screen or window rather than this command prompt??"

    some questions I have besides the ones already stated:

    Do I have to use OpenGL or Direct3D (DirectX) to create my Tetris game? (Keeping in mind, I'd like to start with the universally used programs/languages)

    More specefically does C++ have its own way of displaying graphics to the screen, without using Windows programming..?

    Is OpenGL only really ever used in 3d applications? or is it equally beneficial to use on 2d games?

    I know I'm really scatterbrained and asking alot, if I read more tutorials and overviews I'd probably read one that would make sense to me, but my brains tired of reading, the same topics without understanding their goal..but any tips general statements and/or answere's to the above questions, would save me alot of time searching in the wrong places, and most definetely appreciated! Thanks for reading.


    **Edit: Also I was trying the OpenGL tutorials on this site and was getting compile errors with:

    Code:
    #include "stdafx.h"
    Any guidance would be nice... I'm using Dev C++ 4.9.9.2
    Last edited by Howie17; 09-08-2005 at 08:35 PM.

  2. #2
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269
    » More specefically does C++ have its own way of displaying graphics to the screen, without using Windows programming..?

    Only ASCII

    » Is OpenGL only really ever used in 3d applications? or is it equally beneficial to use on 2d games?

    It is used all the time in both 3D and 2D applications.

    » Do I have to use OpenGL or Direct3D (DirectX) to create my Tetris game?

    It would probably be a good idea, using the GDI or console would be pretty hackish

    Meh, all I've got to say...

    - SirCrono6
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  3. #3
    Compile Errors = Schwa?!
    Join Date
    Aug 2005
    Location
    Ohio
    Posts
    15
    haha alright thanks, You know if someone figured out a way to make Tetris on the console with just blocks of text, that would be really cool... not very entertaining but quite amazing to get it working... So it looks like I need to start learning OpenGL then?


    Edit: to the post below, wow only 3 hrs... not bad =)
    Last edited by Howie17; 09-08-2005 at 09:15 PM.

  4. #4
    Rabite SirCrono6's Avatar
    Join Date
    Nov 2003
    Location
    California, US
    Posts
    269
    Go do a board search on "Dostris," I think you'll be pleasantly surprised
    From C to shining C++!

    Great graphics, sounds, algorithms, AI, pathfinding, visual effects, cutscenes, etc., etc. do NOT make a good game.
    - Bubba

    IDE and Compiler - Code::Blocks with MinGW
    Operating System - Windows XP Professional x64 Edition

  5. #5
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by Howie17
    haha alright thanks, You know if someone figured out a way to make Tetris on the console with just blocks of text, that would be really cool... not very entertaining but quite amazing to get it working... So it looks like I need to start learning OpenGL then?
    If you really think your brain wont solidify because you have no use for the C++ concepts yet. However I would wait for at least a months of experience and practice in minor applications before moving onto OpenGL. I'd also delve a TINY bit into a win32 programming tutorial after 2 weeks of C++ programming, just to get the full description of how to work with the OS (or whichever OS you use, if not Windows) before moving to OpenGL. The point of this is because OpenGL tutorials dive into win32 code anyway because you have to have some way to create the window and any way to make things less confusing to yourself is greeeeeeat. IMO http://nehe.gamedev.net/ is the place to start OpenGL. You'll find you'll want to know more C++ eventually when getting into the tutorials, its enough to be memorizing the OGL functions/concepts/etc. to be trying to figure out what the C++ ones do at the same time.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  6. #6
    Compile Errors = Schwa?!
    Join Date
    Aug 2005
    Location
    Ohio
    Posts
    15
    ahh, hehe thats why my anxiousness to dive in is going to kill me.. I just started doing an OpenGL tutorial search and ran into nehe, in a brief overview i think i'm going to be frustrated that they put so much focus on OpenGL's 3d uses, but that may be a ignorant statement.. I'll see as i dig deeper... and hopefully I can discipline myself to take the time to learn win32 programming and make habit the use of C++'s major concepts classes/inheritence. Maybe I'll make a short text RPG just as a reason to learn.. I'm not a fan of text games... "Stupid over-stimulated kids" ;P by the way, thanks for your advice Dae/SirCrono6.

  7. #7
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Sup, this reply isn't necessary, but I'm posting anyway.

    Quote Originally Posted by Howie17
    ran into nehe, in a brief overview i think i'm going to be frustrated that they put so much focus on OpenGL's 3d uses, but that may be a ignorant statement..
    Indeed, most comments I see on the subject vouch that 2d can be harder to program than 3d. I'm sure each have their own uses, but its definite that a tutorial concentrating on 2d and ignoring 3d wont be any easier than a 3d tutorial. I'm not sure but I think 3d might be more complex math/physics wise in advanced parts, and 2d more complex with all the pixel lining up and images/sprites/maps, I tend to think of plotting 3d easy as its just rectangles and triangles, and not rectangles you MUST apply images to, and still line up, be as easy (although only 2 dimensions).

    Quote Originally Posted by Howie17
    I'm not a fan of text games... "Stupid over-stimulated kids" ;P
    I'm with you there. I honestly dont see the purpose of long text games, because you are just copying and pasting or typing a story too much to fill in the game and less concentrating on the fact that you're making the game to learn and think for future ambishions. Also the fact that I want it to be tied in with 3d, so the furthest I get into it is menu->attacked (random), player class, monster class, generalized class, save the data, hello and goodbye, and some sort of x/y/z plotting that would incorperate to the 3d version.

    I'm sure you've thought of doing little apps, but of course see no gain in making them, but especially since you arent using a book or taking a course I'd advise them. I did.. conversions (F/C, binary/numbers), bitfield operating (might not find much on this topic), math problems [trigonometry, geometry (area of triangle, enter angles/sides), algebra (quatratic formula, or 1 + 1), etc], file encryption [input, bitwise (tutorial on this site), output], class containments [I think - like having a class that you made that you can use as an array (by making the array in the class) and have methods for, like sort (binary sort, find a tutorial), add, delete, resize, and add error checking (ie. if the array is sized 40, and the programmer wants to do something to 75, you know it doesnt exist: send an error)], mess around with the whole class inheritance/polymorphism features (Animal->Mammal->Cat->Persian, Animal->Mammal->Human->Man, Animal->Mammal->Human->Women), and there are tons of other apps to make or people to help which give practice.

    Oh, I'd get into windows interface programming soon, win32 being one type, because it eases a lot of the 'must dive' feeling. It is quick, easy, and shows visual windows of your data so suddenly putting information into the program is much more fun.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  8. #8
    Compile Errors = Schwa?!
    Join Date
    Aug 2005
    Location
    Ohio
    Posts
    15
    Thanks for takin the time to make a lengthy post, I think I'll do as you did with the short and simple text RPG, just to have an excuse to learn classes and maybe inherritence even if its overkill/un-neccesary. Then I plan to move into the Win32 "Creating a Window" and what not, at least with learning that I'll feel like I'm moving towards where I want to be rather than just being well-rounded by creating small purposeless programs heh.

    For anyone interested in Poker or hosts their own home games, I've created a small Command Prompt program to input player stats for a night and output the HTML needed to display them a little more pleasing to the eye. I currently have the individual player profiles linked to a page at: My Lovely Hosting" It will all be up on my poker groups website at http://www.OregonPokerTour.com soon. If your interested either remake it for practice (If your familiar with HTML) or ask me and i can send you the program/source.

    It's not much and the output doesn't look amazing, for that I have a friend into web graphics that'll be creating a "prettier" layout, so if your interested updates are comming!

    -For the "Gotta be on topic" people sorry that this doesn't have much to do with game programming...and is off topic </flame guard ;P>
    Last edited by Howie17; 09-08-2005 at 11:04 PM.

  9. #9
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    win32
    http://code.glowdot.com/tutorials/wi...ial.php?page=2
    http://www.winprog.org/tutorial/
    http://www.daniweb.com/code/snippet112.html

    All start out the same. I wouldnt get too in depth into it though, first couple pages shouldnt take more than a few hours, and thats enough to cover OpenGL prereqs. I wouldnt go in depth because win64 should be out sometime in the near future.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Game Development Help, General
    By Extol in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 09-15-2002, 06:05 PM