Skip to content

Cytoscape Immune Defense

Asteroids-Style Arcade Game PWA


Overview

Cytoscape: Immune Defense is a fast-paced, browser-based arcade game inspired by the classic Asteroids. You pilot a T-cell through a microscopic battlefield, firing antibodies at waves of invading pathogens — viruses, bacteria, parasites, and fungi — each with unique behaviors, resistances, and variants that require different strategies to survive.

The game is built as a fully installable Progressive Web App (PWA), so it can be added to the home screen on Android, iOS, Windows, macOS, or Linux and played offline with a native-like experience.


Gameplay

The core loop follows the classic Asteroids formula with a cellular biology twist. Waves of pathogens spawn and drift across the screen. Destroying them causes them to split into smaller fragments — just like asteroids — until they’re too small and are eliminated. Clear all pathogens to advance to the next wave, which spawns more enemies at increasing speed.

  • WASD / Arrow Keys — Move your T-cell through the bloodstream
  • Space — Fire antibodies at pathogens
  • F — Use special ability
  • Screen Wrap — All entities wrap around screen edges, just like the original Asteroids

Technical Stack

The game is built with React and TypeScript, using HTML5 Canvas for vector-style rendering. The game engine is cleanly separated from the React layer — physics, collision detection, rendering, and score persistence are all isolated in a dedicated engine module with full unit test coverage via Vitest.

  • React + TypeScript — UI layer and game component integration
  • HTML5 Canvas — Vector graphics rendering for the retro arcade aesthetic
  • Vite — Build tooling with PWA plugin for service worker generation
  • Tailwind CSS — Global styling
  • Vitest — Unit tests for the game engine (physics, collision, wrapping)
  • GitHub Actions — CI/CD pipeline auto-deploys to GitHub Pages on every push to main

Progressive Web App

Cytoscape: Immune Defense is a fully installable PWA with offline support, automatic version-based cache busting, and a user-facing update prompt when new versions are deployed. It includes full iOS support with apple-mobile-web-app meta tags and touch icons for all device sizes, Android support with a web app manifest and maskable icons, and desktop installability via Chrome and Edge.

After the first visit, the game works entirely offline — no internet connection needed to play.

Interested in this project? Get in touch.