Skip to content

transition

Anthony Samms edited this page Jun 2, 2026 · 1 revision

The Transition class plays the intro sequence shown between the song-select screen and the start of gameplay. It displays the song title, subtitle, and an optional loading graphic, then slides the elements into position before the song begins. Owned by game as optional<Transition>.

Transition

Construction

Transition(const string& title, const string& subtitle, bool is_second);
Parameter Description
title Song title string displayed as outlined text
subtitle Song subtitle string displayed beneath the title
is_second Whether this is the second song in a multi-song session

Creates OutlinedText objects for both strings and allocates all animations. Does not start playback until start() is called.

Members

Member Type Description
is_second bool Affects the layout/animation of the second-song entry
title unique_ptr<OutlinedText> Song title outlined text
subtitle unique_ptr<OutlinedText> Song subtitle outlined text
loading_graphic optional<ray::Texture2D> Song-specific Loading.png; drawn if present
rainbow_up MoveAnimation* Slides the rainbow bar upward into position
mini_up MoveAnimation* Slides the mini character display upward
chara_down MoveAnimation* Slides the character graphic downward into frame
song_info_fade FadeAnimation* Fades the song title/subtitle in
song_info_fade_out FadeAnimation* Fades the song info out once complete

Methods

void start();

Begins all animations simultaneously. Called by GameScreen::on_screen_start() after the screen is fully initialised.

void add_loading_graphic(const string& path);

Loads a texture from path and stores it as loading_graphic. Displayed instead of the default transition background when present.

void update(double current_ms);

Advances all animations.

void draw();

Draws the transition elements in order: loading graphic or default background, song info, character, and the decorative bars.

bool is_finished();

Returns true when song_info_fade_out has completed, indicating gameplay should begin.

Clone this wiki locally