a template for create games in canvas