⚡ Zap Game Engine

A lightweight, gesture-first 2D game engine for creating interactive demos and playable ads

Get Started Try Playground

Built for Interactivity

👆

Gesture-First Design

Built-in tap, swipe, drag, and long-press recognition. Perfect for mobile games and interactive ads.

Smooth Animations

Powerful tweening system with 30+ easing functions. Make everything feel responsive and polished.

🪶

Lightweight

Zero dependencies, ~15KB minified + gzipped. Tree-shakeable ES modules for minimal bundle size.

📘

TypeScript Native

Full type safety and IntelliSense support. Written in TypeScript from the ground up.

🎨

Google Fonts Integration

Dynamically load any Google Font. Beautiful typography with zero configuration.

🎯

Collision Detection

Built-in position and overlap detection. Perfect for match-3 games and interactive elements.

Simple to Use

import { Game, Scene, Sprite } from '@mode-7/zap';

// Create a game
const game = new Game({
  width: 800,
  height: 600,
  backgroundColor: '#0f3460'
});

// Create a scene
const scene = new Scene();

// Create an interactive card
const card = new Sprite({
  x: 400,
  y: 300,
  width: 100,
  height: 140,
  color: '#e94560',
  interactive: true,
});

// Add tap interaction
card.on('tap', () => {
  card.tween(
    { rotation: Math.PI, scaleX: 1.2, scaleY: 1.2 },
    { duration: 300, easing: 'easeOutBack' }
  );
});

// Add to scene and start
scene.add(card);
game.setScene(scene);
game.start();

Get Started in Seconds

npm install @mode-7/zap
View Documentation

~15KB

Minified + Gzipped

0

Dependencies

30+

Easing Functions

100%

TypeScript