I haven’t been posting updates here since recent ones have been bug fixes, but the latest version brings new capabilities to the table. Version 2.0 lets you run your in-progress game in a browser without your own copy of ChoiceScript, as well as run Quicktest and Randomtest against your game.
The new version adds an Open button to the left side of the bottom status bar when you’re in a game file. Press it to open your game in a browser.
Your game files are served live, so if you make changes to your game and want to reload, refresh the browser page. Any errors that are found get sent back to the editor and are annotated so you can see where the error occurred. If you close the browser tab with your game, press the
Open button again. In fact, you’re free to press the
Open button for as many browser tabs as you’d like.
To run Quicktest or Randomtest, right-click in the editor window and select the test you want from the context menu that pops up.
Quicktest results appear in the Output window at the bottom of VS Code. If it finds an error, the error’s annotated in the same way that errors from running games are.
Randomtest has a few extra steps. When you run Randomtest, VS Code will ask you to enter how many times to run Randomtest, your starting seed, whether to print your game’s text, and more. That can get tiring, so you can run Randomtest with default settings. To change those values, update the extension’s settings.
If you run Randomtest without it printing your game’s text, then the output goes in the same Output window as Quicktest. If, however, you have it print your game’s text, then the results appear in a separate editor window, just as if it were a regular file. You can scroll through it, and even save it to a text file if you want.
One small wrinkle: VS Code has a hard limit on the size of file it’ll let my extension open, and Randomtest can produce a lot of text. If Randomtest produces more than 20 MB of text, the extension saves the output to a file called
Randomtext-[random id].txt in your game’s root folder. Even though VS Code won’t let me open that file, you can by double clicking it.
These are very new features, so please try them out and let me know how they work. I’ve stress tested them a fair amount on my game – the extension happily produced a 200 MB file from Randomtest, for example – but there’s bound to be issues.