-
Notifications
You must be signed in to change notification settings - Fork 6
entry
The entry screen is where players join the game, choose a game mode, and optionally select a costume before proceeding to song select. It manages a three-phase state machine — side selection, mode selection, and costume selection — and coordinates up to two independent player slots with their own drums, character models, and nameplates.
The screen is constructed with the name "entry", which the base Screen class uses to load the correct textures and sounds from the active skin.
An enum tracking which phase the screen is currently in.
| Value | Description |
|---|---|
SELECT_SIDE |
Players are choosing which side to join on (1P, 2P, or cancel) |
SELECT_MODE |
Players navigate the mode carousel (Game, Practice, Costume, Settings) |
SELECT_COSTUME |
A player has opened the costume menu |
Inherits from Screen. Constructed with the screen name "entry".
| Member | Type | Description |
|---|---|---|
state |
EntryState |
Current screen phase |
players |
vector<EntryPlayer> |
Up to two active player slots |
box_manager |
BoxManager |
Mode-selection carousel shared across both players |
script |
EntryScript |
Lua script interface for skin-driven drawing |
entry_overlay |
EntryOverlay |
banapass / payment / camera indicators |
coin_overlay |
CoinOverlay |
Global coin display |
allnet_icon |
AllNetIcon |
Online connectivity indicator |
timer |
unique_ptr<Timer> |
60-second idle countdown |
void on_screen_start() override;Calls Screen::on_screen_start() to load skin assets, starts background music, initialises the EntryScript, and enters SELECT_SIDE state. The cloud animations for both player slots are started here.
Screens on_screen_end(Screens next_screen) override;Delegates to Screen::on_screen_end, which unloads all sounds, music, and textures.
std::optional<Screens> update() override;The main loop. Each frame it:
- Calls
Screen::update()for first-frame initialisation. - Advances the
scriptandentry_overlayanimations. - Calls
handle_input(). - Updates all active
EntryPlayerinstances, thebox_manager,coin_overlay,allnet_icon, andtimer. - If the timer expires, returns
Screens::TITLE. - If a mode box is confirmed and its transition animation completes, returns the target
Screensvalue for that mode. - If no players are joined and the back key is pressed from
SELECT_MODE, returns toSELECT_SIDE.
Returns std::nullopt while the screen is still active.
void handle_input(); // private dispatcherRoutes input to the correct handler based on state.
void handle_input_side_select();Reads L-Don / L-Kat for 1P and R-Don / R-Kat for 2P. A Don press on an unjoinable side plays a drum sound and adds an EntryPlayer for that side, advancing to SELECT_MODE once at least one player has joined. A Kat press plays a kat drum sound. Pressing the back input with no players joined returns to Screens::TITLE.
void handle_input_mode_select();Delegates left/right navigation and confirm/back inputs to each EntryPlayer, which forwards them to the BoxManager. When a player confirms the Costume box, state transitions to SELECT_COSTUME. When a player confirms any other box, the BoxManager starts its fade-out animation and the target screen is queued.
void handle_input_costume_select();Delegates input to the EntryPlayer whose costume menu is open. On confirmation or cancellation, the costume menu is closed and state returns to SELECT_MODE.
void draw() override;Renders in the following order:
-
script->draw_background()— Lua-driven background with flickering lights. -
script->draw_side_select()— side-select panel art. -
script->draw_side_select_buttons()— 1P / Cancel / 2P button highlights. - For each player: drum sprite, cloud animations, and
Chara3Dmodel. -
box_manager->draw()— the mode carousel, visible once at least one player has joined. - For each player in
SELECT_COSTUME:costume_menu->draw(). - For each player:
nameplate->draw()andindicator->draw(). -
script->draw_footer()— bottom bar showing join prompts. -
entry_overlay->draw(),coin_overlay->draw(),allnet_icon->draw(),timer->draw().
Building
libs
- animation
- audio
- config
- filesystem
- global_data
- input
- logging
- ray
- scores
- screen
- script
- song_parser
- text
- texture
- video
- webcam
libs/parsers
objects
objects/game
- player
- background
- gauge
- judgment
- combo
- branch_indicator
- ending_animations
- gogo_time
- fireworks
- song_info
- transition
- result_transition
- judge_counter
- score_counter
- score_counter_animation
- balloon_counter
- drumroll_counter
- kusudama_counter
- drum_hit_effect
- lane_hit_effect
- gauge_hit_effect
- combo_announce
- note_arc
objects/global
objects/title
objects/entry
objects/settings
objects/result
objects/song_select
- player
- navigator
- box_base
- box_song
- box_folder
- neiro
- modifier
- ura_switch
- diff_sort
- search_box
- dan_transition
- genre_bg
- score_history
- song_select_script
scenes