“True King” Update (2019/08) – Character Creation and In-Game Cutscenes

The WordPress interface says I’ve published over 200 articles on this blog. Cool!

In the past couple of months, I’ve updated the website for “True King” to be a bit more up-to-date (the first time I’ve updated it since 2017). Notice it contains a new video, private to YouTube and only available to view on the site, giving a glimpse of the current state of the game’s environment. I’ve tried to push the site to Google’s indexing system, but unlike the past, I notice Googling “true king game” doesn’t bring up my game in the early results, one of many issues that will no doubt affect the game when it eventually releases.

But today, I want to focus on new developments I’ve added to the game: a character-creation system at the beginning, and an internal ‘cutscene’ system that takes place during gameplay.

A screenshot of the official website for “True King,” as of 2019/08/25

After about a month of trying to create new sprite assets for the game, I realized that would take longer than I thought: I only finished about 1/2 of the ‘hair’ assets I wanted in that time. Eager to make progress, I’m taking a new course: to finish gameplay first, starting with the first few minutes of the player’s experience. I should have taken this strategy years ago. Just in the last few weeks, I’ve made good progress with these two new features (neither of which are fully finished, but will be in a week or two).

A big part of the game’s story and gameplay involves the fact that the true heir of the kingdom was killed before his/her identity was publicly known, allowing you to create a character with a bit of customization. Furthermore, the game will require you to play as new iterations of the same player, again requiring you to create a new hero. So I’ve create a scene that begins at the start of the game to allow you to do this.

There aren’t many options: you will be able to choose a name, a gender, and colors for body parts like your skin, eyes, hair and clothes. Some of these options will require new sprites, which don’t exist yet. But I’m happy to have the screen exist at all, better giving me a sense of what is left to do, and for now, making up the first minute or so of the game experience as I intended it to be.

A pre-alpha version of the character-customization screen of “True King.”

The second feature is more substantial: the ability to define and play out in-game cutscenes, taking place during gameplay, with game assets. It’s a feature almost every game has, but up to this point, I’ve ignored implementing such a thing in my 6+ years as a developer. Up to now, any story elements I needed took place during gameplay, with some simple narration, or through pre-rendered video. That won’t cut it for “True King.” So I finally implemented it. And satisfied with my method, it’s a design I will likely use in future games as well.

I don’t know how other games go about it, but here’s what I did: I have a C# class in Unity3D that has a list of ‘cutscenes.’ These are a of the data-type ‘Cutscene,’ which I define as an object with a list of ‘CutsceneEvents.’ Also a data-type I define, ‘CutsceneEvents’ contain a bunch of variables, such as an index (int), length of time to play (float), type of event (enum), Camera start and end positions (Vector3), player start and end positions (Vector3), Camera start and end rotations (Euler angles – Vector3), etc… Managing logic checks to see if a cutscene is supposed to be active, and if so, which event within the cutscene should be running. The length of time for each event allows the cutscene to automatically proceed, and eventually, end, or else transition to a new scene. It even has logic to animate black bars on the top and bottom, a visual indicator that a cutscene is taking place! Also the ability to start a cutscene after walking through an “OnTrigger” collider, or at certain moments as defined by the game’s core manager logic. Ultimately, all of these events either have to be defined in code, or else in files that can be transcoded easily into C# variables (like JSON, perhaps).

For now, I haven’t implemented a way for this cutscene system to utilize the existing system I have for triggering dialogue, or for prompting the player to make a choice. Hopefully, it won’t be difficult to tie the two existing systems together.

These sound like minor features, especially since they aren’t technically finished yet. But after finishing them, I can define the rest of the game experience in a matter of hours. After that, I just have to finish polishing the ‘strategy map’ part of the game, and I’ll have the bare minimum of the game finished and ready to play, from start to end!

Anyway, I’ll get back to work.