ERAVOLA: Let's Learn How To Read

I'm continuing the project from the WAG challenge (finally!), and I'm going to continue reporting the progress like I did then. First order of business: Make the computer read text.

November 4, 2015

I got the complete feedback from the judges who played my WAG Challenge [LINK] entry "Eravola" recently. I hadn't looked at the project since June when I made the game (and briefly a month ago, where I gave it a menu for a demo), but reading through that really gave me a reinvigorated will to improve it.

Previously, I had the idea I would make a sequel or a new story set in the same universe, but I got stuck on that and never could figure out exactly what I wanted to do with it, so nothing happened. However, reading that feedback made me realize how much work I can still do to the original Eravola to improve it and make it really awesome. So that's what I'm going to do.


I actually wrote a (rather long) post-mortem on Eravola--intending to upload it here--but I never fully finished it so instead what I'll just do is list the major problems with the game as it currently is and how I'm going to address them. This'll probably be done as I tackle them, so this'll be about the first problem: Authoring Hell.


The previous game was made fast. Any game made in a month kinda has to be. However, since I made everything myself from scratch, a lot of the underlying system and code structure was bad. This especially made implementing the dialogue in the game take up about five times more than it needed, probably.
If you're a game developer or a programmer, you probably know of or have worked with a system to implement dialogue or similar in a game. These are usually done in a spreadsheet format or a tree-branching thing like Twine where the designer/writer/non-programmer can implement their dialogue without worrying about the code, and quickly testing it out in game.

See... I didn't do that. I implemented my dialogue directly in the code. It looked like this:

This is just TWO dialogue screens. Yes. 17 lines of code for two dialogue screens. Ouch.

I had to do this for EVERY piece of dialogue in the entire game. There's in total just about 2000 lines of code just for the implementation of what I had already written somewhere else, all done through manual copy-paste.
I just know every programmer reading this is curling their toes into a pinhead right now.

And no, it wasn't because I didn't know that I could read a text file in C#. No, it wasn't because I didn't know how to do it. I... just didn't feel like I had the time to implement that system. I spent a week setting everything else up around this, and I needed to begin writing (since this challenge really was all about the writing), so I didn't want to spend more time programming.
And... I think it was actually the right choice. Sure, doing a smarter system from the beginning might have saved me some time, this allowed me to get writing faster, and iterate on the story more, as I continued to program the rest of it all. And even if it wasn't, the game turned out alright regardless, so whatever.


Now, though, it's time to fix past mistakes. It's time to turn that nightmare into this:

Work-in-progress snippet of the new system. )Also notice the name momIntroGreet. But the mother's not in the game?! What could it mean? (Nothing. The answer's nothing.))

This little magical snippet of code will read ALL the dialogue from an appropriate text file and make it work for the rest of the system. Yes. All of it. 2000 lines turned into 100 (Of course, the text itself is just moved, so there's still a lot of text if you want to look at amounts in that context).
Any programmer will also realize there's some problems with that snippet. I'm aware. It isn't done yet. But this has 60-70% of the functionality already. The only thing I'm missing is the capability for several dialogues in the text file (easy) and the possibility of altering the dialogue depending on states in the game (harder, but manageable I hope).

This'll allow me to, as a writer, import my text into an spreadsheet and read it directly from that, which should be much simpler to work with (and much less susceptible to errors. You don't want to know how many stupid errors I had because I forgot to change some random thing with the copy-paste system).


My first order of business is to fix this and hopefully implement it so I can do branching/alterations to dialogue easier than what I had it before. Because that was such a pain I won't even go into it now. Next, I'll begin adding proper branches to the story and see where that takes me. Exciting!