GDC 2015 Sitrep

TLDR; It was pretty cool.

The VR talks, in particular Valve VR talk, allowed me to hope that the Vive and the Oculus Rift are going to have a good place in the industry.
It might happen, but like self driving cars, I'm stuck wanting it to happen so much that it's stopping me from being able to tell if it's going to.
Still looks pretty sweet, in my opinion.

DX12 and Vulkan both look to make multithreading the one thing I wished I had already had 5000 hours experience in. So much performance to be gained!

This is the first GDC where I've seen AAA devs /not/ go into how they wrangled the previous gen to eke out every last bit of power from the aging boxes. Didn't stop the one Far Cry 4 talk I saw make it very obvious that we need to drop the old boxes to raise the performance ceiling for AAA back of box features.
I wonder if the consumers will agree.

GDC2015 Prep

A week out, this is probably the most prepared I've ever been for GDC.

My schedule is culled to a decent subset of all the programming talks loaded into gcal, my flight has been booked since August last year (all 3 return flights), my All Access pass has been purchased, and a party or two are lined up.

And I got a new set of business cards printed:

The Citrus Shark logo is the best

The Citrus Shark logo is the best

The front of the card is pretty bland, but that's what I get for not doing it in Photoshop or at least outside of the printers WYSIWYG designer.

And there's a new bit of kit in my loadout: the Crumpler Vis-A-Vis, marking the point that Crumpler has entirely taken over my bags. We will see if the Vis-A-Vis holds up.


Oh boy.

So I listen to podcasts. Lots of Podcasts. It's how I deal with long travel times, particularly on flights, when I get through a large amount of content (thanks 13 hour SYD-LAX flights, not including getting to SYD from PER!).

As a result, I'm constantly looking for more content, and podcasts that have been around for a couple years.

Here's my current list of podcasts I'm subscribed to, in no particular order:

  • Fandible (Tabletop gaming, early stuff needed a better editor and microphone)
  • Critical Hit: A Dungeons and Dragons Podcast
  • Munchkin Land
  • Darker Days Podcast
  • Six Feats Under
  • Zach on Film
  • Freakonomics
  • Welcome to Night Vale
  • Hello Internet
  • Chipod Ironicast
  • Polygon's Quality Control
  • NPR: Planet Money Podcast
  • Blastropodcast
  • Tap Tap Concede
  • Magnum Rewatch
  • Serial
  • Rebel FM
  • James D'Amato's One Shot 
  • This American Life
  • WNYC RadioLab
  • Startalk Radio
  • The Skeptics' Guide to the Universe
  • Idle Thumbs
  • LRRCast
  • Oh No Ross and Carrie
  • HowSound
  • The Pen Addict
  • The Internet History Podcast
  • The Golden Horseshoe Review
  • Our Fair City
  • This American Life
  • WNYC RadioLab
  • Startalk Radio
  • The Skeptics' Guide to the Universe
  • Idle Thumbs
  • LRRCast
  • The Golden Horseshoe Review
  • The Internet History Podcast
  • The Pen Addict
  • HowSound
  • Oh No Ross and Carrie
  • Our Fair City

It's a long list, but travel around (and to, and from) here is longer.

I'm also constantly trying new shows, so this list will be updated

EDIT: Last update to this list 2015-06-20

Blogworks: Work or Play?

Well, this will be an awkward first post for the new site.

My original intention for my blog was going to be a development blog for my personal projects, but my approach to said projects (and, as it turns out, work projects) is more of a 'hack away until done, bottle-necked, or bored', with work only having the former two as an option.

So, where does that leave space for blogging?

If games/game development was my only hobby or calling, that would be it, game over, blog done, time to get back to playing The Talos Principle (which you should play, gushing review TBA).

That's obviously not the conclusion I can deal with, otherwise I wouldn't have attempted to write this post.

So, why not force it? For the next year, the aim is to have more than 52 posts in this blog by this time 2015, which is, as of first draft of this post: 2014/12/31 01:08 GMT+8.

2015 is going to be an interesting year, and I wonder if I'm going to succeed.

I also wonder if anyone will bother reading this, but that will only happen with time and advertising.

Quaternion cameras

