How mohamadal-shanti/grandlinerun works
Grand Line Run is a browser-based, level-based Phaser game with sign-in, score submission, and a public leaderboard. The main flow is player → title/sign-in → gameplay → game-over results; the title and results screens use score and quote APIs. README documents a serverless quote lookup through Lambda and DynamoDB, while sampled code shows the client API calls but not their backend handlers. The graph reflects that limit and separates the documented quote backend from the score and leaderboard endpoints.
Main entry points: TitleScene.js Title scene · GameScene.js Gameplay scene · main.js Game bootstrap · Scores.js Scores client
Components 15
Browser client
- Game page
index.html - Game bootstrap
js/main.js - Game data
js/GameData.js
Game experience
- Title scene
js/TitleScene.js - Gameplay scene
js/GameScene.js - Game assets
assets
Identity and scores
- Auth client
js/Auth.js - Scores client
js/Scores.js
Cloud services
- Static hosting
- Amazon Cognito
- API Gateway
- Quote Lambda
- Quote DynamoDB
Other components
- Player
- Phaser engine
Connections 23
- Player → Game page: opens
- Game page → Static hosting: loads from
- Game page → Game bootstrap: starts
- Game bootstrap → Auth client: initializes
- Game bootstrap → Phaser engine: creates game
- Game bootstrap → Title scene: registers scene
- Game bootstrap → Gameplay scene: registers scene
- Title scene → Gameplay scene: starts run
- Gameplay scene → Title scene: returns on restart
- Title scene → Auth client: checks identity
- Title scene → Auth client: requests sign-in
- Auth client → Amazon Cognito: exchanges tokens
- Title scene → Scores client: requests rankings
- Scores client → API Gateway: fetches leaderboard
- Gameplay scene → Scores client: submits score
- Scores client → Auth client: gets ID token
- Scores client → API Gateway: posts score
- Gameplay scene → API Gateway: requests villain quote
- API Gateway → Quote Lambda: invokes
- Quote Lambda → Quote DynamoDB: queries quotes
- Title scene → Game assets: loads artwork
- Gameplay scene → Game data: uses game rules
- Title scene → Game data: uses arc data