Motion-Leap

Camera Jump ‘n’ Run

A classic 2D Jump ‘n’ Run game with a unique twist: you control the character’s jump by physically jumping in front of your camera!

About The Game

This is a simple platformer where the goal is to score points by jumping on enemies within a time limit. The main feature is the motion-controlled jump, which uses your webcam to detect your body movements.

Features

Technology Stack

How to Play

  1. Prerequisites: You need Node.js and npm installed.
  2. Installation: Clone the repository and install the development dependencies:
    npm install
    
  3. Build the game: Compile the TypeScript source code into JavaScript:
    npx tsc
    

    Note: You need to re-run this command every time you make changes to the .ts files.

  4. Start the server:
    live-server dist
    
  5. Allow Camera Access: Open the provided URL in your browser and allow camera access when prompted.
  6. Play: Choose a theme and start playing! Jump to avoid enemies or stomp on them.

Configuration

You can change the game’s behavior using URL parameters.

Language Selection

You can select the display language by adding the ?lang= parameter to the URL. The default language is English.

Example: http://127.0.0.1:8080/?lang=de

Debug Mode

To enable the debug mode, which shows real-time information about pose detection and game state, add ?debug=true to the URL.

Example: http://127.0.0.1:8080/?debug=true