circular_breaker

circular_breaker

English | 日本語

circular_breaker

Overview

How to Run

webg Features Used

Implementation Flow

main.js initializes WebgApp, SmoothShader, and GameAudioSynth, creates the arena, blocks, paddle, pack, and particles, and then connects input, the game runtime, scene phases, and diagnostics. Per-frame game rules are kept out of main.js so its initialization and module wiring remain visible.

gameRuntime.js stores play-time state such as score, level, the remaining PACK count, and paddle and puck position and velocity. It updates paddle movement, puck reflection, block collision, and short recoil effects, while delegating stage decisions to stageFlow.js. stageFlow.js handles the time limit, target break count, score calculation, block reset, and game over, separating object movement from stage rules.

scenePhases.js uses GameStateManager to switch the top-level intro / play / pause / stage-clear / result states. It converts stage results into scene phases and chooses phase-specific BGM and notification sound effects. HUD drawing is in Hud.js, sparks are in particleEffects.js, and persistent high scores are in highScoreStore.js, so rendering, short effects, and saved data can be inspected independently of gameplay updates.

The frame flow converts input to actions, updates the scene phase, advances the game runtime according to that phase, draws the updated nodes, and then overlays particles and the HUD. Pause keeps the current frame while stopping gameplay updates. Result stops movement and collision while continuing the ending display and particle updates.

File Structure

Checkpoints

Controls