Playing around with material from Richard Jones's "Introduction To Game Programming".