BRS-Emulator: BrightScript 2D API Emulator
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 (
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.
Technology and Compatibility
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 https://github.com/lvcabral/brs-emu-app.
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: https://lvcabral.com/brs
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
IIS but there is a simpler option if your have Python installed. The steps below consider that option:
- Download the
zipfile from the latest release
- Unzip the package to a folder.
- Using your OS
terminalrun the commands below inside the
- As a shortcut you can also use two batch files named
$ python -m SimpleHTTPServer 8888 or $ sh ./server.sh
c:\github\brs-emu\app> python -m http.server 8888 or c:\github\brs-emu\app> ./server.bat
- With the webserver running you can now open your Chromium based browser at the page
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!
- Prince of Persia for Roku port by Marcelo Lv Cabral - Download zip file
- Lode Runner for Roku remake by Marcelo Lv Cabral - Download zip file
- Retaliate game by Romans I XVI - Download zip file
Note for BrightScript Developers
You can see the debug messages from
- My website is https://lvcabral.com
- My twitter is @lvcabral
- My podcast is PODebug Podcast
- Check my other GitHub repositories
Copyright © Marcelo Lv Cabral. All rights reserved.
Licensed under the MIT license.