Machine Guard Corps is a sci-fi lane defense auto-battler built with HTML5 Canvas, CSS, and vanilla JavaScript.
Deploy machine units, manage energy and scrap, upgrade your command tower, evolve units, and fight an adaptive alien hive with its own economy, upgrades, boss logic, fortress weapons, emergency shields, and repair systems.
Open index.html in a browser.
No build step, external libraries, or external image assets are required. The game is suitable for browser play and itch.io HTML5 uploads.
Your command base is on the left. The alien hive is on the right.
Win by destroying the alien hive. Lose if your command base reaches 0 HP.
The enemy is not a fixed wave script. The hive has its own energy, upgrade logic, boss timing, and defensive reactions. If the battle runs long, the enemy starts sending stronger bosses and eventually double-boss rounds.
Energy: used to summon machine units. It regenerates automatically.Scrap: earned from kills and boss caches. It buys upgrades and evolutions.Base HP: your fortress health.Hive HP: the enemy fortress health.Alien Energy: the enemy's summon resource. The hive gains it faster than the player and can refill it when defensive shields trigger.
1- Summon Robot Infantry2- Summon Mech Dog3- Summon Attack Drone4- Summon Big Fat Bot5- Summon Railgun WalkerQ- Missile StrikeW- EMP PulseE- Repair SwarmZ- Upgrade Command TowerX- Upgrade Base TurretC- Upgrade Coolant BanksV- Upgrade Combat FirmwareCmd/Ctrl + 1-0- Buy the ten evolution choices from left to rightSpaceorP- PauseR- RestartF- Fullscreen
Cheap melee unit for early lane control.
Evolutions:
Blast Infantry: explodes on death.Field Mechanic: drops repair parts on death.
Fast melee unit for quickly contesting the lane.
Evolutions:
Ghost Dog: stealths for 10 seconds after deployment. It cannot be directly targeted while stealthed, but splash damage can still hit it.Razor Roller: rushes forward and damages enemies in its path.
Ranged unit with light HP and good backline pressure.
Evolutions:
Highwing Drone: flying unit that avoids melee targeting and ignores splash damage.Arc Volt Caster: fires chain lightning that jumps between enemies.
Slow, durable frontline machine with low damage and strong staying power.
Evolutions:
Aegis Fat Bot: gains a holographic shield that reflects ranged projectile damage.Pulse Fat Bot: emits periodic EMP shock pulses that damage and may stun nearby ground enemies.
Expensive high-damage ranged machine.
Evolutions:
Linebreaker Walker: fires a fixed-length piercing beam through enemies.Skyfall Cannon: long-range orbital strike unit with heavy area impact.
Damages enemies in a target area near the front line.
Command Tower upgrades increase Missile damage. Coolant Banks slightly reduce its cooldown.
Slows all enemies for a duration.
Command Tower upgrades increase EMP duration. Coolant Banks slightly reduce its cooldown.
Heals all friendly machines and reduces some heat.
Command Tower upgrades increase healing. Coolant Banks slightly reduce its cooldown.
Each upgrade has 5 levels.
Command Tower: increases base HP, energy cap, energy generation, fortress repair speed, and skill power.Base Turret: improves fortress weapon damage, range, attack speed, and later splash pressure.Coolant Banks: improves machine heat control and slightly reduces skill cooldowns.Combat Firmware: improves machine damage, durability, and range scaling.
Both fortresses have automatic turret weapons.
If a fortress avoids damage for 8 seconds, it begins slow out-of-combat repair. Command Tower upgrades increase the repair rate.
Each fortress also has emergency invulnerability shields:
- At 50% HP, it triggers a 5-second shield.
- At 15% HP, it triggers a 10-second shield.
The alien hive also refills Alien Energy when these shield thresholds trigger.
Machine units build heat when attacking.
At 100 heat, a machine shuts down for 2 seconds and cannot move or attack. Coolant Banks reduce heat buildup and improve cooling.
Boss kills grant major Energy and Scrap caches, but do not instantly end the game. The hive only dies when its core HP reaches 0.
Current boss roster:
- Hive Siege Core
- Broodmaw Crusher
- Void Prism Tyrant
- Carapace Sovereign
- Dreadspire Artillery
- Star-Eater Monarch
After the designed boss sequence is exhausted, the hive continues with double-boss rounds.
Start by using Robot Infantry and Mech Dogs to keep the lane from collapsing.
Buy early Command Tower and Combat Firmware levels so your economy and units can survive the first boss. Add Big Fat Bots when the alien side starts fielding heavy melee units.
Use Missile Strike when multiple enemies or a boss stack together. Save EMP Pulse for boss pushes or when the lane is about to reach your base. Use Repair Swarm after your frontline takes damage or overheats.
Choose evolutions based on the problem you are facing:
- Need front pressure: Razor Roller or Linebreaker Walker.
- Need survival: Aegis Fat Bot or Field Mechanic.
- Need boss damage: Skyfall Cannon or Arc Volt Caster.
- Need evasive units: Ghost Dog or Highwing Drone.
index.html- page shell and UI layoutstyle.css- responsive sci-fi UI stylinggame.js- canvas rendering, simulation, AI, units, skills, and upgradesdocs/screenshots/- GitHub README screenshots
MIT License. See LICENSE.



