Role Roulette: Project Story

Inspiration

The inspiration for Role Roulette came from the idea of identity and perspective. We wanted to explore how conversations and connections can change when people assume different digital personas. The concept was partly inspired by role-playing games, social experiments, and the anonymity of online interactions, where the way you present yourself can completely alter communication dynamics.

We also wanted to create a fun yet introspective digital space where users could experience empathy, creativity, and unpredictability by stepping into someone else’s shoes—even if just virtually.

What We Built

Role Roulette is a real-time chat application where each user is assigned a unique digital identity, complete with a name, avatar, profession, hobbies, quirks, secrets, and backgrounds. The identities are randomly generated, allowing for endless variety in user interactions.

Key features include:

  • Identity Generation: Randomized traits, avatars, and a 24-hour lifespan for each identity.
  • Real-time Chat: Powered by Socket.IO, enabling instant messaging among users.
  • Bot Integration: A contextual AI bot responds with messages that stimulate conversation and interaction, making the chat lively and dynamic.
  • User Tracking: Active users and identity statuses are managed in real-time.
  • Typing Indicators & Notifications: Users see who is typing and get notified when others join or leave the chat.

The app is built with:

  • Frontend: React, Tailwind CSS
  • Backend: Node.js, Express, Socket.IO
  • Database/Storage: JSON files for traits data (for simplicity)

Challenges

  1. Identity Management: Ensuring each identity is unique, has traits that make sense together, and expires after 24 hours without breaking active conversations.
  2. Bot Conversations: Creating a bot that responds naturally to a wide range of messages while maintaining a single coherent identity in chat.
  3. Real-Time Updates: Keeping user lists, identity expirations, and typing notifications synchronized across all connected clients.
  4. User Engagement: Making the system fun and unpredictable, yet preventing the bot from dominating the conversation.
  5. Scalability: Handling multiple users and chat messages efficiently while avoiding duplicated or delayed bot responses.

What We Learned

  • Socket.IO & Real-Time Communication: Implementing a robust real-time chat system with user join/leave events, typing indicators, and message broadcasting.
  • Dynamic Identity Systems: How to programmatically generate and manage identities with expiration timers.
  • Bot Design: Crafting a contextual bot that responds based on the content of user messages and the tone of the conversation.
  • State Management: Synchronizing frontend and backend states effectively, including managing multiple users and updating identity information in real-time.
  • Problem Solving Under Constraints: Managing edge cases like identity expiration during active chats, and avoiding multiple bot messages cluttering the conversation.

Reflection

Role Roulette taught us how a combination of randomized identity systems and AI-driven interactions can create unpredictable yet engaging social experiences. It challenged us to think about identity, perspective, and human interaction in a digital space, while strengthening our skills in full-stack development, real-time communication, and AI-based contextual responses.


Share this project:

Updates