Inspiration
Hello Open AI build week! I am Milton from SF. For the past 3 years I built and distributed AI-native consumer apps (www.hyperblob.studio) as a team of one. Eventually I pursued my passion in game development, and spent the past 5 months operating as an indie game dev.
Game dev was not easy. I made mistakes and failed a lot. The most important lesson - making a game is less like following a blueprint and more like searching an ocean for its deepest point (measured in fun!). The search space is multi-dimensional and infinite, but indie devs just starting out often commit to the first promising idea (like I did) and spend months polishing it. By the time I learnt that a different direction might have been more fun, sunk cost makes changing course painful.
That's why I now put a lot more emphasis on the prototyping phase. As AI makes it much faster to build things, we can leverage this power to conduct thorough searches before committing. That led to Search for Fun: a tool to help game devs go wide before narrow, in order to maximize their chance of success.
What it does
It turns your starting game idea into a family tree of playable bite-sized prototypes. To install, simply fork the repo and launch it in Codex with $search-for-fun.
You starts with a short description of the game. Codex then uses sub-agents to create deliberately different branches. The local web studio presents those branches as a full-screen node map, from where you can play with all the prototypes!
After playing, use the web studio to rate the prototypes from one to five stars for fun, leave some feedback, flag promising directions, and queue up the next experiment! Ask Codex to continue the search with your human-in-the-loop inputs, and eventually you'll have a cool search graph.
How I built it
Just 3 simple layers: a repository-local Codex skill orchestrates the search; a React studio renders the search graph and playable workspace; a shared KAPLAY runtime hosts every game inside a sandboxed iframe.
The host owns engine lifecycle and generated games only implement a small mount contract. This gives every branch consistent controls while keeping generated code constrained.
Challenges I ran into
Making generated games reliably playable inside the iframe. Ran into some edge cases on leak state and hallucinated code. Runtime contract and Kaplay v4 details in the skill data helped.
Noddled hard on durability, and i eventually decided just to go local first. Keeping everything in the chat history is ok but annoying to navigate. Now, the complete search lives in the repository rather than in one chat session or a database, and leverage git to do the bookkeepings. I like the local-first approach to amplify Codex's abilities :)
Finding the right interaction model. First version felt like a dashboard wrapped around a game and was not user friendly. Spent some time to arrive at the current graph-centric UI.
Accomplishments that I'm proud of
I'm pretty proud that Search for Fun is a complete loop rather than a toy. I believe it provides real value to game developers who use Codex. I'll be personally using it and improving it for the next while!
What I learned
The most exciting use of AI for game development is not only faster development but for broader exploration.
A rough playable prototype produces better design evidence than a polished POC.
Constraints can increase creative throughput.
What's next
Next, I wanna to make it an installable Codex plugin with an embedded studio, so you can start a search with less overhead. Also, multi-player is on the radar!
Built With
- codex
- kaplay


Log in or sign up for Devpost to join the conversation.