top of page

Custom Inspector for Cutscenes

  • Jeffrey Barkun
  • Oct 21, 2016
  • 4 min read

An aspect of the game that the group wanted to explore was narrative; in order to tell a narrative, the group agreed that we’d use comic-book style cutscenes (see below for an example) to tell the story. We also wanted to make our cutscenes unique by including the slapping mechanics in them; this leave comic book style cutscenes with the option to slap or not slap. In order to accomplish this, we decided to have a custom Unity interface dedicated to making creating these cutscenes easier.

Mass Effect 2 – PS3 Intro Comic. (n.d.). Retrieved from https://www.youtube.com/watch?v=for8c0lESTU

Mass Effect 2 – BioWare/Electronic Arts

Inspiration for Cutscene Style

In order to make these cutscenes, I got started on preparing the interface so that it’s easy for the narrative and art team to implement what’s required for the cutscene. The main goal was to make it so that most of what they needed to work on for each panel can be accessed in as little gameObjects as possible; this means that aspects such as the time the camera focuses on the panel, the frame of the panel, and the background can be accessed all in the panel’s gameObject. The gameObject was also made in a way so that the artists can just drop their assets into a specific folder and access those assets through a drop down (for example: if there’s a specific frame the artist wanted for the cutscene, they just drop the frame image into the specified frame folder and they can access it easily through the drop down for frames). There is also a button that will allow the Game View window to preview what the panel will look like when the game reaches that panel.

In terms of the transitions between each panel, there are three different possibilities: a Timed-Only panel (where slapping only impacts the environment of the panel), a Slap Impact panel (where slapping will change which the next panel will be), and a Game Transition panel (where the game will transition into the main game). To keep the interface easy for the users, the inputs will change based on the option. Timed-Only panels will allow the team to choose the next clip when time is up along with grabbing the image of Player 1 and Player 2; in the Player 1 and 2 objects, there would be custom scripts for what happens when the player slaps. For Slap Impacts, the team can pick the next panel for when time runs out, when Player 1 Slaps, and when Player 2 Slaps. For Game Transitions, player gets the same options as Timed-Only except replace the next panel with selecting the next scene to play.

For dialogue, there will be speech bubbles in the comic where the words will appear one at a time. To make this easier for the narrative team to write and edit the words, a custom asset called “Dialogue” has been made where the team can write down the entire line, time when each word appears, preview it, and add a voice clip (in case we have time to include voice acting).

Problems in Coding

There were two problems encountered when coding for these custom inspectors; both of them where easily solved by similar lines of code; in fact, both of these issues were resolved by researching deeply into similar issues through Google. One problem encountered was adjusting text in real time from a different object and the other was problems with inspectors saving scripts. Since changing the text in the panel script doesn’t update the text in the Text object, a line of code was added to make it update on the spot; this fixes it by checking to see if the current text is different from the text object and, if so, set the object as Dirty and fix the text.

The Inspector would also not save when something was changed so, when the variables in the panel changes and someone switches scenes, the variables would return to null when they come back. To fix this, the script would check to see if the GUI changed, and, if so, it would mark the scene and clip as dirty; this would prompt the user to save the scene and save the panel asset.

Testing with Team Members

To make sure that the inspector and how the cutscene was prepared for the narrative and artist team, I stayed into contact with them. I let them know when a new feature was added and asked them their thoughts on it. There were multiple aspects that they found useful in using for making the cutscenes (such as the ability to select frames through a dropdown and the interface changing based on panel transition style). They also gave me feedback on what could make the interface easier for them to use and better match their view. As of right now, a change is being added to allow the art team to have multiple panels in one camera view (similar to the example above). To adjust this, some scripts will be kept (such as timing, three styles of slap, and the voice asset), some scripts will be removed (such as scripts for environmental slaps since those will be replaced by changing the panel image now), and some new scripts will be added (such as the panel’s visual transitions such as blinking in, fade out from transparency, fade out from black, or flying in). I will keep taking feedback until the cutscene editor is easy to use and can be used to make the cutscenes desired by the team.


Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square

© Disco is Dead! by Third Floor Games

bottom of page