Mosquito Game – built with p5.js and Web APIs

Gameplay

Players must squash 10 mosquitoes per stage within a time limit. The game features three difficulty levels (easy, medium, hard) and continues across 10 stages, with a global kill count reaching 100.

Key Features & Design Highlights

  • Animated nature background (gradient sky, waving hills, flowers, pollen particles)

  • Instant feedback: blood burst effects, floating score text, “splat” sound

  • English spoken kill count via Speech Synthesis API

  • Controls: Pause/Resume, Light/Dark theme, Mute/Unmute, adjustable enemy size

  • Responsive design: virtual 720×450 canvas with auto-scaling and input mapping

Tools & Tech

  • p5.js (game logic & visuals)

  • Web Audio API (sound effects)

  • Speech Synthesis API (spoken feedback)

  • HTML, CSS, JavaScript integration

Key Learnings

  • Designing micro-interactions to boost user engagement

  • Integrating sound and speech for playful learning

  • Building a responsive canvas game with modular state machine architecture