Switch Lights

The lights are on

What's Happening

Programming Games Is Really Hard

College can be cool sometimes. There's a lot of work and tests involved, but occasionally you get to take interesting classes. This semester I'm trying my hand at programming by taking an introductory-level course on programming. It's nothing complicated. The stuff we write would have been laughed at in 1975. It's simplistic.

We're learning the basics of Java and object-oriented programming. That probably won't mean anything to people who don't program (in fact, non-programmers can skip this paragraph). Those of you who do know programming or work in IT, you can laugh at me. My programs still run from the command line with String[] args and use simple input/output. A typical assignment in class involves putting together a .jar file with maybe five or six classes that are linked in some way. We don't even use Eclipse... class is taught in jGrasp, an IDE that's geared more towards beginners and students. To date, I think my single longest method was 147 lines. We just finished implementing exception handling for the first time.

The program I use for programming

Non-programmers still with me? Good. The point of the last paragraph was that I am learning how to write code on a small scale. The most complicated game I could create is probably a short text adventure.

Taking this class gives me a hell of a perspective on programming. I spent about three days trying to write, compile, and debug a program that was around 800 lines long. It was difficult and required most of each day. Unreal Engine, the driver for most modern console games, has more than 2 million lines of code in it. And that's just the engine. It doesn't even count all the code the developers write in addition to Unreal for the specific game.

Modern video games are huge.

This might seem like an obvious realization. Sprawling virtual worlds like the Capital Wasteland and the Citadel don't create themselves. Of course large video games would require a lot of programming. However, this is like looking at a mountain from a hundred miles away. You can tell it's large, but you can't really get a sense of its scale without getting up close. Writing simple programs is to me like moving closer to the base of a mountain of code.

Creating virtual stuff takes an amazing amount of work. Consider the simple dialog selection, like in Mass Effect. You have to write code to play an audio file (probably a question from an NPC), display the correct subtitles on the screen, and present the user with a menu of choices. Each choice has to be correctly labeled and perform the appropriate action when selected. The game also has to record the user's choice and add appropriate Paragon/Renegade points.

After writing this theoretical dialog selection, you have to go through the code to find the errors. Programs often contain hidden problems, referred to as "bugs." Debugging can be lengthy and tedious. You have to do every possible action to make sure that everything works... and things rarely work as they should.

That's not all. Simply having a game without glitches is just the beginning. Once the game works, then you have to start worrying about all the things that the players see. Is the game fun? Is it balanced? How's the pacing? Are the mechanics unique? Is the difficulty right? It's like a whole new level of work atop the monumental achievement of creating a working video game.

The worst thing in the world for a developer is to make a mediocre game. Imagine working for a year painstakingly writing line after line of code building a virtual world for the player, debugging that world, making sure that everything works, finally releasing, and then eating middling review scores. That would frustrate the hell out of me. "This isn't mediocre!" I'd shout. "Instead of looking at the broken stuff, look at everything that does work!"

BioWare has to be furious.

So as you play a game this week, take a moment to appreciate the stupendous work that went into creating it. Try to think of all the time and effort that the developer spent building a bit of software that you might complete in a few hours and never play again. If you're feeling up to it, send a thank-you letter to your favorite developer telling them that they did a great job. Developers appreciate their work being appreciated.

It's crazy how much work goes into creating games. We should make every effort to thank developers for building such entertaining creations.

What do you guys think? Do you ever think about how complicated games are? Does anyone work in IT and feel like laughing at my primitive Java programs?

