– Navigate on the home screen using the keyboard or a game controller and select any app to run, just like on a Roku device.
– You can also run your own code (.zip, .bpk or .brs) using the purple button to side load the app.
– You can make the simulator full screen by double-clicking on the display canvas.
– Check the image on the right to learn the keys and gamepad buttons mapped to the Roku remote control.
As a BrightScript developer since 2012, I always wanted a way to test my code without the need of a Roku device, in situations like a long flight or a place without any wireless network available. The solution would be to develop a simulator for the platform, so in 2019, I learned about the project brs, an open source command line interpreter for BrightScript created by Sean Barag and his Hulu team.
I could immediatly see, that this project was the missing piece to turn my simulator project a reality! I forked it and started collaborating, sending pull requests to the project, so the interpreter could have the minimum set of components that would make possible for me to work upon it. Very soon, I could develop a working proof-of-concept using HTML5
|Provides the Engine API to be imported and used by the client applications hosting the Simulator.
|A Web Worker library that runs the language parser and interpreter in a background thread on the browser platform.
|Executable CLI application that can be used from the terminal as a REPL, running
brs files or packaging encrypted apps.
Note: The engine libraries are client-side only, nothing needs to be sent or processed in the server side.
You can see the debug messages from
registry data is stored on the browser Local Storage and you can inspect it also using the Developer Tools.
If you added a break point (stop) in your code, you can debug using the browser console, just send the commands using the
debug method like this:
For a better debugging experience, is recommended to use the simulator desktop app integrated with Visual Studio Code, you will find more details in the project repository (links below).
The simulator is also available as a multi-platform desktop application (Windows, Linux & macOS) that uses the package published by this project. The application introduces several aditional Roku features, such as the ECP (External Control Protocol) and Remote Console servers to allow integration with 3rd party development tools like Telnet or VSCode BrightScript Extension. You can also change the device configurations such as screen resolution, keyboard control customization, localization, among others.
To learn more about the project visit the repository at: https://github.com/lvcabral/brs-engine
To download the Desktop Applications for Windows, macOS and Linux go to: https://github.com/lvcabral/brs-desktop/releases.
You can also clone the project with Git by running:
$ git clone git://github.com/lvcabral/brs-engine.git