Skip to content

NPC's For Story Line

JivalX edited this page Oct 5, 2023 · 4 revisions

Overview

The Astronaut,Astro and Jail NPC and NPC Entities are non-playable character in the game developed by Story Team. It plays a role in the game's narrative and interactions, adding depth and engagement to the player's experience. These characters are created using the provided code from the AnimationController and NPC Factory classes for the respective NPC's. The Dialogues were written by the Story Team for integrating the Story Line with the Game .

Screenshot 2023-10-05 at 12 25 03 AM

Table of Contents

Description

Characteristics

Code Implementation

In Game Role

UML Diagrams

Contributors

Description

The Astro NPC is a non-playable character in the game developed by Story Team. This character represents an astronaut and plays a crucial role in guiding the player through the game world. The Astro NPC is characterized by its animations and dialogues, providing essential information to the player in the EARTH GAME AREA.

The Astronaut NPC is another non-playable character in the game. This NPC is designed to resemble an astronaut and adds depth to the game world. The Astronaut NPC has animations and dialogues that contribute to the player's immersion in the LUSH GAME AREA .

The Jail NPC entity represents the npc Astro within the game who is encountered in a jail setting. This character plays a significant role in the game's narrative, offering quests and interactions that impact the player's journey in the EARTH GAME AREA.

Characteristics

Astro NPC

Appearance: The Astro NPC is visually represented with sprite animations provided by Neil . These animations include movements in different directions, managed by the AstroAnimationController component.

Astro_NPC

Behaviour: The Astro NPC exhibits basic AI behaviour, such as following the player character using Follow Component through Intractable Component , and initiating dialogues when interacted with.

UML Diagram

image

Astronaut NPC

Appearance: The Astronaut NPC's appearance is represented by sprite animations made by the Story Team , and these animations are managed by the AstronautAnimationController component.

astronaut_npc

Behavior: Similar to the Astro NPC, the Astronaut NPC also exhibits AI behavior. It can wander, interact with the player, and trigger dialogues.

UML Diagram

image

Jail NPC Entity

Appearance: The Jail NPC is visually represented with animations, particularly the "jail_close" animation, which is looped. The animations are controlled by the JailAnimationController component.

jail

Behavior: The Jail NPC can be interacted with by the player. When approached and interacted with, it initiates dialogues that reveal aspects of the storyline and potential quests.

UML Diagram

image

Code Implementation

The NPC's are created using the provided code in the create method for all the NPC. The code initializes the NPC's components, animations, physics, and interactions.

Screenshot 2023-10-05 at 12 05 49 AM

All the NPC are initiated in the similar way for the code provided above

The AnimationController classes for all the NPC's are implemented with the following methods:

create(): Initializes the animator, loads the required assets, and starts the default animation.

update(): Updates the animation based on a timer. It switches between animations for different directions, creating a dynamic walking animation in case of required characteristics for The NPC.

Screenshot 2023-10-05 at 12 07 53 AM

All the Other Roles and Animations for Different NPC were Implemented by their own Specific Animation Characteristics.

In-Game Role

In the game, the Astro NPC serves as a guide and source of information for the player. When interacted with, it provides essential information about the game's objectives or storyline like Guiding towards the Spacecraft.

The Jail NPC entity role is crucial to the game's storyline. It interacts with the player to advance the narrative, provide quests, and offer information about the game world.

UML Diagrams

Contributors

Clone this wiki locally