Inspiration
Our inspiration comes from MLH's Coach Surya, who suggested this idea of a virtual die roller in New Year New Hacks last weekend while demoing our project on Livestream. So this was indeed a wonderful opportunity for us to try that out since the theme matched that idea perfectly. We decided to try our version of Dice chess by incorporating real dice that can be rolled virtually and simultaneously move chess pieces to make the game more challenging and interesting to be played with friends.
What it does
So our hack is a website where you can play a game of Dice Chess. You can only move the piece that relates to the number on the rolled dice. So we used a Raspberry Pi to create a die roller that you can simultaneously share the camera stream onto our website, so you can see the die being rolled and decide upon your next move. This will make chess more interesting and challenging. A flask server listens for requests from the website and does a die roll and this can be viewed from the stream.
How we built it
We used a raspberry pi and hooked up an SG-90 servo motor to create a die roller. Then used the motion package to stream the camera stream over ngrok and showed it on our website. We used chessboard.js & chess.js libraries to implement the chessboard and the logic.
Challenges we ran into
- Streaming the camera over the internet was challenging until we found a motion package
- Designing the roller was a bit challenging at first.
- Reading the docs and implementing a chessboard.
Accomplishments that we're proud of
- Created an actual die roller from household items and a Pi.
- Successfully created something reading documentation.
- Of course, completing the hack as planned.
What we learned
- How to use ngrok and port forwarding.
- Using chess.js and chessboard.js
What's next for Dice Chess
- Convert this into a p2p application so a game can be played online between peers (we tried but failed in doing so for this hackathon).
- Use an image recognition model to analyze the dice and detect the output and at the same time lock out all other illegal moves.
- UI Improvements.
- Add Voice Recognition to automate the play with your voice



Log in or sign up for Devpost to join the conversation.