Time for some Rambling about Dialog


I thought I’d ramble on a bit about Bitsy’s dialog system.

Some or all of this may be old hat to you, but might be useful to newcomers to Bitsy. I might have been playing the wrong Bitsy games, but while I’ve seen loads of excellent writing, I haven’t seen many that fully leverage the dialog system. I think one of the reasons for that is that the GUI hides some of the possibilities.

Reminder – there are 5 options for Bitsy text:-

  • Dialog – the default single line of text option, like in Bitsy’s olden times.
  • Sequence – a list of items, presented sequentially one at a time, with the last one repeating.
  • Cycle – a list of items, presented sequentially one at a time, and then looping back to the top.
  • Shuffle – a list of items, a single item presented randomly each time.
  • Conditional – chooses from options based upon variables or item presence.

The GUI allows you to string these together, but doesn’t show you that they can be nested – but they can! Simply hit the “<> Show Code” button, and it will show you the ‘behind the scenes’ view. You can cut and paste as needed in this view, and swap back and forth to the GUI without damaging anything. See below for a 'nesting' example. I tend to use the GUI to build the components, then cut and paste them to where I want them in the Code view.

Anyway, here are some bits and bobs about the dialog system.

When I have nothing to say, my lips are sealed

Quick Tip – if you add a dialog 'line' but leave it completely empty, when it reaches this line Bitsy will not display any text at all. This is useful for when you want someone to shut-up; put a blank line at the end of an exposition Sequence, or in a certain variable/item circumstance.

Say something once, why say it again?

Quest Recipe – you might find yourself wanting to (a) tell the player to fetch a MacGuffin, (b) see if they’ve fetched it, and mark their success. Here’s my basic recipe:  

{
  - {item "0"} == 1 ?
    {sequence
  - Oh cool you found it!
  - Thanks again for the grail.
}
  - else ?
    {sequence
  - Hello traveller!
  - Have you seen a holy grail about anywhere?
  - Could sure use that holy grail!
}
}

So this is a good example of a simple multi-level dialog – there are two Sequences nested in a Conditional, one for exposition and one for success.

Here's what it looks like in GUI mode:


As you can see, the GUI only shows the first level GUI-style - the nested levels are shown as code within that.

Don't touch me I'm a real live wire

Chatty Items – you can attach dialog to an item instead of a sprite; the example usage is to display a “You’ve found a stick!” message, but you can add more complex dialog.

Unlike sprites, you can place as many instances of an item as you want, and they share a dialog definition. If you assign a multi-line Sequence to a item, then Bitsy will step through the lines, in order, as the player collects the items. By making the items invisible (i.e. no pixels set) you can easily tell a story in steps – both “Little Legs” and “Something That A Cat Once Told Me About Midnight” use a version of this technique.

Here’s what “Little Legs” looks like with visible story items:

 

Note there are way more item instances than I needed, but since – as above – the last line of the dialog Sequence is blank, once the end is reached it will stop displaying anything. The player doesn’t even know they’re still picking stuff up!

You're talking a lot, but you're not saying anything

Mix It Up – the Shuffle dialog type displays a random line from its list; great for NPC ‘barks’. However, by stringing multiple Shuffles together, you can do simple randomly generated text. Here’s a straightforward example from “Bedtime Kitties, Said The Witch”:

{cats = cats + 1}{clr1}Adam Le Meux said {clr1}"Tell us of the time that you {shuffle
  - invented
  - patented
  - devised
  - theorized about
  - experimented with
}{shuffle
  - a machine
  - a device
  - a method
  - a spell
}{shuffle
  - to enhance
  - to multiply
  - to transform
  - to create
}{shuffle
  - magical
  - endless
  - wondrous
  - eldritch
}{shuffle
  - wine
  - chocolate
  - kittens
  - enchantments
}!"

(In “Bedtime Kitties” the dialog is also on items -  this means when they are picked up, the underlying cat tile is revealed. The 'cats' variable checks how many cats you've spoken to, so that the game end can be triggered).

That example just uses concatenated Shuffles, but they can also be nested – “Time For Some Bullshit Fish Names" uses a couple of levels of nesting to achieve its bullshit.

You start a conversation you can't even finish it

Question Time – here’s a non-technical tip: if you have a bunch of exposition, it often looks weird if a sprite just spouts it when activated. I mean, I don’t stand in the town square and give my life history to anyone who walks nearby.

Instead, I like to make it look like NPCs are  responding to a question from the player; this is why NPCs in “Realm of the Dread Sorceress” say things like “Am I ghost? Yes, I’m a ghost and let me tell you why...”. You don’t even need to show the question, the player will work it out.

Okay, hope you found something useful in that brain dump. Ben out.    

Files

index.html Play in browser
Feb 03, 2018

Comments

Log in with itch.io to leave a comment.

hey, what coding language do you use to code this stuff? because i need to learn it for my gamedev. :)

hey, bitsy is written in js, but the internal dialogue code is something slightly different and not very well documented

Thanks for posting this. It's really helpful. Your Bitsy games are really incredible and inspiring. I  think Realm of the Dread Sorceress is particularly clever and raises the bar for what a Bitsy game can be.