Inspiration

Word Warp was inspired by fill-in-the-blank games I played growing up as a kid, like "Mad Libs". I thought adding a Reddit twist to this genre of games would be fun, with the most upvoted comments determining the words of the story.

What it does

There are two game modes in Word Warp. Both game modes involve filling in the blanks to a story based on user-generated comments. Stories are generated by prompting an AI (specifically Google Gemini).

In Live Warp, the story always updates live as comments get upvoted. The story is always public for everyone to see.

In Mystery Warp, the story is hidden until 24 hours have passed. Once the story is revealed, the most upvoted comments at the time will be shown and will not change.

How we built it

I built Word Warp using Reddit's Developer Platform, and it provided APIs and SDKs. Reddit's Blocks system was used to display the information/welcome page for the game, where users can generate a story using a prompt and AI. Reddit's Webviews were used to display the actual game so that long stories could be scrolled and the UI could be styled with CSS. I used React, Vite, TypeScript, and TailwindCSS for the web application, as that allowed me to prototype, test, and iterate quickly.

Challenges we ran into

Posting all the comments for the blanks was a challenge. For each blank in the story, I would need to generate a top-level comment for the post so that users can reply with their words. However, posting multiple comments at once would get rate-limited by Reddit. I overcame this limitation by queuing comments when a story post is created using the Scheduler. (This does mean there is a brief delay between posting a story and being able to see it as the comments are being generated.)

Accomplishments that we're proud of

I am glad I was able to implement two different game modes in time for the game. Live Warp is fun to see the story live and fill in the blanks immediately, but Mystery Warp brings back that childhood fun of writing down words that matched different types and being surprised at what story those words would create.

What we learned

One thing I learned was how to query comments in Devvit with Reddit's API. To get each second-level comment (user responses) for a post, I would have to query each top-level comment individually and not just query the post for all the comments, as doing that would only fetch the top-level comments.

What's next for Word Warp

I am interested in implementing Reddit Payments to Word Warp to allow users to pay to generate stories. This would allow users to think before they generate a story to ensure it would be interesting and allow Word Warp to be sustainable in the long term. I also want to auto-schedule Live Warps to be posted automatically, using a random prompt. This would allow Word Warps to show in users' Reddit feeds without someone having to create a Word Warp themselves, allowing for more engagement with the game.

Built With

Share this project:

Updates