A Basic Template for 2D Gaming in Javascript