Narrative scripting/programming tool. Write stories in your favorite editor using a feature-rich language, compile them into a very small and simple language to easily integrate them into your game.
Currently, Wyrd handles player choices by providing the interpreter with a rich text computation and a sequence of instructions for each player choice. This is needlessly complicated for the interpreter to handle, and is the only case of a set of instructions being passed as parameters (which is not supposed to be supported in Wyrd anyway).
Instead, the code should contain all these sequences of instructions, prefixed by a SetPC to jump over them, and affixed with a SetPC to go just after the next ResolveChoices instruction if the sequence is executed. Using this, the AddChoice instruction should only have for parameters a rich text computation and an integer corresponding to the line starting their sequence. The interpreter can then simply react to ResolveChoices instructions by setting the Program Counter.
Currently, Wyrd handles player choices by providing the interpreter with a rich text computation and a sequence of instructions for each player choice. This is needlessly complicated for the interpreter to handle, and is the only case of a set of instructions being passed as parameters (which is not supposed to be supported in Wyrd anyway).
Instead, the code should contain all these sequences of instructions, prefixed by a
SetPC
to jump over them, and affixed with aSetPC
to go just after the nextResolveChoices
instruction if the sequence is executed. Using this, theAddChoice
instruction should only have for parameters a rich text computation and an integer corresponding to the line starting their sequence. The interpreter can then simply react toResolveChoices
instructions by setting the Program Counter.