sunnuntai 18. toukokuuta 2014

Speed boost

Another problem I've had with the game is not really in the design but engine. And not really that too, just the difficulty of doing it. There are many things like that in the project and most of them can't be made automatic. For example the special attacks in battle system are impossible to do automatically or then all of them would look the same. Story and side events are also something like this since each of them have a really similar structure, but there are always those little "exceptions" that make it impossible to make it any more automatic.

However, I've succeeded in making one part of the development process much faster. This is dialogs.

When I create dialog, I first have a plan for what I will write. This is basically a summary of events, though usually they go to more detail than necessary, which is useful though. Based on that, I'll write the official script, which is very simple and easy to read. Each line tells the line and which character says it.

This is really simple to make automatic. I created a little program that goes through each line and then turns it into a dialog-element of the code. I can basically copy and paste it to the code and it will work.

However, during making the script I've also taken lots of freedom when writing. For example, not every line tells which character says the line, only when the sayer is not the same as in previous line. This though, I've managed to fix and the program recognizes who said what last time and if it's the same person now.

Then I happen to do lines in script where I define the sayer very vaguely, like "everyone", "???", "everyone else" or specific people. This I can't make automatic and I have to fix it manually.

There's also different dialog types, but I think it's actually very possible to recognize them and it's something I'll try to do. What could be also done but I haven't even done to the script, is the emotion of the line. Each dialog-element hold and emoticon which is shown next to the dialog, but I haven't marked these in any way to the script, so they can't be read from the script until I write them to the script.

And the final thing that could be made automatic but is not yet possible: recognizing the ID of the sayer. IDs are used to recognize people in the game and the dialog-system uses these to position the dialogs in right place. This has two problems: they're not marked in the script. There is also the option for "IDless" dialog, which means the dialog will be shown in the defined position and it doesn't link to any character in the game. So basically I could do a little library of names and corresponding IDs, so the ID is created according to the name.

So there are still a little things I could do, not to mention, even with the changes, there are still a lot of things I'd have to do manually. But all in all, just the fact the dialog-element structures can be made this quickly saves me a lot of them. Especially with long parts of the scripts, like the one I'm working on currently.

Ei kommentteja:

Lähetä kommentti