Inspiration
I grew up during apartheid in South Africa, in a family very involved in the liberation movement. As a child and teen I would frequently question and wonder why our leaders made the choices they did, and why they did not choose differently.
The project also comes from a more personal place. Late in my adult life, I experienced a period in which every available path carried serious consequences and the stakes were dire and existential. I do not want to describe those circumstances publicly, but they left me with a lasting question: how do people act when every choice is difficult, dangerous or morally compromising?
That question became the basis for this game, Impossible Choices.
Each game module has you playing as a key figure during a pivotal period in history. The first (and currently only) module I've created places the player in the position of Chris Hani between 1990 and 1993, as South Africa moved from apartheid towards democracy. Hani was a liberation leader, communist and commander with a lot of credibility among both political leaders and militant young people. Had he lived, it's very plausible that he would have become president, either in place of Nelson Mandela, or the very next president. His influence might have changed the relationship between political freedom and economic justice.
Because I grew up around this history and had peripheral connections to some of the people represented, this was the story through which I could most honestly begin.
What it does
Impossible Choices is a role-playing game for political history.
The player inhabits a key person during a concentrated historical turning point. GPT-5.6 acts as the game master: it presents historically grounded situations, responds to the player’s decisions and carries the consequences into an alternate timeline.
The launch module contains eight decisions from Chris Hani’s final three years. Every decision offers three costly choices. There is no clean or obviously correct answer, and the player is never shown hidden resource values or probabilities.
The player only receives information Hani could reasonably have possessed at that moment. Reports can be incomplete, mistaken or manipulated. At the end, a reckoning compares the player’s alternate road with the documented historical record and asks whether the player really could have done better.
It is not a static branching story. New games can produce different scenes, choices and plausible consequences while remaining inside the same historical pressures and chronology.
How I built it
I began with a detailed product and historical specification describing the game’s rules, tone, chronology, source requirements and ethical boundaries. I brought that specification into Codex, which helped transform it into the application architecture, interface, security model, tests, prompts and deployment.
The game uses a hybrid engine:
- GPT-5.6 Terra writes the scenes, choices, counterfactual developments and final reckoning.
- The application controls chronology, encrypted state, deterministic resolution, resource mechanics, budgets, retries and ending conditions.
- GPT-5.6 returns strict Structured Outputs through the OpenAI Responses API.
- Zod validates the structure, while additional semantic checks enforce chronology, historical cast limits and player-knowledge boundaries.
The frontend is built with React, TypeScript and Vite. Netlify Functions keep the OpenAI key server-side, while authenticated AES-256-GCM state tokens protect hidden game information. Netlify Blobs handles operational records including idempotency, rate limits, session cursors and budget reservations.
Vitest, React Testing Library and Playwright test the game across desktop and mobile layouts.
Challenges I ran into
The first major challenge was balancing quality, cost and latency. GPT-5.6 Sol produced excellent work but was too expensive for repeated public playthroughs. Luna was considerably cheaper but did not consistently achieve the narrative quality or historical judgment the game required. Terra became the best balance: a capable game master at a cost I could responsibly support.
Generation time created a different problem. A strong scene can take long enough that the wait time would be frustrating for a user, which could cause them to abandon playing it. I added visible progress, elapsed time and relevant historical material for players to read while the next scenario is generated. I learned that perceived waiting time is part of the product architecture, not merely a technical inconvenience.
Another challenge was making a generative game reliable. A retry must not change an already resolved outcome or create another API charge. The application therefore uses seeded resolution, encrypted authoritative state, idempotent requests and concurrency controls.
Finally, portraying real people demanded that generated dialogue be disclosed as dramatised. Named characters are restricted to the documented cast, and the engine uses grounded voice profiles without pretending that invented dialogue is a historical quotation.
Accomplishments that I'm proud of
I'm proud that this is now a real, playable, educational game, that anyone can use. I have so many half-finished projects, so whenever I get something done that can be useful to people in general, I'm pretty happy about that.
What I learned
The biggest lesson was that building an AI product is fundamentally different from publishing a static website.
The model is not simply producing decorative text. It is part of a live system involving state, security, validation, latency, cost control and error recovery. The most effective architecture was not to let the model control everything, but to give GPT-5.6 bounded creative authority while the application remained responsible for truth, rules and consequences.
I also learned how much can be built through sustained collaboration with Codex. I began with an idea and a large specification; Codex helped turn it into a tested, deployed application with a real generative engine.
What's next for Impossible Choices
The immediate goal is to refine the Chris Hani module through further historical review and player testing.
After that, Impossible Choices can become a library of playable turning points from different countries and periods, each placing the player inside the information, pressures and imperfect options available to someone who had to decide before history revealed the outcome.
Log in or sign up for Devpost to join the conversation.