WHEN to start game programming

This is a discussion on WHEN to start game programming within the Game Programming forums, part of the General Programming Boards category; Ok first of all I know you guys have been getting a bunch of "where do i startz to program ...

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    34

    WHEN to start game programming

    Ok first of all I know you guys have been getting a bunch of "where do i startz to program my game?" threads this week so if this gets too close to that, forgive me. I am going to STFW for when I do start. The question is when I should start game programming.

    In order to answer that question I guess you guys should have a little bit about my background and experiance in C++. In the summer I made the decision to learn how to program in C++ on the account that I thought it would be a usefull skill and could aid me in a few intellectual chores( such as homework). Well, after a beginner book and a few tutorials I have learned that it can make a great hobby. Problem is after the tutorials I figured out that programming to help me do my homework is not time efficent and it would be pointless to code such a program. I have also ran out of ideas of what to program after the exercises and the best use I have found for it so far is to code a small app to help him build a feather shooting cannon (don't ask) yet even that idea went blank after changing the cannon design so that it required no calculations.

    This leads me to wanting to get into game programming.....

    For christmas I got Petzold's and Stroustrup's books as well Myer's More Effective C++ and Effective STL. . I am also reading the web book Thinking in C++.

    Now after reading all that information, I want to hear your opinions. Should I start reading up on the OpenGL and code some basic games, or should I finish my reading first?

  2. #2
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379
    Dont jump into opengl before you can work with the console, and make sure you know what you're doing with winAPI/UNIX coding for whatever machine you're on. Game program is very long and complicated, I wouldent recommend jumping in.

    But after you have the basics you can jump into game programming, but dont try 3d till you have 2d down :P (yes its enticing).

    Good like with your Opengl programming .
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

  3. #3
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    This is easy. Finish your readings. You might also consider "The c++ programming language" by Strustrup. I think this book gives plenty of reader excercises that are quite challenging. It also gives a great intro to the STL, which you may or may not have gotten much of in your other books.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  4. #4
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    It sounds like you might get bored if you don't make a game, so go ahead, dive in. You might find that your c++ are too weak, and the worst thing that could happen is that you have to go back to some c++ tutorials. For games, you might want to check the Simple DirectMedia Layer out. It has alot of advantages verses starting with OpenGL.

    SDL

  5. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    You can compile SDL programs with Dev-C++. Download the Mingw32 Developement library from here: http://www.libsdl.org/download-1.2.php

    You'll probably have trouble setting it up -- most people do. Search the board and you might come up with a solution.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  6. #6
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by Blackroot
    But after you have the basics you can jump into game programming, but dont try 3d till you have 2d down :P (yes its enticing).
    Disagree, they are completely apart from another and either one could be learned first. Its more just don't jump into something like Direct3D/OpenGL that you can't handle (where some people can) before working with something more basic, which is more commonly a 2d library (SDL, allegro, etc). So it all boils down to not jumping in 3d until you're ready, whether or not you've learned 2d.
    Warning: Have doubt in anything I post.

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

  7. #7
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379
    If someone doesnt know what an int is I doubt they'd be able to learn any graphic library actualy. By basics I mean basics, like pointers and data structures. But I supose some people can do 3d more quickly, but its much more confusing and usualy harder to get into. I guess its a matter of opinion :P.
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

  8. #8
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by Blackroot
    If someone doesnt know what an int is I doubt they'd be able to learn any graphic library actualy. By basics I mean basics, like pointers and data structures. But I supose some people can do 3d more quickly, but its much more confusing and usualy harder to get into. I guess its a matter of opinion :P.
    I said, "don't jump into something you can't handle", aka. you know a hell of a lot more than whats structs are. I agree that you would need to know the basics very well first. 3d libraries tend to be harder, agreed, and thats why 2d libraries are usually recommended first. However, 2d is not a prereq to 3d, which is what you said, and IMO if you're very ready you could learn either one first.

    e.g. I've programmed basic stuff (html, php, win32 and some perl) and learned intermediate c++, and feel comfortable going to 3d (OpenGL) without learning 2d (SDL) first.
    Warning: Have doubt in anything I post.

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

  9. #9

    Join Date
    May 2005
    Posts
    1,041
    Ok first of all I know you guys have been getting a bunch of "where do i startz to program my game?" threads this week so if this gets too close to that, forgive me. I am going to STFW for when I do start. The question is when I should start game programming.
    We appreciate this



    I understand your conundrum. I started out similarly as you: C++ as a nice hobby, reading tutorials, doing stupid console stuff first. I had lots of fun during this time period! I don't know how long I spent just working on console stuff.

    I started OpenGL by using the first tutorial on NeHe.gamedev.net...I figured out what the code was doing (more-or-less, there's a lot you won't figure out until you get more into OpenGL). I would modify other people's code to make very simple things: boxes that would rotate and such.


    There really isn't any set way of jumping into game programming, and it can be very involved (you'll find yourself working more on just getting 'basic' stuff working than actual game content creation).


    best use I have found for it so far is to code a small app to help him build a feather shooting cannon (don't ask)
    That sounds interesting actually.


    Now after reading all that information, I want to hear your opinions. Should I start reading up on the OpenGL and code some basic games, or should I finish my reading first?
    What would work best for you? Ultimately, you can't trade anything for experience. You can read a lot, but you can't really be considered an expert on something (in this context) unless you've grappled with implementing it.

    What worked for me was balancing reading and implementing stuff...with a large bias placed on spending time programming (more time programming than reading).
    I'm not immature, I'm refined in the opposite direction.

  10. #10
    Registered User
    Join Date
    Jan 2005
    Posts
    106
    Interactive fiction is actually one of the harder things to code from the ground up, and it requires no mucking around with APIs OR graphical knowledge. Furthermore, it's also basically going to cover everything you'll need for a modern game (and then some. Parsers, for instance). Also, in coding an IF engine myself, I've learned a massive amount of C++ and programming concepts/theory.

    And yes, if you dive right into game making, it'll be a pain, but if you have some background, by being able to APPLY the knowledge instead of ZOMFG PASS BY REFERENCE CAN SWAP VARIABLES???!!!111one, you'll be able to learn a lot faster.

    Also, http://www.cppreference.com/.

    Oh, and don't abuse classes.

    BTW, how far removed is 3D programming from 2D? I'm under the assumption that it's not the programming that's hard so much as it is the math.

  11. #11
    60% Braindead
    Join Date
    Dec 2005
    Posts
    379
    2d has alot less math, 3d has alot more math, and requires some extra setup and code. They're both a pain to build from ground up in the end though :P.
    Code:
    Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)

  12. #12
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    3D math is all centered around vectors and matrices and once you get that down, most of it's cake.

    I say dive into an API and get neck deep in problems. That's the only way to learn.
    Crash the code thousands of times, create tons of access violations, and in general muck things up. After a bit, it all comes together.

  13. #13
    Registered User
    Join Date
    Sep 2005
    Posts
    34
    Ok guys, thanks for the help. Before I hear anymore it sounds like I should post the concepts I atleast think I understand:

    Data types
    Functions
    Pointers, addresses and arrays (about 3/4 understand, I'm in the process of pounding the pointer and array chapter in Stroustrup's book in my head )
    Loops

    I am having some problems understanding a lot of the OOP aspects of C++. I can make a constructor and destructor and that is about it. I hope that helps you in your judgement.

  14. #14
    Yah. Morgul's Avatar
    Join Date
    Feb 2005
    Posts
    109
    One of the advantages of using C++ for game programming is OOP's functionality. I'd say get OOP down before you take the leap and land who knows where.
    Sic vis pacum para bellum. If you want peace, prepare for war.

  15. #15
    Me pwn you.
    Join Date
    Feb 2006
    Location
    At my computer or in my bed.
    Posts
    46

    Lightbulb

    Quote Originally Posted by mrcheesypants
    Ok guys, thanks for the help. Before I hear anymore it sounds like I should post the concepts I atleast think I understand:

    Data types
    Functions
    Pointers, addresses and arrays (about 3/4 understand, I'm in the process of pounding the pointer and array chapter in Stroustrup's book in my head )
    Loops
    Well maybe I understand a tiny bit more than that but I'm still
    console programming. I think you should write a text based
    RPG. That's what I'm doing; I'm 500-some-odd lines into it.
    I've already written my share of games. Here are some tips
    you might find useful in console programming:

    To delay anywhere for 01 to 99 seconds type:

    Code:
    system("choice/cx/tx,NN>nul");
    where NN is a number 01 - 99. you will also need to include
    <iostream> and have the line
    Code:
    using namespace std;
    after your
    includes.

    To wait till the user presses a key without dispaying "Press any
    key" type:

    Code:
    system("pause>nul");
    You will need namespace std and <iostream> here too.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adventures in labyrinth generation.
    By guesst in forum Game Programming
    Replies: 8
    Last Post: 10-12-2008, 01:30 PM
  2. craps game & dice game..
    By cgurl05 in forum C Programming
    Replies: 3
    Last Post: 03-25-2006, 06:58 PM
  3. Where do i start game programming
    By knight543 in forum Game Programming
    Replies: 12
    Last Post: 01-11-2002, 09:23 AM
  4. Easiest 'real' game to start with...
    By Leeman_s in forum Game Programming
    Replies: 9
    Last Post: 01-03-2002, 12:52 PM
  5. Easiest 'real' game to start with...
    By Leeman_s in forum C++ Programming
    Replies: 9
    Last Post: 01-02-2002, 10:29 AM

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