In the latest version of ChoiceScript up on Github, it’s now somewhat easier to get this stuff to work.
You do still have to install Node.js (one time only). Then, when you download and extract ChoiceScript, you’ll see I’ve added some new scripts to launch the ChoiceScript server.
-
Windows: Double-click on
run-server.bat. Windows hides the part of the file name after the dot, sorun-server.batlooks likerun-server.- The first time you run it, Windows will pop up the Windows Defender SmartScreen (“Windows protected your PC”). Click “More Info” and then “Run anyway.”
-
Mac: Double-click on
serve.command.- The first time you run
serve.commandon a Mac, double-clicking won’t work. (“‘serve.command’ can’t be opened because it is from an unidentified developer.”) Hold the Control key on your keyboard, click on theserve.commandfile, and click Open. From now on, double-clicking will work.
- The first time you run
Launching the ChoiceScript server will open a window for the server, and it will also open your browser, showing you the example game. You can just refresh your browser to test modifications to your game.
You can stop the server by closing its window. If the server stops, you won’t be able to refresh ChoiceScript in your browser; you’ll need to launch the server again to continue using ChoiceScript.
You can also run Quicktest and Randomtest in a similar way:
-
run-quicktest.baton Windows,quicktest.commandon Mac -
run-randomtest.baton Windows,randomtest.commandon Mac
Once you’ve jumped through all of the hoops, running the game and the tests is as easy as double-clicking, just like it used to be.
I’ve updated the Introduction to ChoiceScript and the Testing ChoiceScript pages on our website to match these instructions.
