1 Home
mudd edited this page 2026-03-05 10:58:38 -06:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Battle Snaps Wiki

Battle Snaps is a local multiplayer card battler where players upload photos and an AI vision model forges them into unique battle cards. Challenge other players, climb the Elo rankings, and claim the Hall of Fame.


Getting Started

Requirements

  • Node.js v18+
  • Ollama running locally with a vision-capable model
ollama pull qwen3.5:0.8b
npm install
node src/server.js

Open http://localhost:3200 in your browser. Log in with any name — no account creation needed.


How to Play

1. Forge a Card

Go to My Cards and click + Forge New Card. Upload any photo — a portrait, an object, a pet, anything. The AI analyses the image and generates:

  • A card name and flavor text
  • An element (Fire, Water, Nature, Electric, Shadow, Light, or Void)
  • A special ability name and description
  • Five combat stats that sum to ~30

Card generation runs locally and can take up to four minutes on first use.

2. Challenge in the Arena

Go to the Arena to see all other players' cards sorted by Elo. Click a card to select it as your opponent, then choose one of your own cards as your champion. Hit Send Challenge to battle instantly.

3. Track Your Battles

The Battle Log shows every fight you've been involved in — wins, losses, and the full round-by-round log.

4. Hall of Fame

The Hall of Fame shows the top 10 highest-rated cards across all players.


Cards

Each card has five stats assigned by the AI based on the image content:

Stat Role in combat
Power Raw damage per hit
Armor Damage reduction — subtracted from every incoming hit
Speed Higher speed attacks first; ties broken by Focus
Vitality HP pool (vitality × 10, so 10100 HP)
Focus Adds random damage variance (0 to focus/2 per hit)

Elo Rating

Every card starts at 1200 Elo. Wins against stronger cards earn more points; losses against weaker cards cost more. Cards gain visual effects at higher ratings:

Elo Tier Visual
< 1300 Default
13001499 Veteran Bronze border glow
15001699 Elite Silver border + light sweep
1700+ Legendary Purple border + holographic rainbow

Combat

  1. The card with higher Speed attacks first (Focus breaks ties)
  2. Each round: damage = attacker Power + random(0 to focus/2) defender Armor (minimum 1)
  3. Cards trade blows until one reaches 0 HP
  4. If neither falls within 20 rounds, the card with the higher HP percentage wins

Gauntlet

Open any card from My Cards and click Run Gauntlet to automatically battle it against every card in the Arena in sequence. Results and updated Elo are shown when complete.


Online Presence

A small dot appears next to player names on Arena and Hall of Fame cards:

  • 🟢 Green — player was active in the last 5 minutes
  • Grey — player hasn't been seen recently

Clicking a player's name opens a read-only view of their full deck.


Configuration

Environment variable Default Description
PORT 3200 HTTP port
OLLAMA_URL http://localhost:11434 Ollama base URL
VISION_MODEL qwen3.5:0.8b Model used for card generation
SESSION_SECRET card-battler-secret-change-me Express session secret

Resetting the Server

To wipe all data and start fresh:

rm data/game.db public/uploads/*
node src/server.js

The database is recreated automatically on next startup.