Scalar is a deductive guessing game published at scalargame.com/scalar as part of the ScalarGame platform. A hidden target entity is selected each day via a deterministic PRNG (Mulberry32, seeded by date + category), ensuring all players worldwide see the same puzzle. The goal is to identify it in as few total moves as possible.
How It Works
Submit a guess — any entity in the active category. Every attribute of your guess returns structured feedback with a status, a direction, and a display value. Seven logic types cover every comparison imaginable:
| Logic Type | Behavior |
|---|---|
| EXACT_MATCH | Binary — green on match, white on miss |
| HIGHER_LOWER | Numeric comparison with ↑/↓ arrows and percentage-tier proximity |
| GEO_DISTANCE | Haversine great-circle distance between capital cities |
| CATEGORY_MATCH | String equality with optional distance-based gradient coloring |
| SET_INTERSECTION | Overlap of comma-separated lists, shown as "X/Y" count |
| TARGET | Reveals the exact target value directly |
| NONE | Attribute always hidden until a hint is revealed |
Feedback uses a thermal color palette: Exact (green), Hot (orange), Near (amber), Miss (white). The same four states appear across all seven logic types, so the learning curve is front-loaded.
Categories
| Category | Entities | Notable Attributes |
|---|---|---|
| Countries | 195 | Continent, subregion, hemisphere, area, population, borders, geo distance, timezones |
| Elements | 118 | Atomic number, group, period, phase at STP, family, block, radioactivity |
| US States | 50 | Region, statehood year, area, population, bordering states |
| Cities | Varies | Country, continent, population, geo distance |
Difficulty Modes
Three modes are selectable before the first move. Switching is locked once any move has been made.
| Mode | Autocomplete | Hidden Fields | Visualizations |
|---|---|---|---|
| Novice | 12 suggestions | None | Free |
| Scholar | 6 suggestions | None | +3 moves |
| Prodigy | 0 suggestions | Shown | +10 moves |
Visualizations
- World Map (Countries) — interactive map with the target's region highlighted. The geographic distance cell doubles as an entry point.
- Periodic Table (Elements) — full interactive table with the target's position revealed.
On Novice, visualizations are free. Scholar costs +3 moves, Prodigy costs +10. Once opened, they stay visible for the rest of the game.
Scoring
Scalar uses a Total Moves system — lower is better. Every action costs moves; credits soften the early game.
| Action | Cost |
|---|---|
| Submit a guess | +1 move |
| Reveal a hint (eye icon) | +1 move |
| View visualization on Scholar | +3 moves |
| View visualization on Prodigy | +10 moves |
| Reveal answer (forfeit) | Game ends |
Players start with 3 free hint credits per game displayed as filled squares in the header.
Modes
- Daily — counts toward streak and stats; same puzzle for all players worldwide
- Free Play — random past date, no streak impact, full game preserved
- Challenge — Base64-encoded URL locks in category, entity, and an optional move target for head-to-head comparisons
Features
- Guess cards auto-collapse (last 3 expanded, older reduced to a colored summary strip)
- Collection browser at `/scalar/collection` — browse all previously encountered entities
- Share card capture via `html-to-image`
- Autocomplete with fuzzy matching, keyboard navigation, up to 8 suggestions
- Per-category localStorage persistence — switching categories preserves all in-progress state
- Data-driven architecture — adding a new category requires only a CSV file and a schema config, no UI changes
Architecture
State lives in a slot-based Zustand store keyed by `(mode, category)`. Per-category JSON is lazy-loaded via Vite code-splitting — no upfront bundle cost for categories the player hasn't touched. The feedback engine in `gameLogic.ts` uses a dispatch pattern over schema-defined logic types, keeping the core loop purely data-driven.