Skip to content
BrightScript Draw 2D API Emulator - Runs on Chromium based browsers and Electron applications.
JavaScript TypeScript Brightscript HTML CSS Shell
Branch: master
Clone or download
Pull request Compare This branch is 252 commits ahead, 2 commits behind sjbarag:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

BRS-Emulator: BrightScript 2D API Emulator

The Repository

This repository is a fork from BRS project, a command line interpreter for BrightScript language created by Sean Barag. My fork extends BRS by implementing the Draw 2D API components (roScreen, roCompositor, roRegion, etc.) and several other BrightScript components allowing a full channel execution over an HTML5 Canvas, including emulation of the Roku remote control. I will keep sending pull requests to the original project, of fixes and implementations done here, so the interpreter can improve and better support this emulator.

So can I use this to watch TV without a Roku?

Nope! Both projects, BRS and BRS-EMU, currently has no intention of emulating the Roku OS user interface, integrating with the Roku store, or emulating media content playback. Although the BRS-EMU project runs channels with user interface, it does only support 2D API components, mostly for game development, see Current Limitations page for full details on what is out of scope.

Emulator Web and Desktop

Technology and Compatibility

This emulator is bundled as a Webpack Javascript library that runs as a Web Worker, and it uses features like SharedArrayBuffer and OffScreenCanvas, that are bleeding edge in the browser engines implementation, because of that, at this moment, it can only be executed in Chromium based browsers, like Chrome, Brave, Opera, Edge Chromium or embedded on an Electron application.

The BrightScript Draw 2D API Emulator is a full client-side library, nothing is sent or processed in the server side. Starting from v0.5.0 Alpha, in addition to the sample web application, the release also includes a multi-platform desktop application (Windows, Linux & Mac) that uses the same library generated by this project. The desktop app source code is also available at


There are many ways in which you can participate in the project, read documents below to know the details:


If you just want to try the emulator, not downloading or installing anything, then go to the demo website at:

Web Application

As mentioned above, this repo provides a sample web appplication for testing the emulator. The application cannot be run as pure HTML page, because some functionalities used by the emulator have security restrictions on the browser engine, so you will need a web server to run the application. For that you can use Apache or IIS but there is a simpler option if your have Python installed. The steps below consider that option:

  • Download the zip file from the latest release
  • Unzip the package to a folder.
  • Using your OS terminal run the commands below inside the app directory.
  • As a shortcut you can also use two batch files named and server.bat available on app folder.
  • Linux
    $ python -m SimpleHTTPServer 8888
    $ sh ./
  • Windows
    c:\github\brs-emu\app> python -m http.server 8888
    c:\github\brs-emu\app> ./server.bat
  • With the webserver running you can now open your Chromium based browser at the page http://localhost:8888/

Desktop Application

You can also run the emulator as a desktop application, download and install the specific OS package from the latest release.

Games and Demos

You can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as clickable icons on index.html. In addition to those, you can load your own code, either as a single .brs file or a channel .zip package. Below there is a list of tested games that are publicly available with source code, download the zip files and have fun!

Note for BrightScript Developers

You can see the debug messages from print statements in your code using the browser console, just make sure you open the Developer Tools (Ctrl+Shift+i) before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the limitations documentation, feel free to open an issue.

Author Links


Copyright © Marcelo Lv Cabral. All rights reserved.

Licensed under the MIT license.

You can’t perform that action at this time.