HTTP Status Codes as Telephone Calls

December 18, 2012http

I had a funny idea to describe HTTP Status Codes as telephone conversations so I thought I'd write it in a blog post.

She's not here right now but she'll be back later.
She doesn't live here anymore, she now lives somewhere else.
He hesn't changed a bit.
I can't allow you to speak to him.
$1.99 for the first minute...
No one by that name lives here.
It's not you, it's me.
I can't deal with this anymore.

Snowball is now modular

November 6, 2012.netgame-programming

The version of Snowball currently on GitHub under the "develop" branch has been split into multiple projects. There is now an assembly for each major piece of Snowball, such as Graphics, Input, Sound. Although this means having to reference more assemblies, the amount of code your project depends on is now smaller. This also makes code maintenance a bit easier as it's more clear now what parts of the library depend on other parts of the library.

The parts of the library which really make up a Game Framework has also been split out into their own library. This allows for using Snowball as a just a simple set of libraries or a full blown game framework, depending on what your situation calls for.

Using Themes in Visual Studio Express for Windows Desktop

September 15, 2012vsvs2012

I just want to post some information that took me while to find. Check out the original article here with pictures and more information.

1) First, download the zip file – it contains the 7 pkgdef files defining the colors of the default themes from Matt’s extension.
  1. Now, create a folder under "%ProgramFiles%\Microsoft Visual Studio 11.0\Common7\IDE\WDExpressExtensions”, and lets name it “Themes”. Unpack the zip file in that folder.

  2. Open a ‘Developer Command Prompt for VS2012” window. In the command line, type “wdexpress.exe /updateconfiguration”. This will make Visual Studio to read the pkgdef files on next restart, and import the color themes into registry.

  3. Launch Visual Studio Express, and now you should be able to see the new themes and switch them in Tools/Options dialog, Environment/General tab



I fixed a bug yesterday in Snowball related to a lost graphics device. I noticed that when I would use CTRL + ALT + DELETE, my apps were crashing. Turned out it was due to not recovering properly from a lost device.

The root of the problem was that I needed to call the ID3DXEffect::OnLostDevice() method when the device was being lost. This allows the effect to recover from the lost device. I've made the Effect class in Snowball now do this automatically.

Snowball - Now based on shaders

I've now merged the "Shaders" branch back into the "master" branch. All rendering is now based on shaders and no longer on the fixed function pipeline.

The function of the Renderer class was essentially been reduced to pushing data to the GPU and therefore I decided to rename the class to GraphicsBatch. The Begin() overload which would allow you to specify RendererSettings has been removed and been replaced with an overload which allows you to specify an Effect file to use. Also, the DrawLine() method has been removed, although vertical and horizontal lines can still be drawn using the DrawFilledRectangle() method. Better line drawing should be possible through shaders and I hope to eventually make a sample which provides an example.

I've added a sample (pictured above) which demonstrates using a custom shader. By default, GraphicsBatch uses a BasicEffect class which is basically the old way of rendering implemented in a shader.

In order for shaders to work properly when using GraphicsBatch, the GraphicsBatch class must pass a few parameters to the shader. At the moment, this only includes a transform matrix but may include more parameters in the future. The GraphicsBatchEffectWrapper can be used to wrap custom effects which you write in order to work with GraphicsBatch correctly. GraphicsBatchEffectWrapper will pass the parameters to your shader by following a standard naming convention. For example, the transform matrix is passed to your shader through a parameter named "TransformMatrix". You can also write you own class which implements IGraphicsBatchEffect. See the sample for an example of using the wrapper class.