Inspiration

Developers spend a lot of time writing "serious" apps, and in order to learn Quarkus I wanted to opt for something a little more light-hearted! I'd played similar games in the past, but never seen something completely web-based - they were either "offline" games, or required separate downloads / installs.

What it does

Tosh is a party game similar to Balderdash, Fibbage, and Fictionary. Up to 6 players are given up to 10 questions, and have to provide answers for each with the aim of fooling their opponents. Those options, along with the correct answer, are all displayed to the players, and they have to guess the correct answer. Points are given both for guessing the correct answer, as well as fooling people with your fake answer!

How I built it

Quarkus is used on the backend - there's many features I like here, but the development mode with live reload made iterating much, much quicker than I'm traditionally used to with other frameworks like Spring. The built-in websocket support was also very easy to use. The data layer is all Redis, which keeps access fast and means all data can easily be set to auto-expire - there's no need to keep it around after the quiz expires! The frontend is just vanilla HTML/CSS/JS, and the whole lot is packaged up into a Docker image & designed to be deployed & scaled on Kubernetes.

Challenges I ran into

Finding a decent, open dataset for this type of task was the biggest challenge. I ended up using OpenTDB, the open trivia database, but it has its challenges - the questions are designed as multiple choice, and so not all are suitable (some keywords had to be filtered.)

Accomplishments that I'm proud of

Tosh may just seem like a trivial party game - and in many ways it is, it's designed to be simple to play. However, under the hood the architecture means it's a fast, resource-efficient, and fault tolerant system that can easily & automatically scale to any number of users. For a game that could feasibly be played by thousands of groups simultaneously at some times, and just a handful at others, that's a very important property to have.

What I learned

Learning Quarkus was my main goal with this project. I'm now confident designing, developing & deploying a project with Quarkus, as well as some of its non-core functionality such as websocket support.

What's next for Tosh

There's always more to do! The frontend could use some work generally - I'm not a designer or frontend developer, so there's definitely room for improvement on both those fronts. I'd also like to add more features to the app itself - perhaps multiple rounds, and perhaps a "geography" based round where you have to guess (and fool others) at the name of a random place on a map.

Share this project:

Updates