It’s a surprise to me that the first post I’m making about my journey of creating an IF is about coding, especially when I enjoy the artistic side of such a project more.
Perhaps it’s because I’m trying to figure out how to use a database and backend for the thing I want to create. Let me explain: one of the features that has been both a blessing and a curse is the "Continue" button that tends to appear in every WIP.
This one, for example.
I utterly love and despise that button. I love it because it helps me decipher the coding behind the project and gain a better understanding of the story's branching. And yet, I hate it for the exact same reason.
What I want to achieve in my project is to eliminate the necessity of such a button. But how do I do that? I’ve been experimenting with creating a module that would allow the program to pre-load all the branches. Once the program compiles all the branches, it would deliver a cleaner text to the reader, effectively removing the need for the "Continue" button.
For example, let’s say we have the following branches:
1 Branch: “Today is a great day,” you thought, deciding to invite your $nameRO to: >The beach >More options" 2 Branch: “The beach is great, and $nameRO": 2.1 (if RO likes the beach): “loved the time.” 2.2 (if RO hates the beach): “hated the time.”
So, once these branches were processed in the module, it would look like this:
"The beach is great, and $nameRO loved the time.”
Rather than something like this:
"The beach is great, and $nameRO" Continue (bottom) "loved the time."
Of course, this is a simplistic example, but that’s what I wish to achieve.
There’s a big problem with this, and it’s mostly related to text flavor. Text flavor, as I intend to define it in this post, refers to variations of the text that tend to be no more than a few sentences and aren’t actually coded as a new branch. Such flavor text usualy can be seen with a simple if-sentence in the branche.
The coding in Twine and Dashingdon allows for if-statements inside the branches. However, the program I am planning to create treats everything as a string, as plain text, and can’t differentiate between what I intend to be a variable and what is just text. The program can't understand that, when I say $nameRO, I wish for that variable to be replaced by "Agustus" or the RO's name the player has chosen.
So yep, a lot of things to do. I have a rought idea on how to resolve such thing, but for now thats what I have.













