Wednesday, January 16, 2019

Moved into new place

Moved into my new place. Still settling in but I'm back to working.

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,
1
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[0] = "Girl"
message[0] = "Looks like a trapdoor."+"\n"+"If I had the key, I might be able to open it."
name[1] = "Girl"
message[1] = "It should be somewhere on this floor."
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.

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.

[p]#   Choose portrait image for the character who is speaking.
[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.)


///////////////////////////////////////////////////
1<
2>
[d]0
[f]0  
1
[p]0
I'm here to buy something. 
2
[p]20
Do you have a membership card?
If you don't have one then you can't shop here. 
[f?]10
[d>]1
[d>]2 
///////////////////////////////////////////////////
[d]1
1
[p]1
Yes, I have it. It took a lot of work to get it. 
2
[p]21
Then take a look around.
[e]10
////////////////////////////////////////////////////////
[d]2
1
No I don't. 
2
That's a shame.
;
That said, I haven't really decided for sure yet what all the functions should be.
I won't be using all of them in every game.

Anyhow, that's all for now.