How ashimregme/mini-militia works
Mini Militia is a browser-based canvas shooter. The main workflow is: the page loads assets, starts the game, accepts keyboard and mouse input, moves the player and AI enemies through a tiled arena, and resolves weapon fire, collisions, scoring, and respawn or game-over state. The graph reflects the sampled runtime code and README controls; unsampled rendering and camera wiring is omitted rather than inferred.
Main entry points: Game.js Game Runtime · Preload.js Asset Startup · RobotUnit.js AI Enemy · Resources.js Resource Catalog
Components 15
Startup and Assets
- Asset Startup
js/Preload.js - Resource Catalog
js/Resources.js - Game Assets
images - Audio Assets
audio
Arena and Combat
- Tile Arena
js/TileGround.js - Tile Collision
js/CollisionHandler.js - Weapon
js/Weapon.js - Projectile
js/Bullet.js
Player and Enemies
- Player Wrapper
js/Shyame.js - Player Actor
js/Actor.js - AI Enemy
js/RobotUnit.js
Game Runtime
- Game Runtime
js/Game.js - Camera
js/Camera.js - Game Utilities
js/Util.js
Other components
- Player
Connections 19
- Player → Asset Startup: opens game
README.md - Asset Startup → Resource Catalog: creates catalog
js/Preload.js - Asset Startup → Game Assets: registers images
js/Preload.js - Asset Startup → Audio Assets: registers audio
js/Preload.js - Asset Startup → Game Runtime: starts after loading
js/Preload.js - Resource Catalog → Game Assets: loads images
- Resource Catalog → Audio Assets: loads audio
- Game Runtime → Tile Arena: creates arena
js/Game.js - Game Runtime → Tile Collision: creates handler
js/Game.js - Game Runtime → Player Wrapper: creates player
js/Game.js - Game Runtime → AI Enemy: spawns enemies
js/Game.js - Player Wrapper → Player Actor: creates actor
js/Shyame.js - Player Actor → Tile Collision: checks movement
js/Actor.js - AI Enemy → Tile Collision: checks movement
js/RobotUnit.js - Player Actor → Weapon: creates weapon
js/Actor.js - AI Enemy → Weapon: creates weapon
js/RobotUnit.js - Weapon → Projectile: creates projectile
js/Weapon.js - Game Runtime → Camera: coordinates view
- AI Enemy → Game Utilities: uses distance and random
js/RobotUnit.js