views:

829

answers:

16

I've written desktop applications using Delphi and VB6 and I've written web applications using Java and Ruby on Rails, but I've never tried my hand at game programming. Do you think it's something that every programmer should try at least once in order to broaden their horizons?

Whenever I've read about game programming it seems to be a quite separate and alien world from what I'm used to. I'm talking about the logic of making a game engine, not the intricacies of graphics programming (although I haven't done that either).

Do you think that at least attempting game programming is beneficial for every programmer, or is it too specialist? I look forward to reading any insights you have.

+30  A: 

If it interests you, give it a try, otherwise, don't.

samoz
+1 Best advice givable.
Chris Lutz
The programming of the game engine in itself will be similar to a lot of stuff you have seen before. The hard part is the graphics, AI and game play fine tuning (sometimes it seems impossible to get a realistic feeling).
JC
This answer is a little too obvious, isn't it?
Steve Wortham
@TheSteve Not a fan of Occam's Razor?
samoz
Occam's Razor has nothing to do with stating the obvious. :)
Yohnny
Well, it's good advice and a decent answer I suppose, except that it doesn't provide any information whatsoever on the subject matter. I just don't understand why it's the top answer. StackOverflow confuses me sometimes.
Steve Wortham
+4  A: 

If it is fun why not try it out? You'll learn some stuff about graphics that you have never thought about and who knows, you might end up as a 11 hour/day game programmer at the same salary you make now!

Byron Whitlock
Why the downvotes? I've actually worked as a game programmer. The smartest people I've ever met, but I didn't like the crazy work hours, especially during crunch time.
Byron Whitlock
+5  A: 

"Every" programmer? No.

Most programmers, yes, would likely benefit from some exposure to the types of calculations and decisions that need to be made for good game development. However, be aware that not everyone has the same career goals or interests as you, and as such, the crossover skills will vary, as with any endeavor.

sangretu
+4  A: 

I find that doing some game programming has helped me look at some problems in a different way. Especially ways to implement game AI (in my case simple board games) may spill over into how to solve problems in non-game projects.

Fredrik Mörk
+1 This was definitely true for me.
Dinah
+1  A: 

I think you already answered your own question. You seem interested in it, so why not try it? As you say, at the very least it will broaden your horizons.

A cool place to start might be XNA, a C# framework that you can use to create PC and Xbox games. It takes away a lot of the less interesting infrastructure stuff, so you can focus on the engine (and on the graphic design :) ).

jqno
This looks really cool for a side-project...
Egg
+2  A: 

Trying your hand at game programming briefly, at least trying to build a small game (or even just part of one), or perhaps a simulation of another kind can be very beneficial to your general development as a developer, but I wouldn't go so far as to call it a requirement.

Williham Totland
+3  A: 

I can't say I would recommend that every programmer try gaim programming any more than I would say that every developer should try middleware programming, business operations programming, web programming, control system programming, digital signal processing, or any other domain specific focus.

It depends entirely on if it is something that interests you. If it is something that you find enjoyable go for it ... you can always learn something new by venturing into new territory, particularly when it is an area you find interesting. If it doesn't interest you, then don't, you won't get much out of doing something {on your own time} you don't find compelling.

James Conigliaro
+1 - Exactly. I would even take it further than having an interest, but to the level of having an aptitude. I have noticed that people, in the personal projects, don't just work on what is interesting, it is truly something that they are passionate about. For one person, it *might* just be gaming, but for another it might be something that is completely unique.
joseph.ferris
+2  A: 

I do think game programming is a good idea for learning a new language, but I'm talking about putting together something like a Tetris implementation or a simple card game.

The reason these are good exercises is because you already know the game rules inside out, so the requirements are clear to start with, and you don't have to spend (too much) time thinking about what you want the game to do, just how you want to do it. My first foray into pretty much every language I've learned has involved making some sort of game.

Actual games engines are way OTT for most programmers to have to get to grips with and I don't think the techniques involved are that usefully generalised to other domains.

Vicky
A: 

I don't think any form of programming is too specialized to be of some use. You're bound to learn techniques that you can employ elsewhere in "unrelated" capacities.

Spencer Ruport
+2  A: 

Should every?.. No shouldn't. But if you want - go ahead. There's nothing more important that to do what you like.

Kirill V. Lyadvinsky
+1  A: 

