๐ฉ 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
- Understanding Devvit: We explored Devvitโs capabilities and how custom post types work.
- Designing the Game Flow: We mapped out the word selection process, user input handling, and win/lose conditions.
- Building the UI: The Hangman drawing, QWERTY keyboard, and game state indicators were implemented.
- Testing & Iteration: We refined gameplay using
devvit playtest, ensuring smooth interactions.
๐ง Challenges We Ran Into
- Learning Devvit: Since Devvit is relatively new, resources were limited. We had to experiment and troubleshoot many UI rendering and state management issues.
- Handling State in a Reddit Post: Keeping track of the gameโs progress and updating the UI dynamically within a Reddit post was tricky.
- Deploying the Game: Initially, we encountered errors with
devvit deploy, later realizing that installing the app viadevvit installwas the correct approach. - 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
- devvit
- jsx
- react
- typescript
Log in or sign up for Devpost to join the conversation.