[...] despite having split the code into about 10 files.
I wish I could split all the dialogue into a separate file.
Hmm, i'll complement the response you already got, because there's something odd in your question.
You separated the code into 10 files, yet you wonder if you can do the same for the dialogues, what seem odd.
I mean, if you've already split your code, you know, at least more or less, what's said in the comment above this one. But then , you shoud also know that you can split the dialogues into separate files... yet you don't.
Therefore, I assume that you're the kind of people who've 10.000 lines by files, with just 1 or 2 labels inside it. Or the kind that have more labels, but all as part of a big flow just to let different branch join when needed ; something like:
Code:
label whatever:
[...]
menu:
"choice 1":
label blabla_1:
[...]
jump regroup_1
"choice 2":
[...]
jump regroup_1
"choice 3":
jump blabla_1
label regroup_1:
[...]
While both are perfectly legit, they also are far to be the best option, because there's too much information and it's difficult to retrieve something in particular.
You know, by example, that what you search for happen the 2 days, but your label for the second day have 25.000 lines... and it's somewhere inside this big soup.
Therefore, the first step before splitting your code into files, is to split it into labels.
Your story isn't a big sequence between two characters, captured by a single fixed camera, and that will happen during an eternal second. It's more at the opposite, a slice of life involving many characters, many locations, that will need many days to happen. This give you a first division for your labels:
- The location change ? Poof, a new label.
- The time advance significantly ? Poof, a new label.
- A character replace another character as interlocutor ? Poof, a new label.
And so on.
Each time a movie director would say, "cut, take a break and we will pass to the next sequence", you have a natural place to end your current label.
This present many advantages:
- You have smaller labels.
Even if the visual change with every line, 2.000 lines of code represent a ping-pong of 500 dialogues lines by character. It's enormous for the vast majority of scenes.
- You can write the scenes in the order you feel it.
You've to write the first kiss scene, but right now it don't come. One hour that you're stuck with it, and you only write stupidities... Don't force it. Pass to a scene after this one, a scene that come naturally to you, and come back to this first kiss when you'll finally have it.
- You can (relatively) easily rearrange the order of the sequences.
Now that you've the content in front of your eyes, a scene feel better when it happen earlier, or later ? Just change the moment you jump
/call
it.
Of course, try to not do this after the update is released, and don't forget that it can change part of the dialogues of other scenes. It wouldn't feel right if a girl talk about her first kiss with MC, but the said first kiss have been finally moved after this moment.
- You can easily remove a scene.
There's always a difference between what you had in your head, what you wrote in your script, and what you finally get once the content is wrote and the visual parts added. And this difference sometimes imply that a scene feel totally useless. Well, just remove the label and its content, remember to correct your jump
/call
, and your game don't feel odd anymore.
- You can easily add a scene.
It's the opposite of the previous point. In your head, "this" felt obvious, but now that you played the whole day, it isn't anymore. You need an additional interlude to solve this problem. Well, just add the label for it, and correct your jump
/call
.
Of course, all this can also be done if everything is in a single big label. But to do it you've to read the whole label in order to find the right scene to remove, or the right insertion point. And when you want to move a scene, it's worse since you've to find both the scene, then the insertion point. You'll need hours to do something that need less than 2 minutes if you've a label by sequence.
And obviously, the first and most interesting advantage is the one I don't listed: It's so much easier to edit your code.
You need to correct something in the dialog that happen when MC have lunch with the girl ? It's not "somewhere, more or less in the middle of the 20.000 lines label for the day X", it's in the, probably less than, 500 lines of the "dayX_lunchWithGirl" label.
Then, once you've your code split in a bunch of small labels, you can arrange them like you want in multiple files, depending of the nature of your game. And this,
79flavors already explained it perfectly.