Inspiration

What it does

How we built it## Inspiration

Almost every new streamer hits the same wall. You have an idea, a voice and a little free time, but no budget. Your background is your bedroom: an unmade bed, a bare wall, a pile of laundry. Meanwhile, the streams that get discovered look like TV shows, with custom scenes, animated backgrounds and a lively chat.

Viewers decide in seconds. They click in, see a plain room and an empty chat, and leave. The streamer sees zero viewers, stream after stream, and starts to believe nobody wants what they make. After a few weeks many of them stop. Their dream doesn't fail because they lack talent. It fails because they lack production.

We wanted to change that. The one resource every streamer has, even with only three people watching, is their chat. If chat could build the scene, with art, backgrounds and little characters, then a small stream becomes something worth staying for. Viewers become part of it, and that is what makes people come back.

We used Codex Plan mode to explore the idea and break the work into small milestones, reviewed and approved each one, then built and tested it step by step.

Codex session ID(s): 01a17e14-fcf3-7481-9d24-38f51b3ba8ed

What it does

Little Worlds: chat builds the stream.

  • Viewers type !draw a smiling cloud wearing sunglasses in Twitch chat, or use a browser studio where they can sketch, describe or let a prompt helper write the prompt for them, so no one needs to know how to prompt.
  • AI makes the art in a style they choose (neon, cartoon, pixel art, watercolor, storybook). They can preview privately and try again before sending.
  • Creations land in the streamer's private review queue. The streamer previews, resizes, places and approves them, and approved art appears in an OBS overlay, credited to the viewer.
  • Viewers can propose objects, background pieces or a full background. The streamer has a video-call-style background gallery with presets, AI-made backgrounds, uploads and a library of everything chat made.
  • A webcam preview with person cut-out shows only you in front of the virtual background, so a messy room stops mattering.

How we built it

We used Codex Plan mode to explore the idea and break the work into small milestones, reviewed and approved each one, then built and tested it step by step. [Optional, edit as you like: Later features and fixes were also built with Claude Code.]

The server is a small Python app with no framework, and the front end is plain HTML, CSS and JavaScript. Twitch chat comes in over EventSub WebSockets. OpenAI's moderation endpoint checks every word and image, and its image models create the art. The webcam cut-out runs in the browser with Google's MediaPipe, so no video is uploaded. A Cloudflare tunnel exposes only a four-endpoint viewer page, while the streamer's controls and Twitch tokens stay on the streamer's computer. The project has 90 Python tests and 5 Node tests.

Challenges

  • Trust on a live stream. Letting chat create images is risky. We made moderation fail closed (if the check is down, the submission is blocked), required streamer approval for everything, and gave viewers three warnings per room.
  • Cost. AI images cost money, so we capped each room at $N$ attempts. With a cost of roughly $c$ per image, the worst case is $N \times c$, which is cents. Presets and moderation cost nothing.
  • Heavy images. Our first AI backgrounds came back at about 3 MB, but the scene refreshes every second. Asking for compression cut them to about 200 KB.
  • The cut-out. The model's GPU mode failed on some setups, so we added a safe fallback to the CPU, and a check that makes sure the person, not the room, is kept.
  • Twitch limits. Twitch sign-in needs a fixed address, but quick tunnels change every time. So verified identity comes through !draw, and browser viewers type a name.
  • Bugs found by review. The size slider could resize the wrong object, a viewer's private preview could survive leaving a room, and a pending camera request could start the camera after leaving. Each now has a regression test.

What we learned

Safety and fun need to be designed together: the approval step is what makes it safe to let chat create. Small tests for each bug saved us more time than any big rewrite. And the best fix for a streamer with no budget is not more tools, but a way to turn their small community into the production crew.

What's next

A named tunnel for stable viewer links and verified viewer login, saved rooms that survive a restart, more styles and animations, and a hosted demo mode so anyone can try it without keys.

Code: https://github.com/harsharajkumar-273/little-worlds

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Little Worlds

Built With

  • apikey
  • codex
  • openai
Share this project:

Updates

Submission history