A Guide to Higher-Education for Aspiring Game Programmers

DISCLAIMER: I wrote this piece for a South African Game Development Magazine prior to leaving South Africa. It has been some time since I send the piece in for copy-editing and have heard nothing back regarding it so I’m simply going to post it here. The topic is a matter of some debate and the below article is simply my personal opinion! It was mentioned during the initial review by the game development magazine that certain sections of this article are rather inflammatory and we had agreed to remove them from the final piece. Seeing as this is my personal blog I figured I might as well post the entire un-edited version.

Once Again this is simply a personal opinion and should be taken as such!

Introduction

When asked to write an article for a local game dev magazine, I was initially apprehensive as writing is not exactly a strong point of mine. It was only once I realized that the article might actually benefit some prospective game programmers that it was well worth the effort. That being said trying to find a topic for the article proved quite challenging. My initial plan was to write a brief article describing the basics of vehicle steering and waypoint following. That idea got scrapped once I built a simple test bed and I realized that I don’t know nearly enough about physics of car motion to write an in-depth article on the topic.

While I was still deciding on a topic, huge discussions (read arguments) started popping up in various game dev communities I followed, all based around the same theme – education:

There seems to be quite a lot of debate on what prospective game programmers should study as well as what current college curricula should include. The most common questions still being asked by prospective game programmers are: “What do I need to study to become a game programmer?” and “What do I need to do to help me land a game industry job as a programmer?”. It is these questions that I wish to address in this article. Continue reading “A Guide to Higher-Education for Aspiring Game Programmers”

A wannabe game developer no more

So after all these years of hard work, I’ve finally managed to get into the game industry and into a well known AAA studio to boot. I’ve accepted an offer from IO Interactive (Hitman, Kane & Lynch) who are based in Copenhagen, Denmark. I will be moving to Denmark and starting at IOI in August!

This whole thing still feels a bit like a dream. I cant believe that I’ve finally managed to achieve what honestly felt like an impossible goal when I set it all those years ago. I guess it goes to show that with hard work anything is possible. As excited as I am, I cant help but feel a bit nervous. I’m a little fish getting thrown in the deep end. Then again, I dont think I’d want it any other way. I’ve been dying to improve and to learn and I’m finally going to be working with people that I can really learn a lot from and I honestly cant wait for that!!! To everyone that’s helped me along the way, you know who you are, thank you so much! I honestly dont think I’d have gotten this far without your encouragement and support.

On the downside, I dont know how active this blog will be once I start working but I will do my best to try and keep the content coming. Game dev blogs have been a huge help over the years and I would love to be able to pay the favor forward!

A Robust Explosion Hit Check Technique

In a recent technical interview I got asked the following question: “if an explosion occurs i.e. from a grenade, how would you determine which characters in the game are affected”. This was a question that I couldnt answer at the time which annoyed the hell out of me and it’s been sitting in the back of my head for the last few weeks. So I decided to discuss it (and my proposed solution) on my blog as an “academic” exercise. I would really appreciate any feedback or comments on this discussion. This is far from being a solved problem for me and while my solution may potentially work quite well, there may be a simpler technique available which I don’t know about.

Coming back to the question. Well the naive answer to that question is to simply do a collision detection check with the explosion area of effect/blast radius (sphere) and any nearby characters’ bounding boxes. Continue reading “A Robust Explosion Hit Check Technique”

DirectX10 Tutorial 10: Shadow Mapping Part 2

This is the second part of my shadow mapping tutorial (find part 1 here). I am going to discuss some of the issues of the shadow mapping technique as well as some basic solutions to the problem. I’m also going to attach a demo application, in which you can play around with some of the shadow mapping variables and techniques. I do have to mention that the demo was a very quickly programmed prototype. It serves its purpose as a demo application but I dont advise cutting and pasting the code into your own projects as a lot of the techniques used arent exactly optimal. Not to mention that I did take a few shortcuts here and there. Continue reading “DirectX10 Tutorial 10: Shadow Mapping Part 2”

DirectX10 Tutorial 10: Shadow Mapping Part 1

I’ve had some downtime lately and seeing as I wrote a basic shadow mapping demo, I figured I’d write a short tutorial on the theory and implementation of shadow mapping. Shadow mapping is one of those topics that tends to get explained in a overly complicated manner when in fact the concept is rather simple. It is expected that you understand the basic of lighting before attempting this tutorial, if you want to learn more about some basic lighting models please read my lighting tutorial. The figure below shows a sample scene with a single light illuminating a cube.

How shadows are formed

Continue reading “DirectX10 Tutorial 10: Shadow Mapping Part 1”

Experiences with Interviewing So Far

