Best approach for desiging/programming in-game cutscenes?

Hey,

What I’m referring to as “cutscenes” here are the old-school vignettes that tell a bit of the game’s story as the players sits back and watches. My focus isn’t on “cinematic” stuff like camera movement or voice acting, but on the simple succession of events that make up a vignette. Think of 2D Final Fantasy or Paper Mario games as an examplar of that trend. Nothing fancy going on, just a sequence of events that might as well have happened during gameplay.

You’re not controlling anything but there’s a ton of stuff going on during those cutscenes. Characters move around, textboxes pop up, sound effects play, the view switches back and forth, and at some point a battle starts, or a scene loads, or a flag is set, or you get an item, who knows — and all of this needs to happen at exactly the right moment.

Pretty much all of a game’s systems are potentially mobilized — and the sequence can get quite lengthy. What’s the best way for an indie developer to tackle that aspect of development? Does it require anything to be hard-coded? I mean, you’re kind of writing a screenplay in a way, saying such character needs to walk to such point and do such thing and whatnot without controls. Is there a tried and true way to handle cutscenes?

I would love to know more. Cheers!

Pascal, this area of gamedev drives me nuts!

No matter how much I jump into it, I find it frustratingly slow to make cool stuff, and soon I lose interest in cutscenes and just want to code some more interactive gameplay.

I really don’t think there is a “tried and true” way to do cutscenes.

I think there’s only ways that have been used, and those include

  • hand animating EVERYTHING

  • hand hard-coding EVERYTHING

  • animating some stuff, driving it with light scripting (possibly interactive)

  • using a “bigger picture” package to schedule parts of the above

For the “bigger picture” stuff, Unity has put out a package called Timeline and there’s a forum for it:

I haven’t tried it yet meaningfully. I’m still animating and scripting stuff, when I buckle down to it.

Tactically I will say this: to the extent possible, have a separate scene to contain ONLY the cutscene, then transition to your game scene.

This is harder if it is a middle-of-the-scene kinda cutscene, like “Hi, I’m the shop vendor, nice to meet you” type thing that happens as you saunter up to the potion shop.

And all assets for that scene should go in a folder: animations, animation controllers, any special textures, or prefabs or what-have-you.

Organizing it into folders will help your sanity a lot.

Just my $0.02

Timeline and Cinemachine plus whatever shader-trickery and post-production effects you want.

It really doesn’t matter that much if you work with two or three dimensions here, camerawork and animation and orchestration are equally needed.

https://www.youtube.com/watch?v=o8kh49Pjo2Y

And a bit older, but shows some techniques.

https://www.youtube.com/watch?v=Jy91PQtQeOY

Hey Kurt!
Sorry for bumping this relatively-old post :slight_smile:
I am currently bumping my head over this, in attempts to make my own system for handling story and cutscenes.
If you have found new breathtaking ideas to building such system, I would love to hear!

my solution so far was to organize the world into “characters” where each character is a class with a scriptable-object for it’s properties and some functions for cutscene handling.
then I would have an IEnumerator function that calls each character:

character.say("hello");
character.goTo(Vector3.position);
character.say("Nice!");

however using coroutines seems dangerous as it blocks simple Unity tools that could be really helpful here.
it definitely needs to be on a separate thread though, as it’s an event of functions that run in their own time.

what do you think?
does this sound like trouble or would it work out?
would love to hear your opinion :slight_smile:

I’m not the gentleman quoted, but I’m also developing a cutscene/story system for an ARPG, with heavy inspirations from Final Fantasy VI.

I thought about using Timeline, but it is very buggy and developing custom scripts for it is very time consuming and the API is confusing. Also, even though I have some cinematic camera cutscenes, it’s not that complex.

Another approach, much like yours, would be using a Command Pattern, so instead of using a coroutine, every action becomes a command, and those are executed in sequence. However, writing it all up in code might be time-consuming, you wouldn’t have the possibility of visualizing it in the editor like Timeline, but it’s way much easier and won’t make your brain melt.

At last, it’s the Behaviour Tree approach, using any Behaviour Tree node editor available. This would work like the command pattern, but since it is a behaviour tree, you’d have much more control about the flow of the cutscene. You might want to make branches or add conditions to it, BTs are excellent for that.

I tried the command pattern once, but didn’t like it, now I’m thinking about either the Behaviour Tree or the Timeline approach.