Right now I'm programming a text engine for use in the ongoing game and others.
Basically I want all dialogue be stored in external .txt files, which are then parsed in-game.
That way the game can be easily translated, as well as modded in some ways, depending on the game (since in-game functions can also be parsed through the text).
In general, it's just easier to write something like this,
Looks like a trapdoor.
If I had the key, I might be able to open it.
It should be somewhere on this floor.As opposed to this
name = "Girl"I'm still trying to figure out how I want everything to be formatted. For example, multiple scenes could be contained within one txt file, or different npcs and any branching dialogue could be separated into different files. Either way has situations were it might be difficult to keep track of, over time.
message = "Looks like a trapdoor."+"\n"+"If I had the key, I might be able to open it."
name = "Girl"
message = "It should be somewhere on this floor."
I also have to decide how certain things will look when writing. For example I need to decide which symbols will be used to denote certain functions;
# denotes that a number can be entered.
# Use name associated with number until another name is used.
#> Put portrait image for corresponding name on the right.
#< Put portrait image for corresponding name on the left.
[d]# Dialogue number.
[d>]# Go to corresponding dialogue.
[f]# Set flag to true.
[f?]# Check if flag is true.
[e]# Call event.
An example of an interaction would look something like this, (Assuming you use portraits and stuff, otherwise it would look like the one above.)
I'm here to buy something.
Do you have a membership card?
If you don't have one then you can't shop here.
Yes, I have it. It took a lot of work to get it.
Then take a look around.
No I don't.
2That said, I haven't really decided for sure yet what all the functions should be.
That's a shame.
I won't be using all of them in every game.
Anyhow, that's all for now.