£10k Hat-Trick

We were asked to help develop a new skill-based game called the £10k Hat-Trick. The game is a take on the pub classics, beer pong, shuffleboard and darts. Completing each round wins the player £10k!

At Solarflare I developed the code that runs the game states on a large screen to guide players through the stages. We partnered with a couple of companies, including Island Marketing, who built the physical tables, and Lucky Shot Entertainment, who came up with the idea and provided business development, marketing, staffing, etc.

First, we had a design phase where we developed the requirements and matched them to the computer hardware, sensors, and software development language, etc. We initially thought it could all run on a Raspberry PI 5 but after some testing, recording two HD webcams while also playing HD video proved too much for it to maintain 30fps. In the end, we went for a mini PC.

Partly because of the PI hardware and partly because I like a challenge, I chose Python as the development language. This turned out to be a good choice for quick, no-build development and vibe coding with lots of libraries for web comms.

The code does a lot behind the scenes, including communicating via a REST API with an online payment and player account management system to initiate gameplay.

Web cameras record both a 180-degree fisheye overview of the gameplay and zoomed-in reaction shots of the players for instant replay. These involve streaming to disk and looped buffer recording, running in separate threads.

Full-screen video and audio playback guides players through the approx. 40 gameplay states.

Status logging of every event and error to screen and disk for debugging and fault tracking. Analytics recording to disk and Google Sheets. Multiple gaming tables across multiple venues. Remote access. Remote power control.

Overall it’s been a really fun project to work on, great seeing the game go live and people playing it. Pushed my vibe coding in new directions, especially all the web API stuff.