The Idea
Indian Birds – 20 Questions is a browser-based guessing game where a mystery Indian bird is chosen at random, and the player tries to identify it by asking yes/no questions – much like the classic 20 Questions parlour game, applied to ornithology.
The motivation was simple: India has extraordinary bird diversity, but most people – even nature lovers – know very little about the birds around them. A game format lowers the barrier to entry. Instead of reading field guides or memorising species lists, you learn by asking questions. Each answer narrows down the possibilities, and over time you build an intuition for how birds are grouped by habitat, size, behaviour, and appearance.
The game also works at multiple levels of knowledge. A child can play the Explorer mode using plain language; a seasoned birder can try Expert mode with scientific terminology and genuinely be challenged.
Why This Approach
Several alternatives were considered – a flashcard quiz, a photo identification challenge, a matching game. The 20 Questions format was chosen for a few reasons:
It is conversational. The back-and-forth of asking questions and getting answers mimics how a birder thinks in the field: ruling out options, zeroing in on key features.
It is forgiving. There is no single right answer pathway. You can ask questions in any order and still win. This keeps it accessible to beginners who might not know the “right” questions to ask.
It scales naturally. The same game mechanic works whether the database has 25 birds or 250. Adding more birds just means more variety, not a different game.
It runs entirely in the browser. No account, no login, no waiting. Open the link and play. This frictionless entry was a deliberate design goal.
Architecture
The app is deliberately simple – a static single-page application with no backend and no database server.
Why no backend? The game logic is deterministic: a bird is selected from a fixed dataset, and yes/no questions are answered by looking up boolean attributes on that bird object. There is nothing dynamic that requires a server. No user data is stored remotely. This keeps hosting cheap, fast, and maintenance-free.
The data layer is a single JSON file (birds.json) containing 25 Indian bird species. Each bird has about 40 boolean attributes covering size, habitat, diet, physical appearance, and behaviour – enough to make every bird uniquely identifiable through questioning. Adding new birds means adding entries to this file, nothing else.
Game logic lives in a single component. Given the bird’s attributes and the player’s typed input, the game evaluates each question against the bird’s profile and returns Yes, No, or Unsure. The “intelligence” of the game is in how well the attributes are defined in the JSON – not in any AI model.
Difficulty levels change how questions are phrased and interpreted. Explorer mode accepts everyday language (“Does it eat fish?”). Expert mode expects scientific framing (“Is it piscivorous?”). The underlying data is the same; only the vocabulary layer changes.
Tech Stack
| Layer | Choice | Reason |
| UI framework | React + Vite | Fast dev setup, component model suits game screens |
| Styling | Tailwind CSS | Rapid iteration, no custom CSS files to maintain |
| Data | Static JSON | No backend needed; fully portable |
| Hosting | Netlify | Free tier, automatic deploys from GitHub, handles SPA routing |
| Domain | GoDaddy → Netlify DNS | Custom domain pointed via A/CNAME records |
| Analytics | Google Analytics 4 | Lightweight, no cost, standard for web properties |
Implementation Notes
Game screens are managed by a top-level state variable in App.jsx that switches between Home, Game, and Result views. No routing library is used – the app is simple enough that this is unnecessary overhead.
Question parsing is handled with keyword matching against a curated vocabulary. When a player types a question, the game scans for known keywords and maps them to bird attributes. Ambiguous questions return “Unsure” rather than a wrong answer – this was a deliberate UX choice to avoid punishing well-formed but unmapped questions.
Turns are shared between questions and guesses. A player has 20 total responses. Guessing wrong costs a turn, which creates meaningful stakes without being punishing.
The home screen shows rotating photographs of birds from the dataset, giving players a visual preview of what they might encounter. Each image is labelled with the bird’s common name after it loads, serving as passive education even before a game starts.
Sharing uses the Web Share API on mobile (which triggers the OS share sheet – WhatsApp, SMS, Mail, etc.) with a clipboard fallback on desktop. The share message includes the result and a link to the game.
Open Graph tags in index.html ensure that when the link is shared on WhatsApp or social media, it renders a proper preview card with the Indian Peafowl image, title, and description.
Future Directions
- Expand the bird database beyond 25 species
- Add a hint system (e.g., reveal a partial image)
- Leaderboard or streak tracking
- Regional filter (e.g., “only birds found in South India”)
- Illustrated field-guide style reveal card on game end
Launched on 25th Feb 2026 – https://indianbirds.org