Login  |  RegisterTiny quest • Tiny world • Tiny dragon
Tinker toy — demo only, saves locally. Your quest saves in this browser only. No account, no leaderboard, no real money. If you clear storage, your quest is gone. That is the point — it is tiny.

Choose your tiny hero

Tap a hero, then tap Start Quest. Move with WASD / arrows, or tap the D-pad, or tap a tile next to you. Mountains ⛰️ and lakes 🌊 block you. Monsters 👹 and the dragon 🐉 fight you. Crystals 💎 are the quest.

No hero yet — pick one aboveQuest: —
—HP
0Gold
0XP • Lv 1
0 / 3Crystals 💎

Keyboard: WASD / Arrows to move • H = Potion • S = Save

👹 Tiny Monster

HP: —

A tiny monster blocks you!


Pick a hero, Start Quest, then move. Tap a tile next to you, or use WASD / arrows.
Backend  ·  Template · Proposed · Not connected

Backend, tinyquest Backend, Template

Right now tinyquest is a local toy plus save in this browser, no account, no leaderboard. This backend is the map to make it real: save, leaderboard, daily quest. Proposed, not connected.

01 / Files to create
api/tinyquest/save.php     POST /api/tinyquest/save
api/tinyquest/load.php     GET /api/tinyquest/load
api/tinyquest/leader.php   GET /api/tinyquest/leader
sql/tinyquest_tables.sql

Keep the tinyfiles PHP pattern: /api/bootstrap.php, json_in() / json_out(), prepared PDO.

02 / Database tables
tinyquest_saves
  id BIGINT AUTO_INCREMENT PRIMARY KEY
  user_id BIGINT NOT NULL
  hero VARCHAR(50) NOT NULL
  x INT NOT NULL
  y INT NOT NULL
  hp INT NOT NULL
  gold INT NOT NULL
  xp INT NOT NULL
  crystals INT NOT NULL
  potions INT NOT NULL
  won TINYINT NOT NULL DEFAULT 0
  updated_at DATETIME NOT NULL

tinyquest_leader
  id BIGINT AUTO_INCREMENT PRIMARY KEY
  hero VARCHAR(50) NOT NULL
  display_name VARCHAR(100) NOT NULL
  moves INT NOT NULL
  won_at DATETIME NOT NULL
03 / API endpoints
POST /api/tinyquest/save
{ "hero": "Knight", "x": 2, "y": 3, "hp": 80, "gold": 40, "xp": 20, "crystals": 1, "potions": 1 }
- saves one quest, overwrites previous save for this user

GET /api/tinyquest/load
- returns last save, or empty if none

GET /api/tinyquest/leader
- returns top 10 wins by fewest moves, display_name only, never user_id or email

Save must be server-side validated: x 0 to 7, y 0 to 7, hp 0 to 200, crystals 0 to 3.

04 / Cooldown, moderation and validation
// Cooldown: 1 save per 5s, 1 load per 2s, 1 leader per 10s
// Validation: hero must be in allowlist [Knight, Mage, Rogue, Bard], x/y 0 to 7, hp 0 to 200, gold 0 to 9999, xp 0 to 9999, crystals 0 to 3, potions 0 to 9
// Safety: never trust client win flag, server recomputes win from x/y + crystals + dragon defeated
// Privacy: leaderboard shows display_name only, no email, no location

Keep disclaimer until this ships: Tinker toy, not live yet.

05 / Frontend wiring
// On Start / Move / Attack / Potion: update local state, render map, log
// On Save: POST /api/tinyquest/save in real version, localStorage in demo
// On Load: GET /api/tinyquest/load in real version, localStorage in demo
// If API fails, fall back to local save plus disclaimer.
Copy snippets into api/tinyquest/ plus sql/tinyquest_tables.sql, no GitHub needed. tinyquest stays safe by never requiring an account to play, never showing emails on a leaderboard, and never trusting a client win flag.

Made by people,
for people.

Shop
Gift cards
Registry
Sitemap
Blog
Sell
Seller handbook
Teams
Forums
Affiliates & Creators
About
tinyfiles, Inc.
Policies
Investors
Careers
Press
Impact
Help
Help Center
Privacy settings

United States | Terms of Use | Privacy | Interest-based ads | Local Shops | Regions | © 2026 tinyfiles, Inc.