DEV Community

Cover image for Real Time "Truth Dare & Stare" game with video and audio chat functionality
Ishan Mishra
Ishan Mishra

Posted on

Real Time "Truth Dare & Stare" game with video and audio chat functionality

Link to the game

Game Teaser

1. Overview

Truth Dare & Stare is a Web Application where users can play the famous Truth Dare and Stare game with video and audio chat with their friends. Due to corona and lock down in many countries we are facing a serious mental health issues, specially the students who at this time enjoy the summer vacations with their friends are locked inside their houses. And the only thing we can do is to wait for the situation to improve. To contribute towards improving mental health I have made this game so that one can connect with their friends and enjoy, laugh and play with them(spending time with friends is the best way to bring smile).

2. How To Play??

Just create a room and share the code with your friends and ask them to join the room. Other rules and notes and be found once inside the room. Link to the game.

3. Tech Stack Used(MERN)

  1. Front End: front end is made using React and Material-UI for designing components and Framer Motion for animation and Twilio SDK for video chat.
  2. Back End: back end is REST based using NodeJs with Express and MongoDB(mongoose) for database. For logging Log DNA is used.
  3. API'S: I have used Twilio Programmable Video and DataTrack API. Twilio Prorammable video is based on WebRTC and offers three type of rooms(actually four πŸ™„) "go", "peer-to-peer", "group". Among them "go" rooms are free and allow 2 participants at max to connect to a room. In my application I am using "group" room with max participants set to 4. Get more information about twilio programmable video here.
  4. Cloud Service: MongoDB Atlas for databse and heroku for hosting

4. Some Features

Here are some of the features of the APP(Game):

  1. Video and audio chat.
  2. Real time user interface.
  3. Score of a user is stored in database.
  4. While game is going on no other user can join(until the spinning is completed or someone cancelled the game by pressing "Cancel" button).
  5. Maximum 4 participants can join at a time.
  6. WebRTC based.

5. Conclusion

Since twilio programmable video's "group room" costs around $0.004 per participant minute, I may need to fall back to "go" rooms(max 2 participants only) in future, so dont miss the chance to play with your friends πŸ™‚πŸ™‚πŸ™‚. And comment about your experience whether you enjoyed it or not, do let me know so that I can make it better, Its just the starting.
Stay Home Stay Safe


[1]: Twilio Programmable Video

Discussion (0)