How nubby29/2dplatformer works
This repository is a browser-based pixel platformer inspired by EPIC: The Musical. The evidenced playable workflow is: the player starts Troy, advances the opening dialogue, crosses the authored battlefield through platforming and combat encounters, reaches a checkpoint and the eastern gate, and sees completion. The main module coordinates the runtime; the engine, story controller, level data, and asset helpers provide distinct internal layers. The README documents broader saga progression, but the sampled level data implements only Troy. Some main-module details are omitted, so the graph avoids asserting uncertain call order.
Main entry points: main.js Game Runtime · assets.js Sprite Helpers · index.html Browser Shell · story.js Opening Dialogue
Components 16
Game Runtime
- Game Runtime
src/main.js
Story and Progression
- Opening Dialogue
src/story.js - Troy Level Data
src/levels.js - Saga Catalog
data/sagas.js - Checkpoint and Goal
src/main.js
Gameplay Systems
- Platform Simulation
src/engine.js - Combat Encounters
src/main.js - Hazards and Debris
src/main.js - Moving Platforms
src/main.js - Breakable Barriers
src/main.js - Triggered Ambushes
src/main.js
Presentation
- Rendering and HUD
src/main.js - Sprite Helpers
src/assets.js - Pixel Art Assets
assets
Other components
- Player
- Browser Shell
index.html
Connections 15
- Player → Browser Shell: opens game
- Browser Shell → Game Runtime: loads runtime
- Player → Game Runtime: controls game
- Game Runtime → Opening Dialogue: creates and advances
- Game Runtime → Troy Level Data: reads Troy level
- Game Runtime → Platform Simulation: calls simulation
- Game Runtime → Combat Encounters: updates encounters
- Game Runtime → Hazards and Debris: updates hazards
- Game Runtime → Moving Platforms: updates platforms
- Game Runtime → Breakable Barriers: updates barriers
- Game Runtime → Triggered Ambushes: triggers ambushes
- Game Runtime → Checkpoint and Goal: tracks progress
- Game Runtime → Sprite Helpers: loads and draws sprites
- Sprite Helpers → Pixel Art Assets: loads image files
- Game Runtime → Rendering and HUD: updates display