If you've written a game in ChoiceScript, you can now run it under Brahman and turn it into a deployable product with a graphic UI for both desktops and mobile.

Your game can then have:

  • User selectable fonts and sizes
  • Save games
  • Links and markup in the text
  • Improved picture presentation
  • New version update notification
  • A custom title page with effects & sound.
  • It's own colour theme.
  • A product logo.

The result is a complete product, ready to be deployed on the App Store(s) or from platform like itch.io, gog.com and Steam.

Let's go through an example of how to do this. The picture above shows what my final choice-based mini game looks like with Brahman.

Braham Choice Example

We're going to take an example ChoiceScript game and turn it into an app. The game is "Scott of the Antarctic" - a mini game I wrote for demonstration. It has only one single scene file (startup.txt). You can download the source for this sample game and media are here.

This mini game is somewhat different from a normal choice game because it contains more logic than text. This is essentially to demonstrate and test the fact that the Brahman Choice engine supports just about everything you can do in ChoiceScript.

I wrote this game using the excellent CSIDE Choice IDE. CSIDE is a great way to develop your ChoiceScript games because it helps you test and debug your game as well as fixing the logical indentation and even the spelling mistakes.

Once you have your game working, drop the scene files and any media, ie pictures and sound files, into a directory for Brahman packaging.

You can then run the game under Brahman manually by pointing the Brahman executable at this directory. It is now that you will want to customise the game as an app.

ChoiceScript does not have a great deal of meta data. Typically you only supply title and author, eg:

*title Scott of the Antarctic
*author by Jkj Yuio

To make an app, you'll need to add some more things. For example, you can add;

  • Theme colours
  • Title page background image and effect
  • Title page text font and colour
  • Game credits

This is done by setting specific ChoiceScript variables to appropriate values, Brahman will then pull out these values and use them.

For example, you set the theme colours by writing;

*create productThemePrimeColor "#e3f2fd"
*create productThemeAccentColor "#b1bfca"
*create productThemeContrastColor "#b1bfca"

You set the cover page by writing;

*create productCoverTextColor "black"
*create productCoverEffect "Snow"
*create productCoverTextFont "Kanit Thin"
*create productCoverTextWeight 100
*create productCoverImage "scott.jpg"

The colours can be specified directly as hash (#) values like in the above, or you can use words like "red" or "lightskyblue" from the SVG color names palette.

I picked my colour palette using the Material Design color tools, eg

These tools give you hash colour values that you can just type in as a string, eg color "#e3f2fd" is the washed out, pale blue I used in Scott.

The title page is made automatically from the ChoiceScript *title and *author settings, but you can also set the background image, the font family (eg Kanit above), it's colour and weight.

Here's what the title page looks like with these settings.

If you use a non-standard font, you'll have to bundle it with your app. That's easy, just get the font file, eg from Google fonts and put it in the directory along with the other resources (be sure to check any copyright on fonts you use). By the way, any additional fonts bundled will also be available for the user to choose in the main text window. Nice!

Building the Android APK, the Windows MSI installer and MAC OSX "App" package are somewhat involved, and I won't cover them here. Suffice it to say, that this is done with a build script that puts a bunch off additional resources together, such as the game logo, package name and version.

The net result is a final installer package, one for each platform; Windows, Linux and Mac OSX. Also Android and (soon) iOS.

If you'd like to try the demo game, Scott of the Antarctic for Windows, you can download it here.

Good luck surviving the South Pole!

Next Post Previous Post