How Infini's Combination Engine Works
The Engine Behind the Magic
Ever wondered how Infini decides that Water + Fire = Steam or that Earth + Energy = Crystal? This post goes behind the scenes to explain the combination engine that powers every discovery.
Static Data, Not AI
Unlike some similar games that use AI APIs to generate combinations on-the-fly, Infini uses a completely static, pre-generated dataset. Here's why:
| Approach | Pros | Cons | |----------|------|------| | AI API (real-time) | Unlimited combos | Slow, costly, unpredictable results | | Static dataset | Instant, free, consistent, offline | Fixed number of elements |
We chose the static approach because:
- Speed โ combinations resolve in under 1 millisecond, with zero network latency
- Cost โ no API calls means no per-user costs, keeping the game 100% free
- Consistency โ every player gets the same recipes, enabling fair sharing and guides
- Offline play โ the entire game works without an internet connection
How Recipes Are Structured
Every combination in the engine follows this format:
Input A + Input B โ Result (emoji, category, tier)
For example:
{
"Water+Fire": {
"result": "Steam",
"emoji": "โจ๏ธ",
"category": "natural",
"tier": 1
}
}
The combination key is order-independent โ Water+Fire and Fire+Water always produce the same result.
The Category System
Every element belongs to one of 9 categories, which helps organize discoveries and enables filtered browsing:
| Category | Examples | Description | |----------|----------|-------------| | ๐ต Element | Water, Fire, Earth, Wind | The four base building blocks | | ๐ฟ Natural | Steam, Rain, Mountain | Nature phenomena and formations | | ๐๏ธ Artificial | Brick, Glass, Paper | Human-made materials and objects | | โจ Magical | Philosopher's Stone, Alchemy | Mystical and legendary items | | ๐ป Tech | Computer, Internet, Robot | Technology and digital concepts | | ๐ Food | Bread, Soup, Chocolate | Edible items and dishes | | ๐พ Animal | Fish, Bird, Dragon | Living creatures | | ๐ Place | City, Ocean, Space | Locations and environments | | ๐ก Concept | Time, Love, Music | Abstract ideas |
The Tier System
Tiers represent how many combination steps an element requires from the base elements:
- Tier 0: Water, Fire, Earth, Wind (starting elements)
- Tier 1: Direct combinations of Tier 0 elements (e.g., Steam from Water + Fire)
- Tier 2: Requires at least one Tier 1 ingredient
- Tier 3+: Deep discoveries requiring multi-step crafting chains
Higher tiers generally correspond to rarer and more interesting discoveries.
Performance & Architecture
Infini is built as a Progressive Web App (PWA) with these technical characteristics:
- Framework: Next.js with static site generation
- State management: Zustand for client-side game state (persisted to localStorage)
- Rendering: All 400+ recipe pages are pre-rendered at build time
- Bundle: The entire combination dataset is ~50KB gzipped
- Offline: Service Worker caches all assets for offline play
What This Means for Players
Because the engine is static and deterministic:
- โ Guides and tips from other players will always be accurate
- โ Your progress is saved locally โ no account needed
- โ The game loads instantly even on slow connections
- โ You can install it as an app on your phone or desktop
Want to Explore More?
- Browse all elements in the Lexicon
- Check out Getting Started if you're new
- See the Hardest Elements for a challenge
Have questions about how Infini works? Contact us โ we'd love to hear from you.
Frequently Asked Questions
How does Infini generate word combinations?
Infini uses a pre-generated static dataset of over 400 crafting recipes. Each combination maps two input elements to an output element with an emoji, category, and tier. The data is bundled at build time for instant, offline-capable gameplay.
Can Infini be played offline?
Yes. Because the combination data is pre-bundled into the app as a static JSON file, Infini works without an internet connection once loaded. It's also a Progressive Web App (PWA) that can be installed on your device.
What technology is Infini built with?
Infini is built with Next.js and React, uses Zustand for state management, and is deployed as a statically-generated site for maximum performance. The combination engine runs entirely in the browser.