Comments
  • I took a programming course in middle school and remember having great difficulty with making a window open with a click-able 'enter' button. I commend you for your endeavors. Creating good games is always a team effort, and it's awesome that you're learning that at this point in time.

  • I entered college looking for a degree in Computer Science. My dream was to work for developers like Bungie or Bethesda and help them create games for a living. I guess I should add a disclaimer that I had never done any previous programming before college, my high school doesn't offer it, which is very surprising considering the way technology is going. I learned very quickly that if you want a chance at doing well in programming in college, you have to have some previous experience. My first year was okay, pretty much what you're going through right now. Just creating shapes and objects in Java and making pretty pictures. Create a line that follows you car object, and you can direct where your car goes, fun stuff! With programming, you have to break the problem down into it's the most simple terms. I wasn't used to thinking in this type of way. Second year was much more focused on moving and creating files. Put them in order and search through the for certain keywords. I could tell I was falling behind. Programs would be assigned every week and would take at least 10 hrs of your time. This was pretty much all I did Freshman and Sophomore year. During Spring of Sophomore year, my next CS class entailed moving around bits and manipulating computer level code. I didn't even know what a byte was back then! I switched into computer engineering and am much happier, but I would have to say that engineering is more time consuming. In computer science I was lost, at least in engineering I somewhat know what I am doing, and have always been a math guy. I just wish someone would have told me that I needed a background for programming before entering college. Granted, if I worked hard enough, I probably would have gotten by, but put on top of that physics and math courses, and you have a lot on your hands. Luckily with engineering, it is a very diverse field, and I could literally end up doing pretty much anything. Maybe one day I can get back into programming, or even try to teach myself. Moral of story: programming is hard!
  • Having never programmed anything, ever, I have to give props for developers, translating code into a playable game must be hell. And going through hell only to be told your game is mediocre and terrible must be the worst feeling in the world.
  • I took a basic programming class as well freshman year just to check it out and I was confused the entire semester haha.

  • And because of the serious pain of programming, full engines, such as Unreal, are an invaluable tool in the industry. Yes, the development of the engine itself is a painfully tedious task, but it greatly shortens the time of future development. Plus there are MANY additional applications that cut the time of development by large percentages. The creation and/or placement of trees in a game like Skyrim, Risen, or even Unreal Tournament 3, is cut to almost nothing with the help of Speed Tree. NaturalMotion's Euphoria with Rockstar's RAGE engine to create the amazing physics and AI interaction with the physical world would have taken forever from scratch, but having the engine and Euphoria keeps the work down quite a bit. Not saying it's not hard work with applications like those, but it all helps and the video game industry wouldn't be so large if it wasn't for the people who programmed those helpful shortcuts. I mean, UDK can be used to make some simple games without ever really needing to much coding. Though, many devs do much more and add tons of code ontop. Then there are those that do actually do it from scratch. I don't believe Minecraft was done with anything outside of Java, and many indie games built within the XNA framework are scratch-made. XNA is a great tool as well. It doesn't offer any shortcuts, really, but it helps streamline the coding process and provide a good environment to develop in. :| I've been into this too much lately, so I kinda just spewed out a lot of it. But yeah, it ain't easy, even with the helpful tools that are out there. The fruits of the labor taste so sweet, though.
  • Mod
    Funny, it's 2am and I just got back from spending most of the day in class working on my final programming project and this blog shows up. I'm a CIS (Computer Information Systems) major. I guess you could say it's a major that combines business and computer science. The programming we do is mostly towards web design and I love it. Anyways, I agree with you programming is hard, but it's also very rewarding. I like to think of it as a puzzle and it's frustrating trying to get that puzzle to work, but when it does it's an awesome feeling. I guarantee you anyone that has studied programming would never laugh at a beginners code. After all, the best developers of today had to start somewhere too. It's all about experience and building upon what you already know. Good luck in your class and remember that Google is a programmers best friend. :)
  • CS- exactly what I am taking for college. Good luck, it's pretty tough.

  • I'm a computational science major which is a mix of computers and science. Next semester I am taking my first programming class, but my freshman seminar is doing some Visual Basic and already I can see how frustrating it must be for larger programs. There's always someone in class who gets stuck and it turns out they just forgot to name their form or something.

  • I've always known it takes some serious time and effort to do everything involved in games. Programming and all. But this was nice and insightful about it.
  • I'm a multimedia major and I'm currently working on my Flash final. The only coding I've had to work with was in Actionscript, and it's a pain in the ass. I'm not completely lost, but I'll usually get to a certain point of understanding, and everything will fall apart once I get stuck. It was the same way with my into to multimedia course two semesters ago.
  • I always appreciate games from a design perspective, merely because I've tried my hand at programming for a time, and it is really hard to nail down (and my heart goes out to indie devs with few men and women to do all of that hard work). Oh yes, it is a pain in the rear. But well worth it when done properly.

  • i wonder how much betesda has to do with games like skyrim
  • Indeed, modern video games are HUGE. It takes a team of 100 developers and 30 designers to finish a one year release of FIFA game.