I'll explain the difference between my program and some common approach to model stories.
If you want to know about it in more detail, have a look at https://gitlab.com/porky11/simple-petri-net
If you are not interested, but want to help me for creating a visual novel, read the next post.
The approach used by most stories here is the following:
* The story is a set of chapters
* Every chapter ends with a decision, which selects the next chapter
This method only allows stories with a single story line.
It also does not allow to save some previous decision.
Cycles are useless.
Why would you want to have multiple story lines?
* You have multiple characters and you want to decide the actions of both (for example you control the actions of a pred and a prey, even if they are seperated)
* You have a single character, but want to be able to do some actions in arbitrary order
* You can split yourself into multiple personalities (after two preds eat you, you can control both of them partially)
Why would you save previous decisions?
* You decide the race/sex of your character, but many scenes should not depend on the race/sex
* You take some decision, that has no consequences (at least both decisions may lead to the same chapter), but after that chapter, the decision should have consequences again (or at least other people should be able to use this information when extending the story) (for example, you meet a predator, but when you stay alive, it doesn't matter, if you persuaded him or killed him. Then the story goes on. And maybe a few decisions later, if you persuaded him, he will help you, or if you killed him, his friends will eat you)
Why can cycles useful?
* Being able to take multiple decisions after the same scene, but still have consequences (for example, first you can decide to cuddle him, to eat him, or to let him go. If you decide to cuddle him, he will still be there, so the decisons won't disappar. But if you cuddled him, before you let him go, this may have consequences, like he could come back)
* Going from place to place can be modelled as linear story with alternatives, where some decisions lead back to some place, you were before. When the progress of some parallel story lines will be saved, it's possible to do different things at the same place, while being able to decide yourself, to which place to go
My way to model stories allows all of these.
You don't define decisions at the end of a chapter.
Instead a scene is connected with a decision.
So your chapter won't look like this:
- Code: Select all
Chapter 1:
…
You are not sure, what you should do with him
Decision 1: You eat him -> Chapter 2
Decision 2: You let him go -> Chapter 3
Chapter 2:
Since you aren't hungry anymore, you can go on
…
Chapter 3:
He is happy and immediately runs away
…
Instead they'll look like this:
- Code: Select all
Scene 1:
…
You are not sure, what you should do with him
Scene 2:
Decision: You eat him
Since you aren't hungry anymore, you can go on
…
Scene 3:
Decision: You let him go
He is happy and immediately runs away
…
Additionally you have to tell, how the scenes are connected:
- Code: Select all
2|3: 1
This means, one of the scenes 2 and 3 follow after 1.
You could also write this:
- Code: Select all
2&3: 1
This means, that as well 2 and 3 will follow after 1, and you can decide, which of these scenes you want to read first. Theoreitcally it would even be possible to read both scenes at the same time or switch scenes while reading.
In this case, it would not make sence, that both decisions will happen, but there are other decisions, where this really may be useful.
It's even possible to model very complex story hierarchies using this modelling language.
It is documented here: https://gitlab.com/porky11/simple-petri ... anguage.md
The next post will be about the visual novel, I want to create.