Templates for 2D games