How prof-lucapulga/spaceinvaders works
SpaceInvaders is a browser-based arcade game. The player moves and fires through keyboard input; the main animation loop updates and draws game objects, while alien waves and collisions drive level completion, upgrades, victory, or game over. The graph covers the sampled runtime code and README-documented controls and progression; assets are rendered by the game, but their individual files were not present in the supplied tree.
Main entry points: main.js Game loop · player.js Player · enemy.js Alien waves · engine.js Game objects
Components 7
Game runtime
- Game objects
scripts/engine.js - Game loop
main.js
Game entities
- Player
scripts/player.js - Alien waves
scripts/enemy.js - Projectiles
scripts/bullet.js
Player progression
- Input and upgrades
ministage.js
Other components
- Player controls
Connections 12
- Player controls → Game loop: sends keys
main.js - Game loop → Player: dispatches input
main.js - Game loop → Alien waves: creates waves
main.js - Game loop → Game objects: updates and draws
main.js - Player → Input and upgrades: maps input, upgrades
scripts/player.js - Player → Projectiles: fires
scripts/player.js - Alien waves → Projectiles: fires
scripts/enemy.js - Player → Game objects: inherits
scripts/player.js - Alien waves → Game objects: inherits
scripts/enemy.js - Projectiles → Game objects: inherits; checks collisions
scripts/bullet.js - Game loop → Player: upgrades on level
main.js - Game loop → Alien waves: checks wave completion
main.js