Skip to content

Win Game Screen

Veenit254 edited this page Oct 6, 2026 · 2 revisions

Win Screen

Overview

The win screen appears after the final boss ending dialogue is completed.

It displays a victory animation, plays win music and allows the player to return to the main menu.

Triggering the Win Screen

The final dialogue is handled by FinalBossEndingDialogueComponent.

Also, can be triggered using the key combo-> Cntrl + Shift + W

After the player advances past the final dialogue line, the component triggers:

target.getEvents().trigger("winScreenRequested");

The target is the player entity.

Processing the Win Request

MainGameScreen listens for the event and stores a request flag. After the entity update completes, it changes to the win screen:

if (winScreenRequested) {
  winScreenRequested = false;
  game.setScreen(ScreenType.WIN_SCREEN);
  return;
}

Delaying the transition until after the entity update prevents the game screen from being disposed while dialogue input is still being processed.

Win Screen Contents

WinScreen:

  • Loads images/win_dance.gif
  • Plays sounds/win_music.mp3
  • Displays the YOU WIN! title
  • Loops the victory animation
  • Provides a Main Menu button

The screen is opened with:

game.setScreen(GdxGame.ScreenType.WIN_SCREEN);

Returning to the Main Menu

The Main Menu button changes the screen back to:

game.setScreen(GdxGame.ScreenType.MAIN_MENU);

When the win screen closes, it disposes the win music, GIF textures, renderer and services.

Main Classes

Class | Responsibility -- | -- FinalBossEndingDialogueComponent | Displays final dialogue and triggers the win event MainGameScreen | Receives the win event and changes screens GdxGame | Creates the WIN_SCREEN screen WinScreen | Displays the victory animation and music

Table of Contents

Home

Test Plan

Team 2

Features

Components
Player
Items and Inventory
Enemies
Interactable NPCs
Cutscenes and Dialogue
Music
Bosses
Rooms
Weapons
Abilities & Spells
Game Screens and Areas
Dungeons

Game Engine

Getting Started

Entities and Components

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Terrain

Concurrency & Threading

Settings

Troubleshooting

MacOS Setup Guide

Clone this wiki locally