Game Programming Patterns

While continuing to refresh myself on the finer points of C++ after years of C# development, I came across Game Programming Patterns from Bob Nystrom. If you’re a new developer, or even an experienced developer, it’s a good idea to refresh yourself on patterns from time to time. I’m just starting the book, but so far the style is enjoyable and I’m looking forward to shift in perspective coming from web apps.

Additional Resources:

C++/DirectX and Linear Algebra Tutorials

Main Course: While I will be focusing on using an engine like Unreal Engine 4, there are also many tutorials out there that start from scratch and work at a lower level.  One such series is Introduction to C++ and DirectX Game Development Jump Start put together by Microsoft. Obviously, this will be focused on Windows Store development, but they cover some general concepts that apply to any platform. The intro, in particular, brings up some great questions that you should ask yourself when starting the development process.

Dessert: As they mention in the tutorial, linear algebra knowledge is pretty important for video game development. This is especially true if you are looking to develop your own engine. If you need a refresher, this series from Wolfire gives some great information with a focus on video gaming.

Starting the Video Game Development Journey

After spending over 8 years as a software developer in the enterprise space, I decided that it was time to start doing something that I’ve always wanted to do: develop video games.  I am starting this process via Fiddlesaw Studios as a hobby, and am excited to see where the journey will eventually take me. I will be writing articles here detailing resources that I find along the way. Eventually, when I get a working prototype or complete game ready, I will transform the site into more of a showcase and post those projects here.

To start, I will be working with Unreal Engine 4 and putting together a few rough prototypes before deciding on a final idea. I also looked into Unity 5, and will likely investigate it further after working with Unreal Engine for a while. Both engines have a great feature set, but I initially went with Unreal for a few reasons:

  1. I have prior experience with C++, so the coding standards are right up my alley.
  2. The pricing model makes it easy to start prototyping with the full engine. The trade-off comes with the 5% fee that gets collected from revenue vs a flat fee or subscription model that Unity offers.

As I continue working with the engine, I will post other thoughts here. For now, here are some of the resources that I am working through to get started:

Learning Software Development Skills

In this post, I will try to answer some common questions from folks that are starting to learn programming. To let you know where I’m coming from, I’ve been doing software development and IT work since 2006 after graduating with a degree in Computer Science. The languages that I use most at work these days are C# and JavaScript for web development, but I am also familiar with C++ (my first language), Java, Go, and PHP. With that in mind, let’s get started with some questions.

What do I need to start programming?

This is one question that sounds simple on the surface, but it’s one that brings a multitude of different answers and probably more questions as you dig deeper. Really, the only thing that you need to start programming today is a strong desire to learn about computers and how they tick. Of course a computer is helpful, but you no longer need a high-powered workstation to with learning most computer languages these days.

An aside: The biggest piece of advice that I can give is to make sure that you are getting into the field because you genuinely love working with computers and technology. Don’t get into the field only because you want to make money. While it is definitely possible to make money in the field, having that as your primary motivation will probably bring more misery than anything else.

What Programming Language should I Learn?

In the long-term, I’d tell you that learning the techniques and theory behind software development are more important than picking a specific language to stick with for your entire career. If you have a firm grasp on those base techniques, then it should be relatively easy to learn a new language as you gain that experience.

In the short-term, you’ll have to pick one or more languages to get started with. There are a lot of “robust discussions” about which languages are best to start with, but I will give my opinions here:

C++ – I started with this language, and I think that it’s a great language to learn about functions, pointers, classes, and other object-oriented language techniques. Be prepared for a steeper learning curve than a language like Python, but C++ is lean enough to run high performance applications (games for one).

JavaScript – If you want to get into front-end web programming, then JavaScript is a good place to start your journey. If you find a web page that does AJAX calls or client-side form validation, it will be running JavaScript.

C#/Java – These languages build on the concepts of C/C++, but also provide very high level libraries for performing functions like string manipulation, cryptography, network access, and many more. With Microsoft recently open-sourcing the .NET platform and creating a free community version of Visual Studio, I personally like C# over Java. However, if you’d really like to get into Android application development, then Java may be a better choice. Google also makes heavy use of Java for their server apps.

Python – I’d be doing you a disservice if I didn’t mention Python as good starter language. Often used for scripting, the language can teach you many of the concepts mentioned above. The syntax is not a C-style syntax, so you will need to learn those differences if moving to another language in the future (brackets vs indentation for one).

OK, What Software do I Need?

Notepad, done.

No, the answer really isn’t that simple, and it depends on which language you are going for. At the very least, you’ll want a good text editor like Notepad++, Komodo Edit, or Sublime to edit your code files. If you are a Linux command-line guru, or don’t mind a steeper learning curve, then you can give vi or Emacs a try as well. As you move to bigger projects, you may find that you want a full environment, called an integrated development environment (IDE), to help manage your projects.

My favorite IDE is Visual Studio, which can be used to develop C++, C#, HTML/CSS/JavaScript applications right out of the box. I have linked the free Community Edition above. Other IDEs include Eclipse (Java, also highly customizable), Android Studio (for Android apps), and PhpStorm (for PHP).

Now that I have the tools I need, where do I start learning?

There are many free resources available online that just weren’t around when I started learning software development (get off my lawn?). One incredible resource that has sprung up over the last few years is Code.org. They have a wide variety of tutorials that covers all age ranges. They also have resources that help guide you to the many other classes that are out there. I have listed a few other resources below that may help on your quest:

CodeAcademy – Their free interactive tutorials provide a good way to learn web programming basics. The best part is that everything is browser contained, so you won’t have to run out and install a text editor or IDE right away.

Free University Podcasts – If you’d like to see how a university approaches Computer Science classes, check out these podcasts from Harvard, MIT, and Stanford. This isn’t an exhaustive list, but should be a good place to get started.

Stack Overflow – Once you get started with software development, you will undoubtedly have questions.  This is still my go-to site for all questions, basic and advanced.

What next?

Go forth and program! Feel free to ask any questions below, I’ll be glad to answer them.