How to code/setup a very simple cutscene?

Hi, first time poster here (If this is the wrong forum for this, I’d like to pre-emptively apologize - I was not certain where to put this!).

I’m a first-year video game design student, and I’m trying my hand at setting up a very simple cutscene at the very start of my game in order to get the story going. I’ve done some very simple school projects before, as well as some on-site tutorials (Roll-a-ball and such) but I’m not quite sure how one would go about doing a cutscene.

I’m not looking to make something complicated like a video; I just want a static image/scene of the characters with a dialogue box beneath them where the player can progress the conversation by clicking a button.

I’m not sure how to do this; do I create difference scenes (as in the Unity term) or just create take screenshots of the characters how I want them in the scene and display the images? And how would I code some kind of controller to take care of displaying and switching between them?

Well in you’re example it’s not really a full cutscene, so there’s no need to do something special. Simply place your character on the map and create a bubble with the UnityUI elements. You can then simply place buttons in it to progress the conversation. You can also place two cameras and position them properly in front of your characters and simply switch between them when the player clicks a button or does whatever you want him to do. It’s not a bit deal :wink:

For some more automatic cutscenes, you could simply use the animation part of Unity, it’s pretty easy to record something while moving around with the camera nd then simply playing this record. I guess you can also script some objects and stuff between the runtime of that recorded video while playing it. So a Cutscene is mainly a scripted or predefined part of your game where the play has to follow a specific storyline (whether or not interacting with the world), so it’s basically the same as scripting the game :wink:

Hope that helps a bit (sry for bad/complicated written english :stuck_out_tongue: )

Yeah, it is more of a slideshow, innit? :stuck_out_tongue:

Anyhow, I haven’t worked with UnityUI before. Got any starter tips?

How comfortable are you with C# vs using the Unity animator? Because there are multiple ways of doing this. Off hand, the two I’d think of are:

Animation Way:

  1. Set up an animator that progresses through states based on a “next step” trigger. Each state can set the text, visibility of objects, motions, etc.
  2. The button just fires the “next step” trigger when clicked, which would be a pretty simple script.

Code/Config Driven Way:

  1. Store your dialog in a configuration file - I like JSON, personally.
  2. Besides the dialog, put some commands in there, for things like switching images.
  3. Make a “player” class that takes that configuration, has references to the text box and any objects you want to modify, and plays through the dialog.
  4. The player class has the logic to handle any commands in the configuration. Or you could use polymorphic JSON to have the commands handle themselves, but that seems like overkill for this purpose.
  5. One of the command types could be “send this trigger to the animator”, so you can still use animations if you want to; they’re just not the primary control mechanism.

Just saw this, maybe you can give it a try and it works like a charm for you :wink:

And you can simply check these tutorial videos from unity to setup your UnityUI (buttons, etc.) to make it even more easier you could just render your character and place them as images also as UnityUI elements.