Skip to content

Learning C++

November 30, 2009

For years, I’ve told every aspiring designer who would listen that he or she needed to learn how to code. In today’s work world, the need to understand code of some sort is critical. In Wizardry 8, for instance, I did all the scripting that controls the entire story, all the missions and the basic faction ratings within the game. It was a made up scripting language which I designed for that purpose, and as such, I suspect it was sub0optimal. Fortunately, I was working with a couple programmers in its development, and their skill likely made up for my lack thereof.

I tell you all this to say that I’m taking the plunge myself now and am devoting a bunch of time to sinking into C++. For this purpose, I will be using Michael Dawson’s Beginning C++ Through Game Programming. The book has been recommended to me a number of times, and so far so good. Yes, I know, I could learn other languages, but this is where I have decided to start for a variety of reasons, not the least of which is that a legendary industry programmer told me to. So, there.

I welcome you to join me. I’ll be starting this week, and posting some thoughts up about it.

Advertisements
14 Comments leave one →
  1. November 30, 2009 1:50 am

    I know that you’re exploring primarily for game programming, but I wanted to recommend OpenFrameworks to you:

    http://www.openframeworks.cc

    It’s similar to processing, if you’re familiar with that, but for c++.
    It’s basically a collection of c++ libraries and wrappers for artists looking to get into programming. Although it’s not built for games, it’s easy to use it for that purpose. Plus, it’s multi-platform, and if you have a mac you can compile iPhone apps out of it using a framework i’ve been working on with some friends.

    Although it doesn’t have anything specifically for games, it can do simple things easily, like loading in images, fonts, sounds etc. It can play movies, and grab from a webcam. People have written libraries for all sorts of things. I actually think that this kind of stuff is nice to have even if you only want to make games because it expands the scope of what your games are capable of technology wise, and lets you think outside the box a lot easier (not like you have a problem with that anyway though! 🙂 ).

    anyway, hope you’re well, good to see you’re getting into c++. it’s the best.

    -zach

  2. November 30, 2009 1:54 am

    I’m making myself learn ActionScript 3 and JavaScript by way of learning how to use Flixel and Unity. It’s hard (last time I did any serious programming was in Pascal, a good fifteen years ago, so object-oriented programming is a new territory for me), but I think I’m making good progress.

    • Heather Smith permalink
      November 30, 2009 12:06 pm

      I just recently got the free/indie version of Unity, but I didn’t know you could use Actionscript with it.

      I only know actionscript and a little of JavaScript, but I’ve wanted to learn c and I’ve taken this book out of the library once but I wasn’t sure if it would be too advanced for me since I know no c at all.

      I look forward to following your progress though and might even take a crack at it again.

  3. November 30, 2009 10:11 am

    I intend on doing something similar, but I’m not focusing on it entirely until next year. I’ve just been browsing through some of the stuff I have now. I’ll be following your progress though, assuming you’ll chronicle all of it.

  4. November 30, 2009 11:41 am

    Hmm, thanks. This looks like a good resource to get to know as I move forward with making my website more learning oriented.

    I’m 100% with you on using C++. I just like the control.

  5. November 30, 2009 4:26 pm

    I took an introductory C++ course recently and found it immensely enjoyable. One of the resources that was most helpful to me was the computer science course lectures collected at academicearth.org. For those who have the time to watch every lecture and complete the problem sets and quizzes, they are an excellent way to learn the essentials of computer science and will teach you a few languages to boot. Even as a sporadic reference, they’re very helpful.

    The best place to jump in from a practical standpoint is Stanford’s CS106A. It’s all Java, but most everything is applicable to other languages. It’ll leave you with a good understanding of object-oriented programming, and being exposed to Java is certainly helpful if you ever decide to use ActionScript or C#.

    Another good entry-level course is Harvard’s CS50, which is taught mostly in C. In contrast to CS106A, you won’t get OOP or Graphics, but it covers a lot more hardcore, low-level computer sciencey curriculum, the kind of stuff that Stanford’s courses seem to save for later. Things like bitwise operators, cryptography, file I/O and forensics, security, and machine language probably won’t be much help in prototyping or making small games, but it doesn’t hurt to have a good understanding of how things work under the hood and how to be optimally efficient.

    Back at Stanford, CS106B gets into C++ and some of the more advanced topics therein. CS107 is more C++, and seems to cover a lot of the low-level things that Harvard’s CS50 teaches up front, as well as a survey of other useful languages like Python and C#.

    There are a ton of other free resources as well, though I can’t vouch for them personally. I’ve spent my winter break so far devouring online CS lectures from Stanford and Harvard, and I’ve learned a whole lot from them so far. God love the internet.

  6. November 30, 2009 11:31 pm

    Well, I’ve had a hard time finding a useful programming book, so, I’ll take the dive with you.

  7. Chris Pioli permalink
    December 1, 2009 5:06 am

    I graduated college with a Computer Science major, and by the time I picked up my diploma I had learned C, C++, COBOL, FORTRAN, HTML, Icon, Lisp and MATLAB (reference: I graduated in 2007). Since then I have also picked up Python, SQL, JavaScript, CSS, and am picking up ActionScript. Everything I know about game design, on the other hand, is “self-taught” from reading endless amounts of game design books, playing tons of games, and reading lots and lots of interviews from world-renowned game designers. That’s my credentials, here is my opinion:

    Game designers need to understand the limitations of their target hardware and its resources when writing the game design document. They need to understand that programmers cannot make their games do everything. Programming is not something to take for granted: they can’t take relatively vague rules and program, granular detail in game design documents are necessary to prevent some of the finer details of the game from getting lost in the transition between paper and code. (It’s 2 in the morning, God I hope it makes as much sense in text as it does in my head)

    I know of several points in my software development career – very relevant to game design – where ambiguous directions prevented us from continuing test runs and had to wait days for the documentation maintainer to clarify these details, and we’d end up working overtime shifts to keep up with deadlines.

    Good luck in your endeavor. I certainly hope you are able to put what you learn into action with your new project.

  8. null permalink
    December 13, 2009 7:44 am

    I purchased this book a little over a month ago. I don’t recommend it unless you have no experience doing any kind of programming. Even then, there are better beginners books like the Sams 24 hour book. Maybe it’s a good book to get your feet wet in C++, but useless otherwise. I’m not spending 10 minutes writing out reasons why this book should be avoided. It’s not worth it.

  9. golergka permalink
    December 15, 2009 5:18 am

    As a gamedesigner, I’ve experimented with various languages and platforms, and I find “game” engines like Unity and Torque best for prototyping. Of course, C++ gives you much more flexibility and freedom, but creating the most simple game mechanics can take HOURS with C++, while with Unity you can do that in minutes.

  10. December 19, 2009 3:50 pm

    Based on advice and personal experience, I’d say it really depends on what you want to do as to what language to start with. Serious programming has a benefit from starting with C. The reason is that Java holds your hand and tries not to let you get your hands on any rope, C++ holds your hands and lets you at the rope and C gives you the rope, shows you how to tie a noose and says, “Have Fun.”

    Just one example of this is that if you get used to handling memory in C, you are not as likely to have memory leaks in your other programming. This is because you have to do it all manually with dynamic memory allocation and deallocation. There is no automatic garbage disposal or object destructor functions.

  11. mentalradiation permalink
    December 29, 2009 12:21 am

    As a game artist and not designer, I’d rather learn a scripting language like Python… I think I might be required to take c++ though and blehh, I can only hope it’s an extremely basic class…

  12. December 31, 2009 6:49 pm

    Good luck! But game programming might be highly specialized with a lot of cool asset creator software and stuff. Make sure you don’t miss out on the basics.

  13. February 1, 2010 12:56 am

    Good luck in your endeavour! Remember, C++ is an acquired taste.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: