Back to Blog

Deep Dive

Building Ye Cinema

6 min read
Full-StackSystems
PythonFastAPISQLiteGame DesignTelugu CinemaTMDB
The Ye Cinema game board, styled as a vintage theatre ticket

I love Telugu cinema, and the part I enjoy most is how connected it is. The same directors, composers and character actors keep turning up in each other's films across decades.

Ye Cinema? (ఏ సినిమా?, "which movie?") is a daily game built on that. One hidden Telugu film a day, five guesses, and a guess can be the film, its hero, its director, its music director or its production house. It's still in progress, and it wasn't always this game.

The data

A Python pipeline pulls every released Telugu-language film from TMDB, then reconciles it into SQLite: 3,438 films, 13,149 people and production houses, and 59,220 credits, covering 14 roles from lead actor to lyricist. Films are nodes too, not just edges, so "guess a film" and "guess a person" run through the same structure.

Version one: how far away is your guess?

The first version, Kanekshan, hid one person or film each day. You guessed anyone, and the game answered with how many hops away they sat in the collaboration graph. I precomputed BFS distance maps from each day's answer, with a predecessor tree, so the end-of-game reveal could draw the path from every guess to the answer, each edge labelled with the film connecting two people. The share card printed distances:

text
2️⃣1️⃣1️⃣2️⃣🎬

Why it didn't work

The thing I love about the industry broke the game: everyone has worked with everyone. The graph's diameter is 4 to 5, and for almost any answer most nodes sit at one distance: 76% for Nani, 70% for Prabhas, 61% for the least-connected answer I could find. Across 11,599 nodes there were really two useful values.

I tried three ways to get a real gradient:

  • Personalized PageRank ranked Brahmanandam (473 credits) second for nine of ten answers.
  • Bipartite hops (person → film → person) made Prabhas → Rajamouli two steps instead of one.
  • Shared-neighbour counts put Chiranjeevi closer to an answer than the director who directed him four times.

So I kept the pipeline and the part that worked, guessing people instead of just titles, and rebuilt the game around one film a day.

Version two: one film, five guesses

A guess now asks one of two questions. A person is yes or no: were they credited on this film? A film is a distance: does it share the lead, director, music director or producer (on the poster), anyone else (in the credits), or nobody? Typing S. S. Rajamouli and getting "Yes, director" narrows the answer to one filmography.

That rule replaced hidden weights (director 1.0, lead 1.5, down to lyricist 0.12) that the player never saw. Under the weights, "Same music director" came out yellow 103 times and green 11: same words, different colour. With a stated rule, there are zero card texts that can show two colours across all 224 baked puzzles.

A Ye Cinema round: Allu Arjun comes back No, Pushpa 2 comes back In the credits, S. S. Rajamouli is found as director, then Magadheera wins
A round on Magadheera: a miss, a shared-cast film, the director, then the answer.

The hint that measured out to nothing

People used to have a warmer verdict: "worked with N of its cast and crew." Measured against one answer, 429 of the 467 people famous enough to be guessed came back yellow. That's 92%, and 100% of directors. Three fixes, none worked:

  • Gate by role: directors saturated the hardest.
  • Weight each shared credit: Prakash Raj, in 163 films, handed everyone the same boost.
  • Normalize by connectedness: buried the stars and promoted one-film bit actors instead.

So person guesses became strictly binary. Fewer colours, more information per guess.

Keeping the answer off the client

The browser only downloads a name index: ids, names, nicknames, thumbnails. Each day is baked ahead of time into one gzipped file holding the verdict for every possible guess, about 900 entries in 4.5 KB. The FastAPI server looks up the id you guessed and returns one colour and one sentence, and clue text arrives only when you ask for it. Answers are drawn and frozen per date rather than seeded from the date, so nobody with the code can compute next week's film, and a single gate in front of every puzzle read refuses dates that haven't opened yet.

Picking the film

The answer pool is 480 films that pass three gates: released (TMDB lists announced films with full casts a year early), complete (director, music director and plot all present, since clues depend on them) and known, a blend of lead-actor fame, votes and popularity. Easy films run Monday to Thursday, with no repeats within a year and no two films from one franchise within 120 days. That math caps the schedule: a year needs 209 easy films and the pool has 134, so I bake 224 days, not 365.

Nobody searches by legal name

Fans say Bunny, Tarak, Jakkanna, PSPK. Search combines a hand-curated nickname list with generated transliteration variants, matched in four tiers (exact, prefix, substring, edit distance), each ranked by fame. A set of 70 nickname checks has to stay at 100% top-1 before anything ships.

Typing bunny, tarak, jakkanna and pspk into the Ye Cinema search box, each surfacing the right person
Nicknames resolve to the people fans mean.

My favourite bug: each person had a cap of 24 search keys, filled in source order, and generated keys came last. Mahesh Babu shipped with "babu" but no "mahesh", so typing the most obvious name in Telugu cinema returned four strangers.

When TMDB is wrong

With yes/no verdicts, a missing credit makes the game confidently wrong. My own cast cutoff of 12 was silently dropping 2,061 real cast members across the puzzles. Raising it to 25 keeps 97% of every cast list. For genuine TMDB gaps, a curated patch file adds missing credits, but only for people who already exist from another film, so a typo can't invent anyone.

What I'm working on now

A player told me it was too hard. With no analytics yet, I simulated players against all 224 puzzles using the server's exact verdict rule:

  • A fan who never asks for a clue solves about 5%.
  • The first clue (year, genres, runtime) carries 8.7 of the 8.9 bits needed to pick one film from 480, so it's a cliff, not a step.
  • 35% of "same lead actor" verdicts come through the heroine, which sends players down the wrong hero's films.

The redesign I'm prototyping earns clues by guessing, splits hero and heroine using TMDB's gender field, and lets you tap a person you've found to pick from their films. It simulates at about 86% solved, peaking at guess four. Next is anonymous end-of-game logging so I can tune it on real players.

What stuck

  • Measure a signal before building on it. A hint that's the same for most guesses is decoration.
  • Know the shape of your domain. Telugu cinema is small and tightly connected, and every "how connected" idea failed for that reason.
  • A stated rule beats a tuned one. If players can't predict a verdict, they stop trusting it.
  • Treat one complaint as a lead. Check it against the data, then go get real data.
Written by Anthony Nikhil Reddy Lingala