叙事目标
原能力
说明关键段落要传递的事件、情绪或体验,让制作团队对取舍有共同依据。(细化版 p.12–13)
首选项目
Ink(MIT)。 Ink
匹配范围
分支和状态组织关键段落要传递的信息。
源码
Ink · public string ToJson(
ink-engine-runtime/StoryState.cs · 37–50 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
public string ToJson() {
var writer = new SimpleJson.Writer();
WriteJson(writer);
return writer.ToString();
}
/// <summary>
/// Exports the current state to json format, in order to save the game.
/// For this overload you can pass in a custom stream, such as a FileStream.
/// </summary>
public void ToJson(Stream stream) {
var writer = new SimpleJson.Writer(stream);
WriteJson(writer);
}
Ink · public void ChooseChoiceIndex(
ink-engine-runtime/Story.cs · 1794–1807 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
public void ChooseChoiceIndex(int choiceIdx)
{
var choices = currentChoices;
Assert (choiceIdx >= 0 && choiceIdx < choices.Count, "choice out of range");
// Replace callstack with the one from the thread at the choosing point,
// so that we can jump into the right place in the flow.
// This is important in case the flow was forked by a new thread, which
// can create multiple leading edges for the story, each of
// which has its own context.
var choiceToChoose = choices [choiceIdx];
if(onMakeChoice != null) onMakeChoice(choiceToChoose);
state.callStack.currentThread = choiceToChoose.threadAtGeneration;
实现与验收要点
策划本身、情绪目标、不同媒介表达和创作者复核。