A web-based editor for the Throne programming language, hosted at https://t-mw.github.io/throne-playground/.
- Press the play button in the bottom right of the page to begin executing a script.
- Hover over any button to view a tooltip describing what the button does.
- To learn how to read and write the language, read the Throne documentation and view the examples below.
- Hello World
- Family - demonstrates how variables are matched.
- Guessing game - introduces predicates and the brace construct.
- Draw - demonstrates the drawing and update loop features of the playground.
- Game of Life - an implementation of Conway's Game of Life.
- Blocks - a simple tile matching game.
Although script errors are marked in the editor when they occur, the context for your script can also be inspected in more detail through window.playground.context.
For example, to print a log of the current state and compiled rules execute playground.context.print() in the browser console.
- Clone Throne to a directory.
- Follow the steps to build Throne for WebAssembly.
- Clone this repository (
throne-playground) to the same directory asthrone. - Run
npm install && npm run buildin thethrone-playgrounddirectory.- Alternatively run
npm install && npm run startto launch a local web server for testing.
- Alternatively run
- The build output will appear in
throne-playground/dist.