Developing "Would You Rather" as a solo developer has been an enlightening journey and really fun and exciting, blending the timeless appeal of classic dilemmas with Reddit's dynamic community features. The goal was to craft an engaging experience that sparks conversation and debate among users.
Inspiration
Long time Reddit user and now Dev. Reddit has a rich history of fostering community-driven interactions through innovative experiments like r/place and r/thebutton. These initiatives captivated users worldwide, demonstrating the platform's potential for large-scale social engagement. Inspired by this legacy, I aimed to create an experience that would similarly unite Redditors in playful debate and discussion. The classic "Would You Rather" game, known for its simplicity and ability to spark conversation, seemed like the perfect fit to encourage meaningful interactions within the Reddit community.
What It Does
"Would You Rather" is an interactive Reddit game that presents users with daily dilemmas, asking them to choose between two options. Each post features a unique question designed to provoke thought and discussion. Users cast their votes by selecting their preferred option and can view real-time voting results, fostering a sense of community participation. The game encourages users to share their reasoning in the comments, leading to engaging conversations and diverse perspectives.
How I Built It
The development of "Would You Rather" leveraged Reddit's Developer Platform, Devvit, which enables the creation of interactive experiences within Reddit posts. Key components of the build process included:
Interactive Posts: Utilizing Devvit's interactive post templates, I designed posts that dynamically present questions and capture user interactions seamlessly across web and mobile platforms.
State Management: Implementing
useStateanduseAsynchooks allowed for managing user selections and updating vote counts in real-time, ensuring a responsive user experience.Persistent Storage: By integrating Reddit's
kvStore, I maintained vote tallies and user choices across sessions, providing consistency and reliability in data handling.Dynamic Content Rotation: Developed a scheduling mechanism that updates the question daily, ensuring fresh content and sustained user engagement.
Challenges I Ran Into
Throughout the development process, several challenges were encountered:
Stateful Rendering in Devvit: Transitioning from React to Devvit presented challenges due to the absence of lifecycle methods like
useEffect. To address this, I implemented custom mechanisms to track user interactions and state changes within the game.TypeScript Typing with Devvit’s JSONValue: Ensuring correct data casting and maintaining type safety required the creation of custom interfaces and careful utilization of the
asoperator to align with Devvit’sJSONValuetype. This meticulous approach was essential for seamless data handling within the application.Question Indexing & Rotation: Balancing the need for testability with user experience involved implementing modular logic to control question timing. Initially, quick intervals facilitated testing, but for production, a daily rotation schedule was adopted to enhance user engagement.
Data Update and Retrieval Timing: Managing the timing of data updates and retrievals posed a challenge, as the rapid execution led to issues with implementing delays. To mitigate this, I opted to update previously fetched data while simultaneously updating records for future screen refreshes, ensuring consistency and accuracy in the displayed information.
Accomplishments That I'm Proud Of
Several key accomplishments include:
Seamless Integration: Successfully embedding an interactive game within Reddit posts that operates smoothly across various devices and platforms.
User Engagement: Designing a game that not only entertains but also fosters community interaction and discussion, aligning with Reddit's ethos of collaborative engagement.
Scalability: Building a system capable of handling dynamic content updates and user interactions at scale, ensuring a consistent experience for all participants.
What I Learned
The development of "Would You Rather" provided valuable insights:
Community Collaboration: Leveraging Reddit's Developer Platform and engaging with its developer community can significantly enhance the development process through shared knowledge and support.
User-Centric Design: Prioritizing user experience by focusing on intuitive interfaces and responsive interactions leads to higher engagement and satisfaction.
Adaptability: Being prepared to navigate and adapt to new development environments and tools is crucial for innovation and problem-solving.
What's Next for "Would You Rather"
Looking ahead, several enhancements are envisioned:
Expanded Question Library: Curating a broader range of questions to cater to diverse interests and keep the content fresh and engaging.
User-Generated Content: Implementing a feature that allows users to submit their own "Would You Rather" questions, fostering greater community involvement and creativity.
Enhanced Analytics: Providing users with insights into voting trends and patterns, enriching the discussion and understanding of community preferences.
Multimedia Integration: Exploring the incorporation of images or GIFs to accompany questions, adding a visual element to the dilemmas and enhancing the overall user experience.
Embarking on this solo endeavor not only expanded my technical skill set but also deepened my appreciation for the intricacies involved in developing interactive community-driven applications.
Built With
- cli
- devvit
- devvit's-react-like-ui-framework
- devvit-playground
- devvit/kit
- json
- reddit's-developer-platform-(devvit)
- redis-backed-storage
- redis-backed-storage-provided-by-devvit
- typescript
- yaml
Log in or sign up for Devpost to join the conversation.