Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Best approach for desiging/programming in-game cutscenes?

Discussion in 'Editor & General Support' started by PascalTheDog, Sep 4, 2021.

  1. PascalTheDog

    PascalTheDog

    Joined:
    Mar 16, 2015
    Posts:
    86
    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!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,514
    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:

    https://forum.unity.com/forums/timeline.127/

    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
     
  3. 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.


    And a bit older, but shows some techniques.
     
    Last edited by a moderator: Sep 4, 2021
    Kurt-Dekker likes this.
  4. yonatanab1

    yonatanab1

    Joined:
    Sep 9, 2018
    Posts:
    56
    Hey Kurt!
    Sorry for bumping this relatively-old post :)
    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:
    Code (CSharp):
    1. character.say("hello");
    2. character.goTo(Vector3.position);
    3. 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 :)