Results 1 to 12 of 12

Thread: Getting Started in Game Development (Programmer)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Retired Staff Reputation: 75
    Eriond's Avatar
    Join Date
    May 2006
    Rep Power

    Default Getting Started in Game Development (Programmer)

    Getting Started with Game Development

    Okay, so I'm going to have a couple sections in here, for the various stages of people who'd like to do games programming, but don't know how (again, at various levels of knowledge). I'll try to be as concise as possible. Basically, the four stages I'll talk about are beginner, console, pre-graphical and graphical. I'll outline them shortly here:
    • Beginner: You've never programmed before.
    • Console: You've done hello world, maybe a bit of string manipulation, some arithmetic, used variables, and done a few loops; you can compile a basic program and run it. Probably where people who've taken a single basic C++/Java class should be.
    • Pre-Graphical: You essentially know to work with a programming language, but you've never done any sort of graphics, just console stuff, maybe you've opened a socket or two, spawned a thread, or written a text-based game, but you definitely know what classes are, what a virtual function is. Probably where people who've taken that second C++/Java class should be.
    • Graphical: You're able to make 2D/3D applications, and are wondering where to go from here. This'll be less like a tutorial, and more just suggestions of interesting topics, though obviously there's a massive diversity in ways you can specialize here (graphics, networking, asset management, tools, etc..)

    I'll be adding to this info over time, so it may change/expand/shrink without warning. At the top of each section, I'll post a TL;DR version, which'll basically just be a bunch of links with a couple of words of context. After that, I'll fill in the larger section of the post with more stuff that'll probably help move you along and motivate. Also, please keep in mind that these posts are written with a main focus on C++; if you're slightly more experienced than the pre-graphical section, the language shouldn't matter too much for you, so you'll still be able to get something out of the post.

    Also, please note this constitutes only my highly biased advice. There are plenty of ways to go about getting ready to program a game; this is only one of many.

    Objective: To get you to the point where you can compile a simple C++ program, and output simple phrases and numbers to the console.
    TL;DR: Download this, install it, if necessary, follow this for help. Read this, up until about lesson 11, and do the examples. Congratulations! You're at console level!

    Okay, so you're interested in doing a bit of game programming, but know nothing about programming. That's OK! It's never too late or too early to start to learn to program, though you should probably know at least basic algebra (Grade 7 stuff).

    Before we get started, I'm just going to give you a basic little overview of how computers work. I know, it may be a little boring, but I'll try and keep it as short as possible.

    Computers are basically machines that do exactly what you tell them to do. If you can imagine doing something, logically, step by step, chances are, a computer can do it. All programs on a computer, whether they're written in C++, Java, C#, Ruby, Perl, whatever, at a basic level boil down to a computer doing one of a small amount of things one at a time, very fast. Everything runs in a sequence; a computer doesn't do two things at once (this is an extreme oversimplifcation, as today we have multiple cores, instruction pipelining, etc.., but accept this as fact for now). So you should think about programming, basically, as a long laundry list of instructions that you're giving the computer, which it will do, regardless of whether or not they make sense (this is the cause of bugs; the computer just checks to see it can read your instructions, not whether they make logical sense).

    Now, your first question probably is, what exactly do I need to write instructions for my computer? The answer is, you don't need anything fancy (well, it IS fancy, it just doesn't look it), you just need what's called a compiler. A compiler basically takes simple text files, (like a .txt) and turns them into instructions the computer can read (.exe files). That's really all you need at the most basic level. However, while you can program with that, and notepad, it's generally better to get what's called an IDE (an integrated development environment), which gives you a bit more stuff than just the compiler; it'll color text, and format things in such a way that it's a lot easier on the eyes, and give you a whole bunch of extra useful features which I won't go into right now.

    So, what you should be doing is downloading this (codeblocks-12.11mingw-setup.exe), and installing it, and using following this for help, if you need it. Code::Blocks is a solid cross-platform IDE (will work on linux, mac, or windows), that'll let you easily work with and make small programs.

    Once you've installed it, you should be ready to go. The whole process will take care of installing your compiler (g++/mingw), a debugger (gdb), useful for getting rid of bugs (big shock, I know), and a nice text editor. So, when everything's installed, and you're ready to go, fire up the program, and take a look at these tutorials:, up until about lesson 11.

    Objective: To familiarize you with object-oriented programming, and some of the more advanced features of C++.
    TL;DR: Read these up until lesson 20. Then read about templates. Then read about enums and the preprocessor. Then read about the STL. Yey! you're now pre-graphical.

    Objective: To prepare you to begin working in a 2D/3D graphical environment.
    TL;DR: Learn to use SDL. All of it, hopefully, but mainly the core and SDL_image. Good tutorial here. Learn about OpenGL from here when you're done. A good 2D/3D math primer is here (Also applicable for introductory-level college classes!). You need to understand matrices, vectors and their transformations. When all that's done, and you can write a proper 2D/3D , you're now able to make a full-ish game!

    Objective: None, we'll just swap advice, interesting tutorials/papers, etc..
    TL;DR: Somewhat less advice spam (though still some ) from me, more talking. I've felt the best way to gain experience and build up skills is, obviously, to try something new. That being the case, I've found it's interesting to try out novel techniques, and see how they work, and see if you can actually implement them properly. In this section, I'll basically post papers and stuff I find interesting/novel for games. And here's the first:

    Four big (optional, opinionated ) pieces of advice for the more advanced crowd; I strongly advise installing Linux, either in a virtualbox or as dual-boot if you're not running it already. It's obviously a personal preference, but I started developing stuff in Windows, and in switching to Linux I've felt my productivity and the ease of using the system for technical tasks massively increase.

    Another good thing to look into is Makefiles. It's painful at first, but worth it; it gives you a lot more flexibility in how you want to structure things, though for the vast majority of projects you don't need it. However, sometimes, the IDE just isn't flexible enough to do a few things (Code::Blocks can't automatically mark folders to add all files matching a pattern to the compiling list, making it a nightmare for independent (i.e. not all in one massive include list), generated code).

    Third, if you haven't already, consider learning a scripting language; there's a ton to choose from, and coming from coding C++, or Java, you'll think they're magic. If you don't care about speed, or the nitty-gritty details (games, usually do), they're dead useful to have around; you can write up a tool that might take days in C++ in hours in Perl (my special girl), Ruby or Python (or others).

    And lastly, it's always a good idea to use a version control system, even if you're working alone. It's the difference between living in black and white and living in colour, in terms of coding confidence. A VCS basically lets you see all changes you, or someone else has ever made to your code, stores all files, and lets you revert the files to any point at which they ever existed (example; you break your game with a big change, and can't find the reason why. No problem, just rollback with your VCS, all your affected files are now back to the exact way they were when you comitted, yesterday. Or maybe you want to see all line changes since the game was working. You can. Magic). Example of VCSs are CVS, SVN and git. Everyone seems to love git at the moment, but SVN is also active. CVS seems to be dying out.
    Last edited by Eriond; 02-24-2013 at 11:25 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts