๐ŸŽฉ Hanging by a Thread - A Hangman Game for Reddit ๐ŸŽฎ

๐Ÿ’ก Inspiration

The inspiration behind Hanging by a Thread came from a love for classic word games and the desire to bring interactive experiences to Reddit communities. Hangman is a simple yet engaging game that encourages collaboration and competition. With Devvit's custom post type feature, we saw an opportunity to reimagine Hangman as a Reddit-native game where users can play directly within posts.

We wanted to create a game that:
โœ… Enhances community engagement by allowing Redditors to play together.
โœ… Leverages Redditโ€™s post system to turn ordinary posts into interactive experiences.
โœ… Brings nostalgia with a modern twist by integrating an animated Hangman and a clickable keyboard.


๐ŸŽฎ What It Does

Hanging by a Thread is a fully playable Hangman game on Reddit.

๐Ÿ”น The game is posted as a custom post type in a subreddit.
๐Ÿ”น Players guess letters using a QWERTY keyboard interface.
๐Ÿ”น An animated Hangman figure appears piece by piece for every incorrect guess.
๐Ÿ”น If the player guesses the word, they win! Otherwise, the Hangman is fully drawn, and they lose.
๐Ÿ”น The keyboard disappears after game completion to indicate the game is over.
๐Ÿ”น It works seamlessly on both desktop and mobile!


๐Ÿ›  How We Built It

Tech Stack

  • Devvit โ€“ For integrating the game as a Reddit custom post type
  • TypeScript โ€“ For building the core game logic
  • React (JSX in Devvit) โ€“ For rendering the UI components
  • Devvit API โ€“ For handling user interactions and updating post content

Development Process

  1. Understanding Devvit: We explored Devvitโ€™s capabilities and how custom post types work.
  2. Designing the Game Flow: We mapped out the word selection process, user input handling, and win/lose conditions.
  3. Building the UI: The Hangman drawing, QWERTY keyboard, and game state indicators were implemented.
  4. Testing & Iteration: We refined gameplay using devvit playtest, ensuring smooth interactions.

๐Ÿšง Challenges We Ran Into

  1. Learning Devvit: Since Devvit is relatively new, resources were limited. We had to experiment and troubleshoot many UI rendering and state management issues.
  2. Handling State in a Reddit Post: Keeping track of the gameโ€™s progress and updating the UI dynamically within a Reddit post was tricky.
  3. Deploying the Game: Initially, we encountered errors with devvit deploy, later realizing that installing the app via devvit install was the correct approach.
  4. Mobile Responsiveness: Adapting the layout, font sizes, and button interactions for both desktop and mobile took extra effort.

๐Ÿ† Accomplishments That We're Proud Of

โœ… Successfully built a fully playable Hangman game on Reddit using Devvit.
โœ… Implemented an intuitive and responsive UI that works on all devices.
โœ… Designed an interactive keyboard that makes gameplay fun and easy.
โœ… Created an animated Hangman for visual engagement.
โœ… Overcame Devvit-specific challenges to bring the idea to life.


๐Ÿ“š What We Learned

  • How to build interactive apps using Devvit.
  • State management within a Reddit post-type application.
  • Optimizing UI for both desktop & mobile experiences.
  • Debugging and troubleshooting Devvit CLI issues.
  • Best practices for user-friendly game design in a constrained environment.

๐Ÿ”ฎ What's Next for Hanging by a Thread

๐Ÿš€ Future Plans:
๐Ÿ”น Multiplayer Mode โ€“ Allow multiple Reddit users to collaborate on guessing words.
๐Ÿ”น Custom Word Sets โ€“ Enable subreddit moderators to define word categories.
๐Ÿ”น Leaderboard & Score Tracking โ€“ Add a scoring system and rankings for competitive gameplay.
๐Ÿ”น Themed Hangman Drawings โ€“ Different styles for different subreddits.

Weโ€™re excited about where this project can go and hope to see Reddit communities enjoy playing it together! ๐ŸŽ‰


๐Ÿ’ฌ Feedback & Contributions Welcome!
Have ideas for improvements? Found a bug? Open an issue or contribute on GitHub!

Built With

Share this project:

Updates