{"id":1554,"date":"2026-03-01T15:55:00","date_gmt":"2026-03-01T15:55:00","guid":{"rendered":"https:\/\/stuartcupit.com\/wordpress\/?p=1554"},"modified":"2026-08-29T22:06:47","modified_gmt":"2026-08-29T22:06:47","slug":"10k-hat-trick","status":"publish","type":"post","link":"https:\/\/stuartcupit.com\/wordpress\/?p=1554","title":{"rendered":"\u00a310k Hat-Trick"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We were asked to help develop a new skill-based game called the <a href=\"https:\/\/10khat-trick.com\/\">\u00a310k Hat-Trick<\/a>. The game is a take on the pub classics, beer pong, shuffleboard and darts. Completing each round wins the player \u00a310k! <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At <a href=\"https:\/\/solarflarestudio.co.uk\/\">Solarflare <\/a>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 <a href=\"https:\/\/www.islandmarketing.co.uk\/\">Island Marketing<\/a>, who built the physical tables, and <a href=\"https:\/\/www.linkedin.com\/company\/lucky-shot-entertainment\/\">Lucky Shot Entertainment<\/a>, who came up with the idea and provided business development, marketing, staffing, etc. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Full-screen video and audio playback guides players through the approx. 40 gameplay states. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Overall it&#8217;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. <\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"2160\" style=\"aspect-ratio: 3840 \/ 2160;\" width=\"3840\" controls src=\"https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Hattrick-Case-Study-Video5.mp4\"><\/video><\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1153\" height=\"2048\" data-id=\"1562\" src=\"https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Photo-2026-03-21-15-05-29_Samsung_S25Plus-1153x2048.jpg\" alt=\"\" class=\"wp-image-1562\" srcset=\"https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Photo-2026-03-21-15-05-29_Samsung_S25Plus-1153x2048.jpg 1153w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Photo-2026-03-21-15-05-29_Samsung_S25Plus-225x400.jpg 225w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Photo-2026-03-21-15-05-29_Samsung_S25Plus-768x1364.jpg 768w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Photo-2026-03-21-15-05-29_Samsung_S25Plus-865x1536.jpg 865w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Photo-2026-03-21-15-05-29_Samsung_S25Plus-scaled.jpg 1441w\" sizes=\"auto, (max-width: 1153px) 100vw, 1153px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1208\" height=\"2048\" data-id=\"1561\" src=\"https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-08-29-230007-1208x2048.png\" alt=\"\" class=\"wp-image-1561\" srcset=\"https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-08-29-230007-1208x2048.png 1208w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-08-29-230007-236x400.png 236w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-08-29-230007-768x1302.png 768w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-08-29-230007-906x1536.png 906w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/Screenshot-2026-08-29-230007.png 1230w\" sizes=\"auto, (max-width: 1208px) 100vw, 1208px\" \/><\/figure>\n<\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2049\" height=\"1135\" src=\"https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/image-2049x1135.png\" alt=\"\" class=\"wp-image-1563\" srcset=\"https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/image-2049x1135.png 2049w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/image-400x222.png 400w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/image-768x425.png 768w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/image-1536x851.png 1536w, https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/image-2048x1134.png 2048w\" sizes=\"auto, (max-width: 2049px) 100vw, 2049px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1280\" style=\"aspect-ratio: 720 \/ 1280;\" width=\"720\" controls src=\"https:\/\/stuartcupit.com\/wordpress\/wp-content\/uploads\/2026\/03\/10000-is-up-for-grabs\u2026-but-only-if-you-hit-the-Hat-Trick-We-headed-down-to-thepostboxsports.mp4\"><\/video><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>We were asked to help develop a new skill-based game called the \u00a310k Hat-Trick. The game is a take on the pub classics, beer pong, shuffleboard and darts. Completing each round wins the player \u00a310k! At Solarflare I developed the code that runs the game states on a large screen to guide players through the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1555,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,5],"tags":[],"class_list":["post-1554","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interactive-media","category-programming"],"_links":{"self":[{"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1554"}],"version-history":[{"count":4,"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1554\/revisions"}],"predecessor-version":[{"id":1567,"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1554\/revisions\/1567"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/1555"}],"wp:attachment":[{"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stuartcupit.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}