(Almost) Finishing with the codes (Patreon)
Content
Hey guys. I had said in the last post that I intended to finish the code changes by the end of last month. I could have fulfilled that prediction, but I found a few areas that needed a little attention before I moved on to the next step. The changes that were made make a big difference in the scene editing process and will make things a lot easier for me. Although it is difficult to explain, since everything is related to processes that happen "behind the cameras", I will do my best to explain.
The main change is about how cutscenes are sequenced. I created a system that I call "Screenplay", where each action happens within a "Line", which can be a speech, a thought, or an action. This hasn't changed, but before the lines were sequences in a timeline.
I worked with video editing for a few years so sequencing it this way would be the most natural. However, there are many problems with using a timeline. It's very messy, the commands are stacked in dozens of lines and as the scenes are not linear, it's difficult to notice any failure in the connections between the lines.
I then decided to abandon the timeline and create a more organized way of sequencing lines based on nodes, here is the result.
In this system, each line is represented by a node, and I can see each connection perfectly. In addition to being faster and easier to edit, this makes it easier for me to see the path of conversations, avoiding mistakes even in scenes with complex dialogue.
Each node triggers all the necessary commands for each moment of the cutscene. For this to work I needed to add some improvements. The movement, for example, was all animated on the timeline, I needed to animate the characters' direction and steps. Now the system is automatic, I need to place a marker and ask the character to follow it.
To do this, I make use of the AI system that allows the character even to avoid obstacles. It sounds easy (and it is, now that it's done) but I've had a lot of work trying to get the AI to work accurately on other projects. Here you can see how Nicole always stops exactly at the mark.
Another change worth highlighting is the activation of facial expressions, due to the change in the save system. Before, I needed a list of expressions for each character, and that's why you saw the same expressions repeated throughout the game. The new system saves all expression data, which allows me to go crazy on faces (but I promise not to overdo it).
Not a single line of code was left untouched. I optimized every system in the game and added tools to help me edit scenes. One system in particular that required work was localization, which works translations. The old system worked, but it was a bit of a workaround. I spent a few days creating a new system before discovering that Unity already has a native localization system, which includes some features that interest me.
Another change that occurred to me in the last few days is that I should also create a node system for game tasks, which would avoid bugs like dead ends and infinite loops. It will take me a couple of days to put this into practice, along with the conversion of the translation system, and then the code review stage will be complete.
I also spent some time testing AI voices for the characters, but I think that's a topic for another post.
For now, I thank you for your support, and I wish you all the best.
Files
Previews only