Thread: Game Programming Help

  1. #1
    People Love Me
    Join Date
    Jan 2003
    Posts
    412

    Game Programming Help

    This may sound kinda dumb, but I really want to be able to make some decent games with C++. All I can make now is stupid text-RPGs and stuff.

    I really don't know that much C++, really. I've gone through the first 13 lessons from this site,

    ...And the first 8 1/2 lessons here:

    ...And with OpenGL, all I can do is make triangles and quads that rotate.

    Can anyone give me some advice on what I should do if I wanna start programming games fast? Where can I learn lessons about how to program games, and important things in game development?

    I've tried NeHe's tutorials, but I dunno...some of the stuff in his tuts seems kinda hard, and doesn't teach you how to program games specifically.

    What I'd like to be able to do is to make a Tetris, tic-tac-toe, or a Snake replica with C++. But I really have no clue how to do that with what I know so far.

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    For something like Tetris or Snake, you really don't need something as complex as OpenGL. Try a more simplified library, such as Allegro.

    It will make it much easier to create simple 2D games than if you tried to make them in OpenGL.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Registered User zdude's Avatar
    Join Date
    Sep 2002
    Posts
    32

    Re: Game Programming Help

    Originally posted by Krak

    Can anyone give me some advice on what I should do if I wanna start programming games fast?
    There is no quick way to suddenly be good at making games.

    I'm working on one now using SDL, I'm planning for good features and everything. I've used C for about 2 years and Java for more.

    So don't try and rush it, you gotta be really good at normal programming until you can do games.

    BTW, incase anyone's interested, the site for my game is http://sdl-invaders.sf.net It's gonna be SDL, I'm making it for Linux though there will be a windows port. Open Source of course.
    Those who live by the sword get shot by those who don't.

    I can C.

    Compiler: gcc

  4. #4
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    I second that, you won't be able to make good games fast. At least nothing complicated and done in 3D.

  5. #5
    napKINfolk.com napkin111's Avatar
    Join Date
    Apr 2002
    Posts
    310
    I would recommend starting with SDL to learn graphical programming. I started with it and it helped alot to have that background before going into OpenGL. Although the transission from 2d thinking to 3d thinking was MIND BLOWING...but I've (mostly) adjusted now

    //napKIN
    "The best way to get answers is to just keep working the problem, recognizing when you are stalled, and directing the search pattern.....Don’t just wait for The Right Thing to strike you – try everything you think might even be in the right direction, so you can collect clues about the nature of the problem."
    -John Carmack

  6. #6
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    I would recommend... GDI It's a little slower than the others, but everything in Windows API is already pretty much built to use it, so... yeah.

    *p.s. Sorry, didn't notice that you're still doing console programs. But most people learn Windows API sooner or later, so you might as well learn it sooner
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  7. #7
    I've heard of someone actually making a FPS in console mode. He made "graphics" routines for making ASCII art in pure assembly language, and coded the engine in C.

    Hey, there's an idea for my next project! I'm going to make some ASCII console-mode graphics routines! All I got to do is make some inline assembly code and I could have full color ASCII stuff. No, maybe I won't...that sounds gay

  8. #8
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    I would recommend... GDI It's a little slower than the others, but everything in Windows API is already pretty much built to use it,
    and also crashes the whole system if you mess up with GDI royally,



    I've heard of someone actually making a FPS in console mode. He made "graphics" routines for making ASCII art in pure assembly language, and coded the engine in C.
    me to, i think that was also the guy that made all of his own graphics in pencil, and all of his sounds by himself, using his body.


    Now for game programming, you need to decide which type of graphics system you want to use, 2D or 3D. 3D may look cooler, but if your doing a game as a one man job, you could spend so much time on the engine alone, that you would never get the rest of the game into line(like BIS said with NWN, how it took them 3 years to make an engine in which every building and dungeon looks the same, and the mountains arent climbable .

  9. #9
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    and also crashes the whole system if you mess up with GDI royally
    Hey hey, where'd you hear THAT? GDI is probably a lot safer than lots of other graphics libraries, as long as you know what you're doing!
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  10. #10
    Any program you make can mess up your computer . GDI is bad at eating system resources, at least if you don't know what you are doing. Just make sure you have a original HBITMAP for all your HBITMAPS so you can destroy them cleanly, and take other precautions as well.

    I started gaming in mode 13h, and would not recommend it to anybody. I recommend a library like Allegro, SDL, or GDI to start off with. If you plan to go big with DirectX later on, start with GDI, if you plan to go big with OpenGL start with Allegro or SDL and pick up GDI along the way.

    Another suggestion would be to learn QT. It is cross-platform, and I think it is a great API for making windows. It runs on X-Windows and Win32, and I think there is a version out for MacOS. It has a lot of functionality, and it has a thing that is kinda like GDI, but it is easier to use. It also has a system similiar to GLUT for making OpenGL programs. The only drawback is that it only works in C++. But I myself, being a C++ user, think that is actually a good point

  11. #11
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    Another suggestion would be to learn QT.
    since i have been using linux more and more recently(well 100%, since my windows harddrive blew on me......lost 6 damn months of projects), i was thinking about learning that. I agreee with you that it has great potential, and looks like a great API for those that wish to port code to different systems.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-08-2010, 12:08 AM
  2. Open Source / Semi Open source game idea. Help needed
    By CaptainPatent in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 05-16-2007, 10:44 AM
  3. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 03:46 PM
  4. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM