I was inspired by Ukrainian TV show where 2 comedians watch funny performances and try not to laugh. I also wanted to implement something that uses AI in a "secure" way. I mean that there are no centralised servers and Machine Learning algorithms work directly in users' browsers. I think it's very cool and promising technology and it fits to decentralised ideology. At the same time it's funny and innovative, that inspired me as well :)
What it does
It is a game, where you watch funny videos and try not to laugh. The less you laugh - the more scores you get. The game has 9 levels with different videos. To go to the next level you need to start all the previous levels before. After level selection, AI starts loading, when AI is ready - video is starting. Every 200ms the AI algorithm analyses your face and its expressions, if you are smiling - level scores are decreased, if not they are increased. If AI algorithm isn't able to find your face it automatically stops the video. You can "complete level" at any moment when you think you have enough scores, you also can go back without saving the scores. The app also has a dark mode ;)
How I built it
It is built with Vue.js. For nice designs I used Material Design library. I have used faceapi.js for AI emotions analyser. I have also made a huge research of WebRTC protocol (it was used to get video from web-camera, I think about implementing a video chat with this game in the future)
Challenges I ran into
I've already had some experience with Blockstack apps development so I had almost no problem with the Blockstack part. The biggest challenge at the beginning was finding the tool which allows to analyze face expressions in browser withoud sending data anywhere. I am not a designer, so creating something nice (in my opinion) is always very challenging for me, I've spent much time to create the app layout and select colors, images, fonts etc. I have also spent time on understanding WebRTC protocol.
Accomplishments that I'm proud of
I am proud of the fact that the app is completed and ready to use.
What I learned
I've learned how to use faceapi library, how WebRTC protocol works, how to create CSS animations and some other minor things.
What's next for TryNotToLaugh.online
Get users feedback, add more gamification elements (more levels, more rewards, mechanism to compete with friends (probably P2P video chat for being able to compete with friends online at the same time with the same videos, I already know a lot about WebRTC, so I think I would be able to implement a p2p video chat on Blockstack)