How yaroslav-ua02/el-pollo-loco works
El Pollo Loco is a browser-based canvas platform game: the player starts a round, moves Pepe through a desert level, collects coins and bottles, fights chickens and the endboss, and reaches a win/loss screen. The graph covers level content, gameplay and rendering, browser controls, and audio. Edges are limited to relationships shown in excerpts or documented in the README; several wiring details in unsampled source are omitted or marked unverified.
Main entry points: world.class.js Game world · script.js Controls and session · level1.js Level layout · movable-object.class.js Movement and collision
Components 18
Browser experience
- Game page
index.html - Controls and session
script.js - End screen
templates/screens.template.js - Pause state
classes/game-state.class.js - Keyboard state
classes/keyboard.class.js
Gameplay
- Level layout
levels/level1.js - Pepe
classes/character.class.js - Enemies and boss
classes/endboss.class.js - Small chickens
classes/small-chicken.class.js - Coins and bottles
levels/level1.js - Thrown bottle
classes/throwable-object.class.js - Movement and collision
classes/movable-object.class.js
World and rendering
- Game world
classes/world.class.js - Canvas objects
classes/drawable-object.class.js - Status bars
classes/status-bar.class.js - Background and clouds
classes/background-object.class.js
Audio and visuals
- Sound board
classes/sound-board.class.js
Other components
- Player
Connections 25
- Player → Game page: plays
README.md - Game page → Controls and session: starts session
- Controls and session → Game world: creates world
- Controls and session → Sound board: starts music
script.js - Controls and session → End screen: renders result
script.js - Controls and session → Pause state: resets or pauses
script.js - Controls and session → Keyboard state: updates controls
script.js - Game world → Level layout: creates level
classes/world.class.js - Game world → Pepe: owns character
classes/world.class.js - Game world → Status bars: creates bars
classes/world.class.js - Game world → Thrown bottle: creates bottle
classes/world.class.js - Game world → Enemies and boss: checks collisions
classes/world.class.js - Game world → Canvas objects: draws objects
classes/world.class.js - Game world → Sound board: plays throw sound
classes/world.class.js - Level layout → Enemies and boss: creates enemies
levels/level1.js - Level layout → Small chickens: creates small chickens
levels/level1.js - Level layout → Coins and bottles: places collectibles
levels/level1.js - Pepe → Movement and collision: inherits movement
classes/character.class.js - Small chickens → Movement and collision: uses movement
classes/small-chicken.class.js - Enemies and boss → Movement and collision: inherits collision
classes/endboss.class.js - Thrown bottle → Movement and collision: inherits gravity
classes/throwable-object.class.js - Thrown bottle → Sound board: plays splash sound
classes/throwable-object.class.js - Canvas objects → Background and clouds: provides draw base
- Game world → Background and clouds: draws scenery
- Game world → Coins and bottles: renders level items