 		@lastLoop = null
 
 		# Custom canvas
-		@render = new Rotten.Render options.render||Rotten.Render.CANVAS options.canvas
+		@render = if options and options.render is Rotten.Engine.WEBGL2D then Rotten.Renders.WebGL2D else Rotten.Renders.Canvas
+		@render = new @render if options and options.canvas then options.canvas else null
 
 		# Game assets manager
 		@assetManager = new Rotten.AssetLoader()

		@lastScene = null

		# The game background color
		@backgroundColor = options and options.background or "#000"

		# Current game fps
		@fps = 0

	start: (sceneName) ->
		if sceneName is not null then @currentScene = @scenes[name]
		if @currentScene is null then return

		requestAnimation()


	# Main game loop : Everything is done here
