Inspiration

I've spent a lot of time in Twitch chats, enjoying conversations, messing around in the chat, and overall just being part of the communities that form around streamers. But even during those great moments, I often found myself wishing there were more ways to participate. I wanted something beyond sending messages or watching what happened on screen.

When I first heard about situations where a Twitch chat could collectively control a character in a video game, it opened my eyes to what interactive streaming could become. I loved the idea that viewers could actively influence an experience.

That curiosity eventually led to a question: What if a Twitch community could build and inhabit its own little world, simply by being part of the stream?

That's where Living Town began.

I wanted to create something that gave viewers a sense of presence and belonging. Somewhere a subscriber could have a home of their own, and the entire community could watch its shared world grow over time. I am so many ideas for this.

Rather than making participation depend on winning a game or constantly issuing commands, I wanted even ordinary community interactions to mean something.

What it does

Living Town is an interactive, persistent virtual town that grows alongside a Twitch community.

Each streamer can establish their own cozy, procedurally generated town, complete with an animated cat Mayor who wanders through the streets and responds to community activity.

As Twitch viewers participate, the town comes alive:

  • Followers become residents. Streamers can import existing followers and welcome new followers through Twitch integration.
  • Subscribers receive their own houses. Members are assigned homes, initially occupying existing cottages before new construction becomes necessary.
  • Neighborhoods expand automatically. As housing capacity fills, the town grows to accommodate the community.
  • Subscribers can personalize their homes. House names, colors, fences, gardens, and decorative details help make each home feel personal.
  • The Mayor celebrates milestones. New subscriptions, resubscriptions, gifted subscriptions, and new followers have distinct animated reactions.
  • Live chat brings more energy to the town. Twitch chat activity influences the Mayor's behavior.
  • Streamers can bring the town into OBS. Living Town provides different presentation modes, including a town-focused view and Mayor Spotlight.

Living Town also supports the idea that one Twitch user can be both a streamer and a subscriber. Someone can manage their own community town while owning houses in other streamers' towns, all from one account.

The project includes development simulations for demonstrating town growth, subscriber housing, Mayor reactions, and the subscriber experience without requiring real paid subscriptions.

How we built it

I developed Living Town with OpenAI Codex as my primary AI coding partner, using an iterative process of planning, prompting, implementing, testing, and refining.

The application uses:

  • Next.js, React, and TypeScript for the website, dashboard, navigation, and application logic.
  • PixiJS for rendering the animated town, houses, residents, and Mayor.
  • Twitch OAuth and APIs for account authentication, community information, and subscriber-related functionality.
  • Twitch EventSub for supported live community events and chat activity.
  • Supabase PostgreSQL for persistent towns, residents, housing assignments, customization, and related application data.
  • OBS Browser Sources for displaying the town and Mayor during broadcasts.

Development began with a procedural town prototype and a simple animated Mayor. I then progressively added Twitch authentication, persistent data, subscriber housing, automatic expansion, customization, live integrations, and streamer-facing controls.

Codex helped implement these systems, investigate unexpected behavior, improve security, write automated tests, and resolve issues uncovered during manual testing.

I also used Codex to develop isolated simulations so that more complex Twitch scenarios could be demonstrated and tested without affecting genuine community records.

The project has almost 300 passing automated tests, along with successful TypeScript, lint, and production-build validation.

Challenges we ran into

Connecting live Twitch events to a persistent world

One of the biggest challenges was ensuring that Twitch activity translated into meaningful town changes without creating duplicate residents, incorrect housing assignments, or repeated celebrations.

A virtual world needs to remain consistent even when events arrive more than once, connections restart, or someone returns after being away.

Making subscriber housing reliable

Assigning houses sounds simple until the town has to distinguish between followers, subscribers, returning subscribers, gifted subscriptions, and viewers who participate in several communities.

I had to make sure ownership stayed associated with the correct Twitch identity and that neighborhoods expanded without replacing existing houses or losing customizations.

Designing for both streamers and viewers

Living Town has two different audiences. Streamers need to manage their communities and stream displays, while subscribers need to find, customize, and visit their homes.

I had to ensure that I could test the experience from the perspective of a streamer and subscriber. It is easy to test what you create because you know the steps. I had to simplify the user experience as much as I could. Helps to have an IT background for that one.

Testing the subscriber experience was especially challenging without an existing paid subscription relationship between suitable test accounts. I addressed that by building a secure, development-only fictional community called Maplebrook, allowing a Twitch user to experience the subscriber journey without creating false production entitlements.

Balancing visual appeal and performance

As towns grow, there are more houses, residents, animations, and visual effects to render. Maintaining a lively town while keeping movement, camera behavior, and OBS displays responsive required careful refinement.

I had more ideas for making the town and mayor more visually appealing but I had to stick with this considering the time I had. It will likely affect performance but that is a challenge to confront.

Simplifying complex setup

Twitch permissions, historical imports, and live event connections initially required too many separate actions. I eventually consolidated these into a guided community connection experience so streamers wouldn't need to understand every technical integration before enjoying their town.

Accomplishments that we're proud of

My biggest accomplishment is seeing Living Town evolve from an idea about Twitch interaction into a functioning application with its own identity and visual style. It's one thing to think about it, and another to find yourself creating a demo video and feeling more proud when it all comes together.

I'm particularly proud of:

  • Creating a charming animated world with a Mayor who gives the town personality.
  • Implementing real Twitch login, historical follower import, and live follower activity.
  • Building a persistent housing system where community members can receive and customize homes.
  • Making town expansion automatic while preserving existing homes and residents.
  • Supporting streamer and subscriber experiences under the same Twitch identity.
  • Adding housewarming highlights.
  • Bringing Living Town into OBS with configurable presentation modes.
  • Building reproducible development demonstrations and documenting how others can evaluate the project.

Most importantly, Living Town reflects the experience I originally wanted as a Twitch viewer: a community where participation leaves something visible behind.

What we learned

Building Living Town taught me that creating an interactive application isn't just about responding to events. It's about making those events feel meaningful to the people experiencing them.

A subscription shouldn't only increment a number. It should welcome someone into the world, give them a place to call home, and let the community celebrate that moment.

I also learned how much coordination is involved in connecting authentication, live events, persistent data, authorization, and visual rendering into one cohesive experience.

Working with Codex reinforced the importance of clear requirements and iterative verification. Some of the most valuable improvements came from testing the application myself, noticing where an experience felt confusing or incomplete, and turning those observations into focused development tasks. OpenAI helped me to evaluate what I observed/wanted and turn it into actionable prompts for Codex.

Automated testing helped protect existing functionality, but manual testing remained essential for understanding how the application actually feels to a streamer or subscriber.

What's next for Living Town

This hackathon version establishes the foundation, but there are several directions I would love to explore.

Twitch Extension integration

A Twitch Extension could let viewers discover and interact with Living Town directly on Twitch, making the experience more accessible without requiring them to visit a separate website for every interaction.

More ways for viewers to participate

I would like to explore additional community interactions, including Bits, raids, channel point redemptions, and other streamer-configurable activities.

Deeper home and neighborhood customization

Subscribers could eventually personalize more aspects of their homes, while streamers could unlock different town themes, decorations, and community landmarks.

More personality for the Mayor

Additional animations, reactions, personalities, and interactions could make the Mayor feel even more connected to the community.

Production hosting and onboarding

The next major engineering step is a fully hosted, continuously available service with improved connection recovery, simplified onboarding, and stronger operational monitoring.

Ultimately, I'd love Living Town to become a place that viewers look forward to returning to.

Built With

Share this project:

Updates

Submission history