More complex cutscene

A few updates lately, also slowed by some holidays. I guess it's also time to grumble about modern software bloat, in my case JetBrains Rider, which has been consistently slowing down month by month, so that work on the laptop is really hard, and I started detecting slowdowns on the desktop too. Latest version promises performance improvements, so let's see.

Back to the game. The current roadmap part starts with being able to have cutscenes, and then will follow into being able to make a tutorial level that interleaves story (via cutscenes) and gameplay, which will include some tutorial quest objectives probably too. The cutscene functionality would ideally be usable for procedural levels too, but that's a later (and nice-to-have) TODO.

One of the main sources of complexity for the cutscenes is that the world does not freeze when cutscenes take place. This means that cutscenes can play while the rest of the world goes on. The reason for this, is that:

  • A "frozen" world will look weird, imagine a cutscene in a village with villagers - two people talking and everyone else waiting in place. Yes ok it's a game and we can take liberties, but it is nicer if others keep moving about.
  • Some cutscene actions will require people to follow some standard AI process. Example: we have a battle cutscene with several soldiers following their leader towards some enemies. Instead of scripting everyone, I can just set a temporary AI for the leader to go to the enemies and the soldiers to follow the leader. Maybe they yell some war cries in the meantime. When leader arrives near some designated spot, cutscene ends and everyone continues with their regular scripts. It should also be easy to basically skip turn of everyone not involved in a cutscene, if such need arises, especially in situations where some hostile entity could start messing about with the actors.

Changes to last time and previous rudimentary examples:

  • Cutscenes are all defined in JSON, and runtime needs to match entities to cutscene tags. E.g. "general", "villain", "soldier" tags are used in the cutscene, and the runtime selects who plays whom.
  • UI centered text is now supported as a cutscene part, including some fade-out
  • Minor updates for my user-facing prefab generator, to support things like naming entities, setting tags, etc.
  • A few more console commands usable from script,

I made a new silly script aimed as a proof-of-concept and to demonstrate latest capabilities, so here it is. I had forgotten that I had connected screen shake to controller vibration and the first time I ran it and the screen shake kicked in, I got a jump scare as the controller rumbled on the metallic hollow-ish desktop tower xD

Next step is to update the prefab generator further to be able to create the tutorial level. This mostly requires being able to place entities with a solid level of configuration, e.g. a human that looks like this, has these abilities and these items. After that is done, then the cutscene(s) for that level need to be created and set the triggers that activate them. That's it for now, have a nice weekend!