Things that make it worth writing using choicescript

I’m having a blast building a project with choicescript. One thing in particular that I think makes the format worthwhile is the control you have over pacing that you wouldn’t normally have in straight prose.

You want an action scene to be fast paced? Short paragraphs, long sentences, no page breaks, tonnes of spacing. You fly through at a breakneck speed.

You want a slow, contemplative, romantic moment between two characters that takes its time as the characters get to know each other? Allow the player to choose each line of dialogue, and the conversation will drift at a slow, deliberate pace, where every word is meaningful.

The possibilities of the format allow for such a high degree of control over the pacing that it almost makes me giddy.

What are some other things that people like about the format that you wouldn’t necessarily “get” at first glance?


Then again, having the player pick every line of dialogue can be nauseatingly dull and get people to get a refund/not buy the game.

Choicescript’s main strength, and sometimes a downfall, would be its simplicity, I would say. People who have never had any experience with other coding languages can easily make a very good game.
On the other hand, the coding can become too restricting and force you to create solutions than require more work, than say, it’d require on some other language.
That’s just my opinion.


Something I like about the format over normal prose is that it can feel more personal. After not just customizing your character but making some decisions that speak to your personality, the game can really react to that. Did your cautious approach result in failing to win over the love interest? Did your silly approach make a mess of things? People can take ownership in a story they feel they helped create, and maybe even read some lessons for themselves into what happens.

Something I like over parser-based IF is that it’s much easier for the player to take actions that will meaningfully advance the story. While the parser player is going N N S looking for something to TAKE that they missed, the same number of interactions in ChoiceScript can start a war, end an affair, and pick some snappy dialogue to top it off.

Something I like over any non-text medium is that you get to make Big Observations. There’s one I still like from my game Choice of Robots where you realize that whatever you felt about your robot, your mother must have felt at least that about you. It would have had to be someone’s dialogue in most other media. I like letting that sort of thing be a part of the POV.


Does that mean we’ll be seeing some “my grandchild is a robot” T-shirts any time soon? :star_struck:

100% this.
I mean, I know most authors don’t have much experience with programming, and having such a simplistic syntax helps them create games without much hassle, but for anyone with a little programming knowledge, ChoiceScript is… a experience, to say the least.

The labels, the more restrictive variables, the clumsy ways to create efficient subroutines (e.g not being able to pass variables over easily) is irritating. For a lack of a better word, it feels almost clunky when attempting to incorporate game mechanics and systems.

Nonetheless, it is still a decent language to use for interactive stories with minimal pictures/music.


Hard work pays off more, eh?
Agreed, choicescript is indeed a great engine, but it’s much more satisfying to achieve positive results in a much more complex programming language.

1 Like

Pretty obscure, but then, I’d personally be inclined to put an electrified pickle and/or Alaska on the T-shirt, so who am I to judge?



Back on topic…

I love how ChoiceScript is very friendly to people who do not have any training or background in programming. The language is very easy to pick up and understand, and the limits of what you can do with it are quite astounding. My own project, Missing Wings, has several games and mini-games in it and part of the reason I did that was to show my love. :heart:


Um, I’m not sure if this is what you mean, but have you tried using *params? It’s not perfect, but I use it in my stats subroutine along with multireplace and it’s been working nicely.


What makes this awkward for people used to other languages is that you can pass parameters via a gosub but not a goto, there’s no way to return a value from a gosub, there are no data structures at all (strings and numerics don’t cut it any more), the fact that you can only compare two variables/constants at a time and have to resort to messy bracketing.

Having said that, it wasn’t designed as a language for creating your next great MMO. What it does, it does very well and there are ways around all of those issues. It’s also evolving, the ability to use parameters with gosub is quite a recent development and no longer having to use goto after every single choice statement or in the middle of it…else… constructs is also quite new - and a godsend!


Just found out about this feature. It’s not covered in the standard tutorials! I had seen the @{} structure while snooping through other people’s code and just assumed it was black magic. It’s gonna be kind of awkward having half of my WIP an awkward mess of its and elseifs and elses and gotos and the second half a beautifully streamlined multireplace extravaganza, but such is the cost of progress.


Other tricks that you might not know:

  • [n/] = *line_break, but usable in-line with your story sentences.
  • [i][/i] for italic
  • [b][/b] for bold
  • *text_image is an equivalent to *image, but your assigned image’s color will be inverted as you switch the screen to night/dark mode.

Omg, thank you, this is exactly what I was looking for. Wow.

Is there… some kind of ‘advanced CS’ tutorial for things like this? The wiki is helpful, but learning from snippets of other people’s code is best.

I exclusively use [n/]! It’s really useful for the stat screen.

The current wiki page is a bit of a mess IMO and could use some update, but there’s really no tutorial for stuff like this.
IIRC, I got this trick from @RETowers on a certain thread I’ve forgotten.

It certainly could. It’s entirely community-driven so if the community doesn’t drive it… well, I’m sure I don’t need to belabor the point! Every now and then I’ll find a fresh burst of energy from somewhere and do a bit more but, yeah, it can be… draining. Something about a finger and a dyke springs to mind.

It’s perhaps worth pointing out that any Wiki member can edit any of the Command / Function pages where they spot an error / outdated info / missing recent changes to existing commands, and anyone can create a brand new page. An admin person would then ensure that page is properly linked where appropriate.

If I knew enough, I would edit it, but I’m still at a very novice stage.

BTW, is [n/] meant to work when used in choice selection text? I’m not sure if those are allowed to have line breaks.

I’d actually like to edit the wiki, but I’m afraid that my editing will be… radical. And for that, I also need the full power of total authority to edit any page. Hah!

Perhaps one day :"


    #Tell you what[n/]This is perfectly valid.
    #As well as @{true this|that} one.

Not a problem. PM me your Wiki user name and Hey Presto! you’re a ChoiceScriptDev Wiki Editor… I seriously doubt there are any in the community who would deny either your very broad CS knowledge, your obvious coding expertise, or your outstanding willingness to help others.

The Wiki could do with a new lease of life. I’m sure I wouldn’t be the only one grateful should you feel willing and able to spearhead that.