News

2011

5th June 2011

Starcraft 2 Streams App

I've created an Android app that can notify the user of interesting Starcraft 2 streams.
link

11th March 2011

Uses For The Comma Operator in C++

Added some code to show the Uses For The Comma Operator in C++

27th February 2011

Domino's Pizza Claims 75 million Pizza Types

I've looked at Domino's Pizza's claim that there's 75 million ways to customise their pizzas in this article.

16th January 2011

Base64 Encoder in C++

Added the code for my Base64 encoder to the code setion.

2010

13th December 2010

Playing Play List files (PLS) in Windows Media Player

This program was created so I could convert 256 kbps radio streams from Digitally Imported Radio in the PLS file format into Advanced Stream Redirector (ASX) files. The ASX files could then be played in Windows Media Player (WMP).

There's a python based command line tool and a wxPython based GUI tool (using wxPython) available as both a python script and a stand-alone executable.

Article detailing the program: Converting Play List (PLS) to Advanced Stream Redirector (ASX) using Python
Source code (python): PLS to ASX Converter Using Python

18th November 2010

Recommended Board Games

There's a list of board games I recommend at this link.

17th November 2010

Packing Golf Balls in a Bus

Estimating how many golf balls you can fit in a school bus link. The Kepler Conjecture comes in handy.

14th November 2010

Programming Challenges - 3n + 1 Problem

Added an article about the process of solving the 3n+1 problem in the Programming Challenges book.

16th May 2010

Virtual Box And Seamless Desktop Mode

Added an article on my experience using VirtualBox with a Windows 7 host and Ubuntu 10.04 Lucid guest in seamless mode.

22th March February 2010

Booleans As Function Parameters

Added an article argumenting for the use of enumerators instead of booleans as function parameters to improve code readability.

4th February 2010

Finite State Machine Implementation

Recently came over a problem that could be solved with a Finite State Machine and therefore implemented a fairly generic version which hides as much as possible of the workings of the state machine as possible.

2009

9th April 2009

Quake Wars 1.5 SDK Unity Build

Created a Quake Wars 1.5 SDK unity build for testing the reduced compile times.

Greatly reduced build times for debug where a rebuild is needed, but for release there seems to be little benefit.

9th April 2009

Weapons Factory Revolution Post-mortem

I've written a post-mortem for the Quake 4 modification i was a programmer on for over a year around 2006. My main responsibility on this mod was GUI programming.

6th March 2009

Restrict Keyword in C and C++

The Restrict keyword can be used for improving performance in C and C++ applications and should be used if possible when iterating over big arrays. The keyword must be used carefully as incorrect usage will create undesired behaviour that is difficult to debug.

Added in the C99 standard, but was never in the C++98 standard or Techincal Corrigendum 1. Apparently the keyword has not even been added to C++0x which is hard to understand in my opinion.

Though the restrict keyword are supported through both the latest GCC and Visual Studio compilers both C and C++.

More information about the restrict keyword and the related type-aliasing here:


Understanding Strict Aliasing
Demystifying The Restrict Keyword

5th March 2009

Variable Sized Arrays

In C99, in addition to alloca() variable sized arrays can be used to allocate on the stack: Variable sized arrays

This is unfortunately not possible in C++.

int open2 (char *str1, char *str2, int flags, int mode)
     {
       char name[strlen (str1) + strlen (str2) + 1];
       stpcpy (stpcpy (name, str1), str2);
       return open (name, flags, mode);
     }

2008

December 2008

There's a good usage of template typedef's (which is only supported in C++0x) when implementing a templatized version of an N3-tree (a gneneralized octree where each node has N^3 children. A template typedef can be used for typedef'ing the octree version with a partial argument list.

Article on template typedef's

2006

December 1st 2006: Added the Doom 3 Megatexture Demo and Megatexture Project web pages

List of commands and console variables in quake 4: Clicky

LMS COOP Wiki: LMS COOP Wiki


Last Man Standing COOP for Doom 3: LMS COOP Homepage
Weapons Factory Revolution for Quake 4: WFR Homepage

Daily updated graphs for

Last Man Standing Forum, Ogre 3D forum and Doom 3 World forum

gamedev.no email


Tweet

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.