Skip to main content

Getting Started

Create a Game

Create a game:

import { Game } from 'r-row';

const game = new Game();

Create Canvas

You can use default canvas options:


Or create a Canvas settings object from CanvasOption interface:

import { CanvasOptions } from 'r-row';

const options: CanvasOptions = {
// your settings here

and pass it to the createCanvas method:


Set scene to start with the game (facultative)

If you want use the Scenes system provided by R-Row, you can use this method before starting the game:

game.startScene(new MySceneClass());

A new instance of MySceneClass will be start automatically when the game start.

Start the game



import { CanvasOption, Game } from 'r-row';
import { MyScene } from './scenes/MyScene';

const option: CanvasOptions = {
imageSmoothingEnabled: false;

const game = new Game()
.startScene(new MyScene())