Backstory Cutscenes - UQcsse3200/2024-studio-3 GitHub Wiki

Backstory Cutscene Overview

The backstory cutscene introduces the world of the player, a former Michelin-starred chef navigating a dystopian society where humans and animals coexist under strained circumstances. The cutscene sets the emotional and narrative tone for the game, immersing players in their struggles and moral conflicts through sequentially revealed scenes and dialogue. This system guides players through a structured narrative before transitioning into the main gameplay.

Table of Contents

UML

The UML diagram outlines the relationships between BackstoryCutscene, Cutscene, and other core components such as Scene and ResourceService. The BackstoryCutscene inherits the core logic for managing transitions, asset loading, and entity handling from Cutscene.

BackstoryCutscene UML:

BackstoryCutsceneDisplay UML:

Sequence Diagram

The sequence diagram details the order in which the cutscene advances through text and scenes, based on player input (such as clicking the "Next Scene" button). IMG_1624

Key Stages in the Cutscene:

  • City Scene: Introduces the world’s collapse, the start of the animal uprising.
  • Kitchen Scene: Reflects on the uneasy balance between humans and animals in the aftermath.
  • Farm Scene: Focuses on the actual animal uprising process.
  • Human Graveyard Scene: Animal standing amongst graveyard of humans amidst the uprising.
  • Post-Apocalyptic City Scene: Player standing in the middle of a destroyed semblance of what was the city.
  • Beastly Bistro Scene: Player and animals standing in front of the new 'Beastly Bistro', what has replaced the Brooklyn Bistro after "The Fall".

Storyboard

Below is a rough storyboard that helped guide the creation of the backstory cutscenes:

Usage Summary

The BackstoryCutscene class defines the sequence of scenes that present player' backstory, using inherited methods from Cutscene to handle transitions and asset management. Each scene is set up with a background image and text that progress the narrative.

Scene Setup

The setupScenes() method defines the specific scenes for player's backstory, loading them in sequence and providing visual and textual elements to guide the player through the narrative:

java
Copy code
@Override
protected void setupScenes() {
    cutsceneText.add("You were once an esteemed chef, with a future...");
    cutsceneText.add("Animals were once just resources to be cooked and served...");
    cutsceneText.add("You built a reputation for your talent and expertise...");

    scenes.add(new Scene(
        "images/Cutscenes/Restaurant_Background.png",
        null,
        new Array<>(new String[]{"You were once an esteemed chef, with a future..."}),
        5.0f
    ));
    scenes.add(new Scene(
        "images/Cutscenes/Kitchen_Background.png",
        null,
        new Array<>(new String[]{"Animals were once just resources to be cooked and served..."}),
        4.0f
    ));
    scenes.add(new Scene(
        "images/Cutscenes/Food_Critic_Background.png",
        null,
        new Array<>(new String[]{"You built a reputation for your talent and expertise..."}),
        4.0f
    ));
}

Each scene progresses through:

  • Background Image: Visualises the setting of player's past.
  • Text: Provides narrative context, describing player’s rise to fame and his view of animals as resources.
  • Duration: Sets the time each scene remains on screen before transitioning.

Scene Transitions

The advanceCutsceneStep() method inherited from Cutscene handles transitions between these scenes, ensuring a smooth progression through player’s story based on time or player input.

Description

The BackstoryCutscene class builds on the Cutscene class to create a structured, engaging backstory experience for players. By extending Cutscene, the backstory cutscene gains core functionality for managing scene transitions, loading and unloading assets, and creating or disposing of entities. This allows the BackstoryCutscene class to focus on the specific content and narrative for player's journey.

Key Methods from Cutscene (Inherited by BackstoryCutscene)

  • nextCutscene(): Transitions to the next scene after the current scene’s duration ends.
  • loadScene(): Loads the assets and entities for each scene.
  • disposeEntities(): Disposes of any entities from the previous scene before loading the next.

This modular approach allows BackstoryCutscene to define its own scenes and content while using the core systems of Cutscene to manage the technical details of transitions and asset handling.

Coding Choices

By extending Cutscene, the BackstoryCutscene class reuses much of the existing infrastructure for managing cutscenes, including:

  • Scene Transitions: Seamlessly handled by nextCutscene().
  • Asset Management: Loaded and unloaded dynamically based on the scene.
  • Entity Management: Ensures that each scene’s visual elements are properly handled.

This allows BackstoryCutscene to focus on defining the narrative and scene-specific elements while ensuring consistency and performance through the inherited functionality.

Design

Introduction

The design of the backstory cutscene system focuses on delivering a compelling and immersive narrative experience. It introduces players to their rise as a renowned chef and sets the tone for the moral challenges he will face. The use of the Cutscene class as a base provides a consistent framework for managing transitions, assets, and entities while allowing BackstoryCutscene to focus on story-specific details.

Design Justifications

The decision to extend Cutscene ensures that the BackstoryCutscene system remains modular and adaptable. This approach allows for the addition of new scenes or modifications to the cutscene content without affecting the core logic of scene transitions or asset management.

Design Advantages:

  • Modularity: Each scene is self-contained, making it easy to add or modify scenes.
  • Consistency: Using Cutscene as a base ensures that all cutscenes in the game share the same core structure and behavior.
  • Engagement: The structured progression of scenes ensures players remain engaged with the narrative.