Unofficial, TBH

2 minutes

Because I’m a glutton for punishment, I decided doing a massive overhaul of my numenera tools wasn’t enough work and decided to build an implementation of TBH, the fun party game by Cut about guessing how your friends would answer absurd yes/no dilemmas.

I call my implementation Unofficial, TBH, and it was a fun exercise in trying to build a multiplayer game with dynamic, loadable data without using a database, or a dedicated server or in fact anything I had to pay for (in theory, you don’t even need hosting for it and could run the code locally and still connect to other players, but I’ve not tried this).

The application is another Vue.js 3 + Vuetify app, and it makes use of the following external services:

All the multiplayer stuff is done via webrtc data channels, all p2p. I could have still written it all server-authoritative and made the host client the server than co-ordinates everything for everyone, but I ended up deciding to just make the system deterministic and simply have all clients send everyone else their local state mutations. It’s just a fun party game with low-stakes, so trying to make it super reliable or cheating-resistant was not a priority. If you (for some reason) want to play a highly-competitive, high-stakes game of TBH, maybe don’t use my app.

The motivation behind this was two-fold. First of all, I wanted to be able to play TBH with my friends, but most of them are remote and the official TBH app is pretty limited and doesn’t work on mobile. Secondly, I’ve wanted an excuse to mess around with webrtc, so a simple turn-based party game seemed like a good fit for that.

There are probably more things I can do to the app to improve it - the biggest outstanding issue is that there is no real support for rejoining a game if you leave it (network disconnect/tab close/etc) nor is there any support for the game working at all if anyone drops from it (you get stuck waiting for a player that will/can never play again). If you’re interested in the code, it is up on github.

Anyway, I hope you enjoy it!

comments powered by Disqus