Game guide

How to Play NiNjAttack

NiNjAttack is a short-run arcade game: protect the ninja at the bottom of the arena, throw shuriken toward incoming enemies and keep your three lives for as long as possible.

Quick start

  1. Open the game. Use a desktop or laptop browser for the main battlefield and press Play in the scroll menu if you want to use the mouse immediately.
  2. Optional: pair a phone. Choose Controller in the scroll menu, scan the QR code with your smartphone and leave that controller page open.
  3. Aim and throw. On the phone, drag the shuriken left or right along the curved track. Release it to throw. With a mouse, click across the game arena to choose the throw direction.
  4. Protect your three lives. Stop enemy ninjas and enemy shuriken before they reach the player. The run ends when all three lives are gone.

The objective

Each defeated enemy ninja adds one point to your score. Enemies continually enter from the top of the arena. Some also throw shuriken downward. Your own shuriken can destroy enemies and can cancel an incoming enemy shuriken when the two projectiles meet.

You lose one life when an enemy reaches the player line or when an enemy shuriken hits the player. The score and remaining lives are shown in the upper-left corner during a run.

Using the smartphone controller

1. Show the QR code

From the game's opening scroll, choose Controller. The QR code contains a session identifier so the phone can send input to the correct game tab.

2. Scan with your phone

Open the QR code with the phone's camera or QR scanner. It loads the NiNjAttack controller page in the phone browser; there is no separate app to install.

3. Drag, aim, release

The phone controller displays a shuriken on a curved track. Press and drag it horizontally to choose an aiming position. When you release your finger, the controller sends a throw command to the game. The chosen horizontal position is translated into the shuriken's firing angle on the main screen.

Important: the phone controller and the game communicate through the NiNjAttack WebSocket service, so both devices need working internet access.

Mouse controls

The game also supports direct mouse input on the main screen. While a run is active, click inside the arena. The horizontal position of the click determines the firing angle: clicking farther left throws toward the left side, clicking near the center shoots more vertically, and clicking farther right throws toward the right.

This is useful for testing or playing without a second device. The phone controller is optional, not a requirement for starting a run.

Enemy types

The game starts with the standard enemy and adds variation after you have built some score:

Enemy ninjas can also launch shuriken. Because your own projectile can cancel an enemy projectile, the safest throw is not always the one aimed directly at the nearest ninja.

Scoring and the Scroll of Fame

Your score increases by one when an enemy's hit points reach zero. At game over, the current score is stored in the browser's local storage and displayed in the Scroll of Fame. The current leaderboard is local to that browser; it is not presented as a worldwide ranking.

Practical play tips

Controller troubleshooting

The QR code does not appear

Reload the game page and open the Controller view again. If a browser extension blocks the QR-code library or another required script, temporarily allowing the site's scripts may be necessary. The game now fails gracefully if the QR library cannot load instead of preventing the scroll menu from opening.

The phone opens the controller but throws do not reach the game

Keep both pages online, make sure the game tab has not been closed or replaced, then rescan the QR code from the current game tab. Each game tab uses its own session identifier.

The controller page says the session ID is missing

Open it through the QR code shown by the game rather than visiting /controller directly. The QR link includes the required session parameter.

The game works but I do not want to use a phone

Use mouse clicks on the main game canvas. The controller is an alternate input method, not a gate to the game.

Recommended setup

A larger desktop or laptop display makes the battlefield easier to read. Fullscreen mode can remove distractions, and a stable internet connection helps the cross-device controller remain responsive. Because the controller is browser-based, no mobile app account is required.