ChoiceScript is a relatively simple language to learn and requires no real programming knowledge or specific software other than ChoiceScript itself. All you've ever really needed to develop a ChoiceScript game is a simple text editor, a browser, and a willingness to learn some fairly basic scripting commands and techniques. But that's no longer necessarily the best or even easiest way to do things.
Community Development Tools
There are at present two community-driven (i.e. unofficial) software projects aimed at providing CS authors with free development tools for ChoiceScript, both with public release versions available and themselves in ongoing development. These applications provide two very different approaches to tackling the same issues. As such, we would urge all CS authors—newcomers and experienced coders alike—to give both applications a fair trial and see which works best for you. After all, if you pursue this wonderful hobby of ours you will spend a great deal of time developing your game(s), so you may as well make absolutely sure you're using the ideal tool for you.
Of particular importance, note that if you do decide to use either of these free applications you will not have to download and try to figure out ChoiceScipt for yourself, either initially or for every future CS update. You won't have to worry about understanding the file structure or setting things up properly to develop your game. Both of these applications assume all of that hassle for you by fully integrating the ChoiceScript scripting language, and as a general rule will themselves be updated shortly after CS updates.
We asked the teams behind these applications to each provide a brief overview of their respective offerings for your consideration:
Available for: Windows, Mac & Linux.
Chronicler is a visual code editor for ChoiceScript. It allows users to place "bubbles" and connect them together to create a flowchart of their game. From this diagram it then generates the ChoiceScript code automatically. Furthermore, it has built-in running and debugging tools so users don't have to leave the editor to test their game.
The debugging tools are somewhat revolutionary for a CS editor in that they provide a means of initializing variables to something other than their starting values and then jumping to any location in the game. In this way users can test their game from the scene they are currently working on without having to play through the whole game from the beginning every time.
Other features include spell-checking and context-sensitive ChoiceScript code completion.
Chronicler 2.0 is currently in development, with the main focus being on substantially improving the user interface.
- Chronicler Website: TBA
- CoG Forums Topic (Inc. Download Links)
Available for: Windows, Mac & Web (latter requires a Dropbox free online account)
The ChoiceScript Integrated Development Environment (CSIDE) offers a "hands on" approach to CS coding, providing a way to manage your files, write your stories, and test your game scripting, all in one neat package! It includes features designed to streamline the entire creation process and take out every possible hardship or chore, leaving only the fun bits for you.
Popular features include support for multiple projects, 'Smart' indentation, powerful testing and debugging tools, and fully-integrated (official) Quicktest & Randomtest functions—not to mention all the features you'd expect of a versatile Code Editor, such as handy code highlighting, spell-checking (US or UK, plus a User Dictionary), multiple Hotkeys for ease of use, and much more!
Among other useful Example Projects, for non-programmers and others new to ChoiceScript CSIDE offers a detailed, step-by-step Interactive Tutorial, Learning Basic ChoiceScript, designed to help you progress at your own pace.
Should you choose not to use either of the available applications described above, to develop a game in ChoiceScript you'll usually need a text editor.
First, to clarify, a text editor is not the same thing as a word processor. A text editor handles plain text and is useful for programming, while a word processor handles formatted text designed to be printed out or read by humans. Notepad is a text editor, while Microsoft Word is a word processor. You cannot use a word processor in the place of a text editor, and, in fact, using a word processor to write your game and then copying it into a text editor will almost certainly cause errors.
Virtually every modern computer comes with a text editor. For Windows that would be Notepad, on Mac OSX it is Text Edit. However, Notepad and Text Edit are very basic text editors, and while they get the job done, using them will make certain things significantly more difficult. It is recommended you download one of the following free text editors, any of which offer far more useful functionality for ChoiceScript purposes:
- Notepad++ (Windows only)
- Atom (Windows, OSX, Linux)
- Brackets (Windows, OSX, Linux)
- Sublime Text (Windows, OSX, Linux)
- A note on using Notepad++
Two quick tips for using Notepad++. First, you may want to turn off auto indent. Go to Settings > Preferences > MISC. and uncheck Auto-indent. Second, you may want to turn on word-wrap. The option to turn it on or off should be on the main task bar, but can also be found under View. Leaving Auto-indent on may make a mess of indentation, as Notepad++ does not auto indent in a way that is necessarily compatible with ChoiceScript, and word-wrap will keep the page from scrolling off to the side with full paragraphs.
- Syntax highlighting
The free text editors listed above also support syntax highlighting, which highlights commands with different colors to make it easier to distinguish them from the rest of your game's narrative.
Syntax highlighting for ChoiceScript doesn't come with the text editors listed above, but it is easy to install. Here are a few guides to installing the highlighter for your text editor:
- Notepad++ Syntax Highlighter
- Atom Syntax Highlighter
- Brackets Syntax Highlighter
- Sublime Text Syntax Highlighter
If developing your ChoiceScript game using just a text editor, to test your game during development you will usually need to use a web browser, in which you load the file index.html located in the "mygame" (..\web\mygame) folder. If you prefer, you can even set this as your homepage (useful if you intend to develop your game often): load the index.html file in your browser, copy the full directory / file location from the browser's address bar, then simply paste it into the default homepage URL setting (commonly found under Tools-->Options or similar). If you would rather not have it as your homepage, you can also bookmark the page as you would any web page.
Mozilla Firefox is recommended for Windows users, and Safari for Mac users. Microsoft's Internet Explorer can also still be used, although generally speaking the Error Messages returned by more-recent versions of ChoiceScript are deemed superior for users of Mozilla Firefox. (N.B. This is believed to be official Choice of Games policy, given the past decline of IE usage on the net in general, in comparison to Firefox and Chrome).
Note that Google Chrome is considered a poor choice for most ChoiceScript authors as this browser does not support local scripting and does not give out error messages. Although a technical workaround is known to exist to allow it to work offline, most ChoiceScript authors using Chrome can only test their game by uploading it online. This is inefficient in comparison and is not recommended.
Writing on mobile devices
But what about writing in ChoiceScript on the go?
On iOS: iPads and iPhones
Textastic ($9.99) supports both ChoiceScript syntax highlighting, testing your game and syncing your game files through iCloud, Dropbox, (S)FTP, Google Drive and WebDAV. There is a wonderful tutorial on how to set it up: How to work seamlessly in ChoiceScript between PC, Mac and iPad, which works on iPhones as well.