Code using BGE Master branch developed by Bryan Duggan. https://github.com/skooter500/BGE