Inspiration

The Farcaster name comes from the Technocore-made portals present in the (sci-fi) novels Hyperion and The Fall of Hyperion by Dan Simmons. Highly recommend Hyperion!

I originally was going to hack something more serious on the insurance industry. However, it would not have been feasible to produce a decent product in the amount of time allotted (not to mention that I had to partially focus my attention in a personal, emergent matter). Hence, I decided to hack a more hackathony, fun project: Instagram Reels for playable mobile games.

I made the decision to hack this after looking at the most recent demos for GPT-5's raw coding capabilities and asking ChatGPT to write HTML5 games that could run in its canvas, with pretty reasonable success. Apple also recently updated their terms and conditions for video emulators in the AppStore, which made me wonder whether they also updated their terms to allow for HTML-games platforms, so I checked, and they do allow it now!

What it does

In its most basic version, Farcaster is an infinite-scrollable platform for mobile games. All the games in the platform are completely ideated and coded by AI agents, and any time you are close to "running out of games", more games are coded up, on the fly. Instead of doomscrolling for hours on TikTok, you can doomscroll for hours on mobile games (some of which can be educational)

How I built it

I used Modal as the base for all of the backend to:

  • serve FastAPI web endpoints;
  • spawn multiple agents in parallel, dynamically and preemptively;
  • execute code in Sandboxes (for code verification), spawned dynamically;
  • store the verification script in a Volume;
  • scale containers up and down as needed;
  • manage secrets for the backend;

While I am currently bottlenecked by the OpenAI API for some of the requests coming from the parallel Modal agents, a future version can easily use gpt-oss deployed on modal for truly infinite, beautiful scalability. I used FastAPI to deploy the backend endpoints (through Modal), Supabase for a barebones database, NextJS for the frontend, Cloudflare R2 for cloud storage, LangGraph for all the agent logic, uv for python package management, and a few other APIs like Bria for image generation and background removal and stuff.

Challenges we ran into

  • The agents were not agenting properly at ~4 am today, mostly due to me mishandling their state. Sleep deprivation didn't help, but I did get it fixed after a 10 minute power nap.
  • I was severely bottlenecked by the OpenAI rate limits since my personal account is in the lowest tier. Testing was rough and really slow, unfortunately. In the end I had to resort to using worse models by OpenAI, which clearly affected the quality of the video games that were being produced.

Accomplishments that I'm proud of

  • Getting a reasonable frontend to work; it is historically not my area of expertise.
  • Building a non-SaaS produce for fun! It had been a minute since I last built something like this.

What I learned

  • I used Supabase and Cloudfare R2 for the first time. In the past I have used other db / storage providers, but wanted to try something new.
  • How to use Sandboxes and Volumes (hopefully correctly)
  • I was a bit outdated on some frontend concepts; it was nice to get a refresher.

What's next for Farcaster

  • User accounts and auth
  • * Adding social aspects to the platform: being able to compete or collaborate with friends in social games (is Farmville so back?), remix games based on the existing ones, send games and challenges, etc. Let's get those network effects!
  • Speed improvements game generation
  • gpt-oss as the backbone, possibly with some fine-tuning.
  • Verification improvements (e.g. agents should be able to play and test the games before they are published)
  • Better recommendations (e.g. if a user really likes "math" games, let's create and show them more of those)
  • Prompt optimization

Built With

Share this project:

Updates