Currently using Ogre for one of my final projects at university, it forces you to use quaternions for scene nodes orientations (I don't have a problem with that, in fact my Spear Framework uses Quaternions for orientation almost exclusively).A decent camera class needs to do a couple of things:

Use whatever Mouse/Keyboard event API that is available, be it Win32's RawInput events or GLFW's listener callbacks, and cache input for every mouse move event it gets sent. For keyboard events, store the key state, but you shouldn't need to be told that, right? Set all movement to a vector in the camera class, add or subtract, don't set, otherwise you get errors like pressing both 'strafe left' and 'strafe right' moves you in whatever is lower in the if statement chain, but releasing one direction cancels movement for both! Let's call this movement vector acceleration and the mouse movement vector, at this point in time, Vector2's work well; mouseMoveThisFrame During the camera's update frame, do this, presuming that all angles are in radians (Ogre, HLSL, DirectXMath, XNAMath all use radians, why don't you?):

if (mouseMoveThisFrame.y != 0.0f){
rotAroundX += mouseMoveThisFrame.y * deltaTime * 3.f;
if (mouseMoveThisFrame.x != 0.0f) {
rotAroundY += mouseMoveThisFrame.x* deltaTime * 3.f;
while (rotAroundX >Math::HALF_PI) { rotAroundX = Math::HALF_PI; }
while (rotAroundX < -Math::HALF_PI) { rotAroundX = -Math::HALF_PI; }
while (rotAroundY >= Math::TWO_PI){ rotAroundY -= Math::TWO_PI; }
while (rotAroundY <= 0) { rotAroundY += Math::TWO_PI; }

if ((mouseMoveThisFrame.x) != 0.f || mouseMoveThisFrame.y != 0.f){
Quaternion rotQuat = Quaternion::IDENTITY;
Quaternion xQuat = Quaternion(Vector3(-rotAroundX,0.f,0.f));
Quaternion yQuat = Quaternion(Vector3(0.f,-rotAroundY,0.f));

or rotation, and for movement each frame, if you store your rotation angles (in whatever form) as separate, you can do the following to make the player move along the view direction you so choose:

Quaternion rotateAroundY(Vector3(0.f,-rotAroundY,0.f)); m_velocity += rotateAroundY*(m_acceleration* deltaTime);

NOTE: This code presumes that Quaternion's '*' operator performs

((quaternion) * (vector) * (quaternion's conjugate))

instead of just the first half of that. At the end of the frame that the input is used, SET IT TO ZERO. This may seem silly, but a long standing, currently on hiatus, project of mine has a currently unusable camera because of a bug relating to this. This camera is rock solid, the only problems you may have with it are fat frames causing a large amount of mouse movement, but that can be solved with a speed limit.

Until next time!

Direct3D11 for those in a Post D3DX world

DirectX 11 for those using Visual Studio 2012 As most tutorials on D3D11 are created in VS2010, they don't work when you pass them into VS2012, even more so when you are using the latest tool chain (v110). This is meant as a supplement, alongside some of the differences between tutorials I have seen.


is useful when you don't want to enable MSAA,

if you want MSAA, use CreateDevice(...), query what the graphics card supports, then get the ID3D11Device's DXGIFactory using these three successive query calls:

dxgiDevice->GetParent(__uuidof(IDXGIAdapter), (void**)&dxgiAdapter);

and then


In the Windows 8 SDK D3DX is completely deprecated, even if you are using DX11 and not DX11.1. This includes all texture loading methods and the Effects SDK. If you want to use it, MS released the DirectX Tool Kit. As D3DX included the DXTrace(), you have to use the more general Win32 error checking method called FormatMessage(), like so:

I normally wrap it in a macro instead of in a function and have it display a MessageBox instead of returning the error string, but whatever works for you.

Effects are closer to OpenGL shader programs, but if you don't use it, you only need to pass around the ID3D11DeviceContext instead of the effect, allowing you to do more with the same number of parameters.

Wrapping com object release and then null the pointer as a macro is a good idea, as you will probably be calling the following all too much:

someComPtr->Release(); someComPtr = nullptr;

By the way, using nullptr still works with checking if something is NULL or null. C++11 is out, freaking use it if you are going to use this version of DX11.

The shader loading example in MSDN is entirely in .Net, so for those that haven't needed to load a file as a byte array (FX.exe outputs .cso's at build time by default in VS2012, so you might as well use them) and don't want to use C++.Net, the following code works just as well:

which you then feed into


There you have it! one shader, ready to bind to the pipeline! Remember that you need to create an ID3D11InputLayout from the same vertex shader byte array and bind that too, otherwise you won't get anything on screen, but most tutorials already cover that, if they aren't written using the Effects SDK

That's it for now, this might get more content as I work on Spear.

Post GDC: Spear

Since GDC, I have been working on a DirectX11 variant of the Harpoon engine, codenamed Spear.I say variant, but making a functionally similar engine again resulted in a different architecture, but it's as close as I want it to be for DirectX. Since DX11's API changes when you use the Win8 SDK, and this isn't strictly covered in any tutorial, I will be posting a list of changes and a couple of helpful functions I have needed in order to get the tutorials from 3D Game Programming with DirectX 11 by Frank Luna, and the RasterTek tutorials working in VS2012 and under the latest tool chain.

It's been a busy couple of months, so here's a photo of the lit terrain tutorial, working under v110 tools: Chapter 7's tutorial Spear's Repo is currently private, but that may change given enough time. I'm currently working on texturing, then implementing XInput support. Probably will post a video then as a proof of concept.

GDC Prep

GDC is once again coming around, and because of such, I suggested to those choosing to make the journey from Australia with me to have a mid-flight game jam, since we have the time (13 hours in the air just from SYD to LAX). Those going out of Sydney on the 17th, since they are on an A380 flight, will have internet while over the pacific.My brother and I are flying out on the 22nd, so I am not allowed to start till then, but I get to choose the theme and stew on it for a couple of days, so I guess I come out ahead.

My search for graphics related knowledge continues, and Jetha referred me to Realtime Cameras by Mark Haigh-Hutchinson as an excellent source of information on Cameras, suggesting to use it to help design a camera class for Harpoon's framework. From what I can see, I agree with Jetha's assessment. My flight out is only a month away, I can only hope to work on and have something to show in time.

Harpoon's Framework (It wouldn't surprise me if I eventually just release this framework separately as "HarpoonFW" or some such name) now has a basic camera class, and I refactored the Main method to a much simpler "declare SystemManager, try catch for exceptions, post as message box afterwards" type. It at least makes for simpler error message handling, and also allows for error codes, something that I have yet to try out. I'm also hoping for a bit of inter-object message handling, but I am not sure I will get around to implementing it. Writing this post, it occurs to me that I am, in fact, stuck in a feature implementation cycle and not actually implementing any gameplay features. Damn. Eh, I need an input manager to do anything anyway, so I might as well implement that and a debug camera, then fork the repo again. Such is life.


So, Jetha and John asked me to come in and make a basic AI for their game project, which is uses the UDK for it's engine.

I have never used UDK before, "this will be fun, it's going to be better than TorqueScript" I tell myself, having been burned by engine scripting languages before.

My opinion of UnrealScript 3? Pretty good! it's weird working with everything in what seems like a global namespace, but it's quite well documented (had a little bit of trouble trying to get the player's controller), the way it handles states is interesting (in the good way, I swear!). Given that how the Level Editor handles, I think it's a signed distance field based boolean operation based geometry editor (demo scene, much? :D), for level editing, at least, which is freaking sweet. It makes me want to make a loading screen a level loader that displays a section of the level geometry being generated by the level's geometry boolean operation list, one operation at a time, but that is for when I actually know how to implement signed distance fields in OpenGL buffers; an idea for a later time.

The use of WorldInfo and LevelInfo seems pretty sweet to me, but it feels weird not declaring scripts that are depended on and it just working; it's awesome, but feels slightly off at the same time. Having all nonstatic parts of the level extend Actor is only weird until I remember that my entire framework is based on all renderable objects being Entitys (pot, meet kettle. >_>)

The way Unreal handles data is making me reconsider how to store my scenegraph in CHD's framework; with every data-type innately also being a single linked list in unreal, I realised that CHD isn't really using std::vector in the right way, particularly in the renderer, where it's just using them as a single linked list anyway, rendering one after another.

From what I have heard, Unreal 4 will drop UnrealScript and use C++ as a scripting language. While I see the benefits, it seems like a step backwards if we have to do all the pointer chasing and double declaring of C++ after the Java-C# like experience of UnrealScript3; having seen the declaration character based mess that is .Net based C++, it doesn't seem like a step forward to me.

Eh, at least Unreal 4's lighting engine looks FREAKING AMAZING. The more ComputeShader based lighting effects that will pop up given time, the more that I get excited for how DAMN PRETTY everything will look in the next couple of years when people figure out how to handle the next gen of consoles.