Inspiration

The inspiration for Pest Control: Bug Off! came from a simple developer's pun: we spend our days debugging code, so why not turn that struggle into an epic, high-octane battle against literal cosmic bugs? Drawing from the golden age of arcade shooters like Galaga and R-Type, we wanted to blend retro nostalgia with modern, atmospheric horror. The goal was to create a universe where the "pests" aren't just insects, but ancient, galaxy-eating entities, forcing the player to pilot the Interceptor against evolving, eldritch threats.

What it does

  1. Pest Control: Bug Off! is a browser-based, boss-rush space shooter built entirely with code. Intense Arcade Combat: Players pilot the Interceptor starfighter, dodging bullet-hell patterns while managing shields and weapon upgrades.
  2. Evolving Boss Battles: The game features three distinct, terrifying bosses: The Hell-Grinder, The Seraph Virus, and The Void Singularity. Each boss features a "Phase 2" mechanic where they visually transform and become significantly more aggressive at 50% HP.
  3. Dynamic Atmosphere: The game features a "Theme Manager" that dynamically shifts the color palette, UI glowing effects, and background ambience (from Industrial Red to Matrix Green to Cosmic Purple) depending on the active boss.
  4. Procedural Universe: The background isn't a static image. It creates unique celestial objects—including Black Holes, Supernovae, and Quasars—that utilize parallax scrolling to create a sense of deep space.

How we built it

We made a conscious decision to build this entirely using Vanilla JavaScript and HTML5 Canvas, without any game engines or external assets.

  1. The Rendering Engine: Every visual element in the game—from the player's sleek silver delta-wing ship to the organic, rippling cloaks of the Void boss—is drawn mathematically in real-time using the Canvas API (ctx). There are no sprites or PNGs. For the complex, organic shapes of the bosses (like the silk robes of the Seraph Virus or the antennae of the Void Singularity), we utilized Quadratic Bezier Curves.
  2. Synthetic Audio Engine To keep the project lightweight, we built a custom audio engine using the Web Audio API. We used .mp3 audio files for background music
  3. Shooting: We used a sawtooth oscillator with an exponential frequency ramp (dropping from 600Hz to 100Hz in 0.1s) to synthesize a sharp "laser" zap.
  4. Explosions: We generated a buffer of white noise and passed it through a lowpass filter (set to 500Hz) to simulate a deep, rumbling thud.

Challenges we ran into

  1. Drawing with Math: Creating the "Phase 2" transformations for the bosses was a significant artistic challenge. We had to manually code the vector coordinates for jagged cloaks and corrupted eyes using ctx.bezierCurveTo() and ctx.quadraticCurveTo(). Getting the "liquid void" effect for the final boss required complex particle velocity calculations.
  2. Performance Optimization: With hundreds of star particles, procedural planets, and bullet patterns on screen, maintaining 60 FPS was tricky. We optimized this by implementing simple circle-based collision detection to keep the math lightweight We check if Distance < (R_{player} + R_{enemy}) to trigger a hit.

Accomplishments that we're proud of

  1. The "Less Asset" Philosophy: The entire game exists within a single HTML file and a JS script. No images, no texture packs. It is purely generative art.
  2. The Boss AI: Implementing the state machine that transitions bosses from their "Phase 1" patterns to the chaotic, fast-paced "Phase 2" felt incredibly rewarding.
  3. Visual Atmosphere: The CRT scanline effect implemented in CSS combined with the canvas glow effects (shadowBlur) gives the game a polished, retro-arcade aesthetic that we really love.

What we learned

  1. Trigonometry in Game Dev: We gained a deep appreciation for Math.sin() and Math.cos(), using them for everything from the player's banking rotation to the orbital mechanics of the background planets and the oscillating movement of the "Vengefly" enemies.
  2. Audio Synthesis: We learned how powerful the native Web Audio API is. Creating a full soundscape purely through oscillators and gain nodes was a fascinating deep dive into signal processing.

What's next for Pest Control: Bug Off!

  1. Mobile Support: Adding touch controls to the canvas for mobile play.
  2. Endless Mode: A procedural wave generator for high-score chasers.
  3. New Weapons: We plan to use the rendering engine to create beam lasers and homing missiles for the player's arsenal.

Built With

Share this project:

Updates