It will definately broaden your horizons a bit.

The fact that everything you program for a game goes into a massive loop certainly changes some of the ways that you need to think about things.

It was/is definately beneficial for me (I do not plan on becoming a game programmer). The fact that when you've finished, you've produced a very tangible, interactive program makes it pretty easy to motivate yourself.

I would say it is never harmful to expand your horizons and would be very useful even if you don't use any direct game programming techniques in your future career.
But many non-game companies use game technology every day for very important physics simulators and the like, you never know when you might need to whip some game programming out.

Not to mention there are a ton of resources out there to learn from and SO.

So your answer is yes.

Victor
A: 

game programming is interesting and it can "exercise" your brain :D

it is fun .. try it ... you can did that with VB or Delphi, it is pretty easy to do and fun.

right now, if i got bored, i did a practice using javascript to create simple animations.

nightingale2k1
+3  A: 

For me it was quite the opposite. When I first started programming at age 12 my goal was to learn as much as I could about animation and game programming. Then when it came time to get a job I went another way and became a web developer.

Perhaps I'm biased, but I do think game programming is the most fun I've had writing code and is a great way to learn new concepts. It presents interesting challenges too. There are all sorts of computer science concepts that must be applied as you get into more & more advanced games, animations, and effects.

And then there's one aspect of game programming that I think we can all relate to on some level. And that's the necessity to optimize the crap out of everything to maximize your framerate. That, as it turns out, was probably the single most important skill I learned from it. That kind of optimization knowhow can be taken and applied to all kinds of programming. And it's still to this day a valuable skill to have in my day to day job.

Speaking of optimization, game programming can be done in all sorts of languages. But I'd suggest Visual C++. It's still pretty much the defacto standard for most games developed today because of its speed. And there will be plenty of C++ examples out there done in Direct3D (Windows) and OpenGL (cross-platform). I went the OpenGL route and went on to create gldomain.com when I was in high school, but it's your choice.

Steve Wortham
Oh, I have an assignment for you, should you choose to accept it. After you get started, try making a gravitational N-body simulation ( http://en.wikipedia.org/wiki/N-body_simulation ). This was always one of my favorite exercises. It's relatively easy after you build your first particle engine, and yet there are so many opportunities for optimization.
Steve Wortham
+1 for learning how to optimize. When you're writing a game, you have to think about performance. 97% of programmers (especially web programmers) just assume that processors are so fast that it doesn't matter, they don't consider the implications to scalability. When you're a game programmer, every cycle counts! I wish more people would think that way.
Seth
+1  A: 

I don't think engine development is an alien world to the non gaming developer, it is just a different application of the same principles with a lot of optimization required.

The graphics is where it can get a little more in-depth with new concepts that you may not deal with on a non-gaming related project.

My advice would be to try out something like the XNA Framework if you want a more code based approach to developing something or go with something like Game Maker if you want to just try your hand at developing something to play while abstracting away the graphics. You can even really abstract away the graphics and recreate a board game with ASCII graphics. I remember back in CS 101 we made Battleship using the Curses library. Recreating an existing game is nice because you have a foundation on which you can test different implementations of the engine and compare the performance of each.

A fun aspect of it for me is the AI programming. Creating something challenging to play against even when you programmed what it will do is very rewarding.

amarcy
A: 

Should every programmer try game programming? - John Topley

The answer is a resounding yes. The keyword is "TRY".

Game programming will teach every programmer various aspects of software development that they may haven't considered yet.

Game programming is a much challenging project.

I think game programming encompasses almost all kinds of programming.

Tell me a project that games may haven't?

Games do not merely end with the visual interface. You may probably need to build an e-commerce site and reliable database design as well.

Look at the jobs offered at Blizzard. If you don't know Blizzard, you would think the jobs aren't game related, but all of them are.

Mark Serrano
+1  A: 

I found my time working on game mods as a programmer (using UnrealScript) pretty invaluable once I stepped into the world of apps programming with C#. The structure of most game scripting languages is common with at least one major language (lua, ruby, python, and c#/Java all share common structure with at least 1 major game scripting engine). Working on mods forced me to think very concretely about state, subclassing, and input processing.

As a reward for doing so, I had the chance to contribute in a concrete way to very dedicated communities. I have yet to find another programming community that is as welcoming as modding tends to be.

Mike Burton