How mateusdigital/game-same-game works
The Same Game is a Pixi.js matching game. A player enters through the browser game, which initializes resources and settings, selects a scene, and runs the game loop; gameplay handles brick interactions, scoring, and scene transitions. The repository also includes a leaderboard service and a reusable JavaScript utility layer. Edges are limited to relationships visible in the excerpts or documented by the README; the frontend-to-leaderboard API connection is not established by the sampled source.
Main entry points: main.js Game entry · Application.js Pixi application · Scene_Manager.js Scene manager · Scenes Game scenes
Components 22
Game runtime
- Game entry
src/main.js - Pixi application
libs/mcow_js_pixi/Application.js - Scene manager
libs/mcow_js_pixi/Scene_Manager.js - Resource loading
libs/mcow_js_pixi/RES.js - Input handling
libs/mcow_js_pixi/Input.js
Game experience
- Game scenes
src/Scenes - Match gameplay
src/Scenes/GameScene.js - Brick
src/Gameplay/Brick.js - Scenario
src/Scenario/Scenario.js - Sky background
src/Scenario/SkyBackground.js - Game UI
src/UI - Audio
src/Audio.js - Game settings
src/GameSettings.js
Shared libraries
- Core utilities
libs/mcow_js_core/src - Pixi helpers
libs/mcow_js_pixi
Leaderboards
- Leaderboard UI
src/Scenes/LeaderboardsScene.js - Leaderboard utilities
src/LeaderboardsUtils.js - Leaderboard API
server/same_game_leaderboards/app.py - Leaderboard database
server/same_game_leaderboards/app.py
Other components
- Player
- Browser canvas
- Leaderboard client
Connections 17
- Player → Browser canvas: plays in
- Browser canvas → Game entry: starts
src/main.js - Game entry → Pixi application: creates and starts
src/main.js - Game entry → Resource loading: loads resources
src/main.js - Game entry → Game settings: initializes
src/main.js - Game entry → Scenario: initializes
src/main.js - Game entry → Scene manager: selects scene
src/main.js - Game entry → Audio: preloads and plays
src/main.js - Game entry → Input handling: installs handler
src/main.js - Pixi application → Scene manager: updates
libs/mcow_js_pixi/Application.js - Pixi application → Input handling: updates
libs/mcow_js_pixi/Application.js - Scene manager → Game scenes: runs lifecycle
libs/mcow_js_pixi/Scene_Manager.js - Game scenes → Match gameplay: includes
- Scenario → Pixi application: updates from loop
- Leaderboard client → Leaderboard API: requests scores
- Leaderboard API → Leaderboard database: queries and writes
server/same_game_leaderboards/app.py - Leaderboard UI → Leaderboard utilities: uses