Game programmer

Hey,

I actually put this on my board but since there are 5 registered users I imagine I won’t get a lot of feedback.

I’ve been programming a bit lately to get back into the swing of things and am taking things slow. However, my ultimate goal is to get into game programming of some sort, if for nothing else to just have fun. In fact I’m planning on programming an old school RPG as my first project (think final fantasy 1 or phantasy star 1/2).

Since I’ve got some time off coming up next week I was thinking of trying to burn through some basic stuff to get to the more interesting topics. I understand the basics of coding and have worked designing exciting accounting products before, so my studying in console/basic windows programming is a brush up. What I haven’t done before is any real game programming (graphic/environment especially).

Are there any good books out there? We’re talking about me being a beginner in that field and I want to get to a more advanced level (from a beginners level).

Any suggestions?

Jason, which languages, tools and libraries are you thinking of?

For C++ and DirectX, the DirectX documentation has a number of tutorials and samples to get you started. It will almost certainly have some for other languages as well (C#, VB, etc), but I haven’t checked. However, you’re relatively new to programming and DirectX can get fairly complicated, so depending on your desired learning curve you might want to check out a “hobby” game programming library of some sort.

At current I’m focused on C++. I imagine DirectX would be the way to go and I’m using Visual Studio 2005.

I completely put the title of this thread as programmer instead of programming and now I can’t edit it. CURSES

Lars (game programmer for 17+ years, whoa, he’s old!) sez: he, and every game programmer he knows, started with the K&R C book. Once you know C++, the Effective C++ book and Code Complete will teach you good habits. He found some useful things in this RTS book. Yeah it’s outdated, but if you can pick it up for a few bucks, you can’t really go wrong. Stuff like pathfinding hasn’t changed much.

Feel free to email me if you have any C++/game programming/getting started questions or need any help, I’ll pass it along.

Excellent suggestions Sparky. I may have some more questions for Lars later. I’m going through a book at current (this Ivor Horton WROX book) and what Lars suggested looks pretty good.

As a side note, the RTS book link goes back to the K&R book

Whoopsie. It’s Real-time Strategy blah blah Direct X 6.0 (yes, old book) etc. by Mickey Kawick

You know, most of the game programming books I’ve seen have been utter trash. They don’t actually teach you anything. They show you how to do some very specific crap without explaining underlying concepts and ultimately are a big waste of time.

The only books I’d recommend are the Game Programming Gems books, and the AI Programming Wisdom books. Both are good. They aren’t however, for beginners. They assume you are already a solid programmer with at least a little experience in the topics that they cover.

For APIs and such, your best bet is honestly to just go with shit available on the net.

As for programming itself, K&R C is where it’s at, followed by The Annotated C++ Reference Manual by Bjarne Stroustrup.

There’s really nothing specific about game programming other than it being realtime that makes it different from other programming. It’s all about managing your data. Learn to program and then the games part is pretty easy. Learn to put a sprite on screen and you are done; everything else is just permutations of that.

Ok, I can dig that. I suppose I should look at the STL and DirectX?

I agree, and that’s why I didn’t mention them. :)

There’s really nothing specific about game programming other than it being realtime that makes it different from other programming.

…but I disagree with this. Compared to, say, applications or embedded systems programming, there are very different priorities - and challenges. Things like memory usage, optimization, streaming assets, combining all the different parts like audio/AI/graphics/video/input devices/networking/realtime events, etc. Yeah, the fundamentals are the same, and you still have to learn C++ like everybody else, but after that you learn by, well, making games.

Jason: Yes, you’ll need to learn STL and DirectX, but at this point in your studies they’ll pretty much go right over your head, so don’t worry about 'em yet.

Edit: to start inevitable pissing match

I appreciate that I won’t be ready for an intermediate design theory/tip book yet, I’m mostly planning ahead. Maybe I could make an awesome accounting game.

That gems book sounds pretty good. Is is set up as a series , or each volume has more in it then the previous? I know some visual basic , and medium amount of C++. I have a book on python language, is that a good language to learn for game programming?

The Freedom Government just released a game where you get to balance the budget, maybe they need some help?

http://news.bbc.co.uk/1/hi/world/europe/4946496.stm

Yeah, most of the “game programming” books are best ignored.

Also, regarding K&R’s book: I think any serious programmer should have it on the shelf, because it makes a great reference. However, if you really want to learn C++, I wouldn’t start by learning C – you’ll either end up programming “C with classes” (which is certainly conceptually stronger than pure C, but not as powerful as “real” C++), or having to lose a lot of C habits once you get into C++ proper. I recommend picking up Accelerated C++ myself.

This is just my personal opinion, though, and I’m not really interested in a language war. Certainly, “C with classes” is good enough for your project; but I personally think that real C++ know-how is a better investment in the long run.

Finally, if you want to do a simple 2D game, it may really pay off to use a third-party multimedia library. Learning a language like C++ and a fairly complex API such as DirectX at the same time might be a little daunting, and a third-party multimedia library may very well be good enough, in terms of performance and flexibility.

Books: Sparky’s Code Complete suggestion is excellent. If you’re interested in learning C++'s Standard Template Library, I’d enthusiastically recommend Josuttis’s The C++ Standard Library : A Tutorial and Reference, which is one of the best programming books I’ve read, period. If you’re really serious about C++, you should have Stroustrup’s The C++ Programming Language 3E on your bookshelf at some point, though it’s certainly not aimed at beginners.

Yeah but as a beginner that’s not going to be his focus. If you are just puttering around making a game in your spare time, memory usage, optimization, streaming assets, and networking are all things he won’t need to deal with. That’s not something you do as a beginner, that’s something you do after years of experience. Thus the learning by making games bit.

Programming is programming. The realtime aspect is the biggest difference, but it’s also the easiest to learn how to do in a simple fashion. Advanced topics aren’t really important for him right now. No one starting games ever jumped directly to timeslicing AI, or programming a high performance 3d engine with pixel shaded shadows, or macro generated FSM engines.

Nah, they aren’t a series – each Gems book is a collection of unrelated articles (“gems”) by different authors about different topics: AI, scripting, graphics, etc.
The target audience is experienced game programmers.

I don’t know; if it’s anything like the Graphics Gems series it’s a snippet of particular code that’s great if that’s the exact problem you’re trying to solve.

Jason-

When I decided I would be doing much as you want to, I looked for recommendations on all the sites, and got two books recommended that (so far as I’ve read them) I thought were pretty decent overviews. I, of course, haven’t actually programmed anything, so my approach is more one of coming from your end rather than Lars’ or Charles’. But they might be worth a perusal at least:

Core Techniques and Algorithms in Game Programming - Daniel Sanchez-Crespo Dalmau

Game Programming Golden Rules - Martin Brownlow

I think the former is better than the latter, albeit at probably a lower level too. (These are the basic parts of a game, these are some of the design theories that might be useful, these are the basic parts of a rendering pipeline, etc…)

Are you tied to C++ (are you already really familiar with it)? If not, you might consider using something like Python. You’ll get to the fun part of the programming much faster.

Or try C#, which I like – and has DirectX language support.

C/C++ are highly effecient languages – but Python/C#/VB/Ruby/etc are more productive languages, and for a 2D game, probably just fine in terms of performance.

Right now I’m about average in visual basic and C++. I know enough to design some simple programs, nothing of greater complexity though. I might try python, its a book from deitel and deitel. I know a kid from my high school who took the same class as me ,and he designed a smile video game thru it*.

  • C++ not python