So I’m currently looking for a job in the game industry, location and salary are secondary to the work at this point. I kinda just want to get out of South Africa and work on something cool. I’m still young enough not have to worry about supporting a family, stability or dealing with crunch time, I kinda just need a chance. I’ve spent the last few weeks sending applications, writing programming tests and interviewing. And to be dead honest, I’m kinda starting to lose a bit of faith in myself and my chances of landing an entry level game dev job without any game experience.

Now before I carry on with this post, I need to just say that I, in no way regret any of the interviews I’ve had, I’ve learned something from each and every one of them. It’s actually been kinda fun even though I felt like a complete idiot a couple of times (I tend to be really hard on myself). The programming tests were a lot of fun and one plus is that I’ve passed all the tests I’ve written. Continue reading “Experiences with Interviewing So Far”

Optimizing the A* algorithm

So I’ve recently completed my MSc thesis on video game pathfinding and I guess it’s a little weird for someone who spent the last year focusing on game AI and pathfinding to not actually spend much time blogging about it. I figured that I spent the time today and write a short post on optimizing the A* algorithm. The A* algorithm pretty much sums up video game pathfinding as a whole. Even advanced techniques like hierarchical pathfinding algorithm make use of A* in searching the various abstraction levels.  So today I’m going to just discuss optimizing the algorithm, not a low level implementation but rather the some of the high level issues. I’m assuming that readers will have some degree of familiarity with the A* algorithm so I’m not going to waste time explaining it.

A*’s computational cost is primarily divided between two components, the heuristic function and the open list and so these are the components that I’m going to focus on. Continue reading “Optimizing the A* algorithm”

Completed Undergraduate Computer Graphics Course Slides

So I finally managed to complete the undergraduate course slides. I know I wanted to get them completed by the end of December but things didnt really go according to plan.

The slides are available here: https://takinginitiative.net/computer-graphics-course-slides/

These slides cover the entire graphical pipeline from start to finish in detail. They are intended for a modern computer graphics course using the D3D10 API and HLSL. The amount of information contained within the slides is quite significant and to my knowledge there isn’t a single other place online with a more comprhensive coverage of computer graphics theory.

So whats the point of putting up these slides, well they are catering for two types of people:

  • Lecturers – if you wish to modernize your undergraduate computer graphics course or are tasked with presenting such  course, these slides are a great starting point. Hell, if you want just rip them off completely. 😉
  • Hobbyist Graphics Programmers – if you want to learn more about how computer graphics are programmed, GPU architectures or the basics of texturing and lighting.

Anyways, I hope you find the slide useful. This is my last semester as a computer graphics lecturer nd so I figured that there is no point letting all my work go to waste when someone can still get some sort of benefit from them.

Enjoy 😛

Debugging HLSL

A lot of guys have asked me for advice on developing and debugging shader programs. Well, it’s a tricky topic to deal with. Tto be able to fully debug shader programs you will need either a shader IDE like FXComposer or a GPU debugging tool like Nvidia Nsight. These are both complex tools and beyond the scope of a quick tutorial but what I can do if provide you a quick guide to aid you in writing shaders directly within Visual Studio. You will not be able to perform any sort of in-depth debugging, but it will help you deal with silly syntax errors. The first thing need is NShader. NShader is a shader syntax highlighting plugin for visual studio and helps with clarity when editing and writing shader programs.

The second thing is to create a custom build step within Visual Studio for your shader programs. This custom build step will use the MS shader compiler to compile your shader programs and notify you of any errors as well as tell you on which lines the errors can be found. To do this, we first select our shader file and right-click then select properties (see figure 1 below).

Figure 1: Shader Code File Properties

Doing so will bring up the properties windows, the first step is to ensure that the configuration drop down is set to “all configurations”. The select Item Type and choose “Custom Build Tool” from the drop down (see figure 2).

Figure 2: Enable Custom Build Tool Step

Click Apply, this will then show the custom build menu tab on the left hand side. Select the tab and you be presented with the following dialog window:

Figure 3: Set Custom Build Tool Parameters

Under the general heading, set the command line value to the following:

"$(DXSDK_DIR)Utilities\bin\x86\"fxc.exe  /T fx_4_0 /Fo "%(Filename).fxo" "%(FullPath)"

This will mean that every time the shader file is modified and the solution is compiled, the shader file will be compiled using the microsoft FX compiler (FXC). The /T flag specifies the type of shader file being compile (i.e. the HLSL version). the /Fo flag refers to the compiled output file and the %(FullPath) macro refers to the full path of the current shader file.

Also set the Custom Build Tool outputs to: $(filename).fxo , this is the same as specified in the FXC commandline. Click OK, and you are done.

The results of the this process is shown below, all HLSL errors will pop up in the Visual Studio Error Dialog, double clicking on the error will take you to the line of code that caused the error.

Figure 4: The results of the Custom Build Step

I’ve wasted a ton of time attempting to find silly syntax errors when developing shader programs, and this little custom build step has been a great help. I hope it helps you in some way as well…