Board Game Table With End Turn Buttons

by MrSmartyPints in Circuits > Raspberry Pi

5252 Views, 108 Favorites, 0 Comments

Board Game Table With End Turn Buttons

PXL_20220517_044122774.jpg

The Problem:


"Whose turn is it?"

"Well, I've already moved my guy so it can't be me"

"Oh, I thought we were on a new round so I already went!"

"You can't go, we haven't reset the board for the round yet!"

"Ok, so whose turn is it then? And who's the first player anyway?"


I love board games, and I love using them as an excuse to get together with friends I don't see enough. As we play games and catch up with each other the inevitable happens. Someone starts telling an enthralling story about one thing or another, and by the time they're done we've lost track of the state of the game. We might forget whose turn it is, what upkeep actions have been completed, or who has the first player token.


The Solution:

Over the past 2 years of COVID lockdowns and uncertainty, my friends and I started playing our board games online via Table Top Simulator. One thing I came to appreciate with TTS, is the notification that alerts you when it's your turn and the first/current player indicators in the top right corner of the screen. This meant that no matter how distracted any player became we always had this info at hand.

Now that the world has (hopefully) returned to normal(ish) and we've returned to playing games in person I realized just how much I missed this feature of TTS. So, I started ordering parts, building, and programming to create a real world equivalent of this handy TTS feature.

The general idea:

  • Every player has a button in front of them
  • A players button will flash when it's their turn
  • When the active player presses their button, it will stop flashing and the player to their left's button will begin to flash.


The Scope Creep:

This basic solution seemed to work at first, but through some prototyping, testing, and some good old fashioned over thinking, I realized it needs to be more complicated than that, at least if you want to play anything more complicated than a game of Uno or Catan.

Some games like Who goes There do not have have a set turn order, but it's still important to track who has and has not yet gone, and games like Nemesis or Terraforming Mars allow players to "pass" when they are out of actions/money leaving the rest of the players to continue passing turns to the left.

I initially just tried giving all players a "end turn" and a "pass turn" button, but this became confusing to use. So, in the end I wrote custom game scripts for each of the games we play. The system even goes as far as to show the instructions for upkeep phases which we've found super handy to have.

The system is over engineered and more than I intended to build, but in the end it's a super helpful addition to our game nights.



Supplies

UIO_side.jpg
goldleafRGB[1].jpg

Electronics

  • 12x GoldLeaf RGB Illuminated Pushbuttons from Ultimarc link
  • I-PAC Ultimate I/O control board from Ultimarc link
  • I-PAC Ultimate I/O control board mounting kit from Ultimarc link
  • Raspberry Pi 2
  • Monitor link
  • Wifi Client bridge link

I just happened to have a Raspberry Pi 2, this specific tiny monitor, and a WIFI Client Bridge sitting in a bin of parts. Any tv/monitor will fit the bill here and I'd recommend a newer Pi with built in WIFI if you can. The WIFI bridge is only required because I was using an older Pi. You could also use an old Pi and just plug the table into your network when you want to access it.


Materials

  • 4x8 sheet of 3/4" plywood
  • 2x 1x3 boards
  • 2x 2x4 boards
  • Gel wood stain
  • A cheap Costco folding table
  • Cupholders link
  • L brackets
  • Corner brackets
  • Wood glue
  • Velcro Tape
  • Cable Tie Mounts link
  • Zip Ties
  • RJ45 Breakouts link

I already had a number of 2x4 boards sitting in my garage from a demo project a few months back as well as the table and wood stain. I'd recommend using whatever stain you have handy or buy a can of something you like. I used gel just because it's what I had. The table could also be a different size as long as it fits under the plywood and leaves a bit of room along the edge for the buttons/cupholders/electronics


Tools

  • Soldering Iron
  • Hole Saw (3.25" for cupholders, 1.25" for buttons)
  • Drill and driver, various bits and screwdrivers
  • Wire strippers
  • Glue gun

And probably a lot of other small bits and bobs. Unfortunately I opted to create this Instructable after I finished most of the work so I've likely lost track of everything used. I know at one point I had nearly my entire set of tools laid out on my floor under the table.

Design

2022-05-18 10_16_22-Window.png
2022-05-18 10_15_52-Window.png

Because I didn't yet know what exactly I wanted to build, and because wood is too expensive to screw this up on the first go, I opted to design the table in Sketchup. I had never used any kind of drafting software before, but after a half hour on YouTube I knew enough to sketch out a plan.

I wasn't confident enough in my carpentry skills to build a full blown table from scratch (also, again, wood prices) so I decided to build a cover I could place on top of the cheap folding table we were already using for board games.

When I finished the build I was very happy with the software and electronics, but the overall structure of the table is a little wobbly. If you jump to the final step of this Instructable you'll see that I'm now planning to build a base that I can attach to this cover to give it more stability and storage.

Cut Plywood and Align With Folding Table

PXL_20220326_211857035.jpg
PXL_20220327_201341746.jpg

I had the guy at Lowes cut the plywood down to 4' X 6' 8" based on the plans I had drawn up. This was so that the table would fit neatly in the center of it and so that the table itself would fit in the space I had planned for it.

If you're working with a sheet of plywood I'd recommend getting the store to cut it for you instead of tackling it with a skill saw.

Then, I simply placed the table on the sheet, aligned it with the middle and arbitrarily screwed the 2X4s around it making the table as snug as I could.

Build the Table Skirt

PXL_20220326_233641752.jpg
PXL_20220327_232140416.jpg

Back upstairs to the garage with the cover, I cut the 1X3 boards to length and mitered the edges.

I then glued the edges together and fastened the whole mess together with the L and corner brackets. I waited a day then gave the entire skirt a good sanding, especially on the miters. With enough wood glue in between them they became extremely sturdy and it meant that I could round off the miters for a smooth finish.

Stain, Play Some Games, Drill Holes, Stain Again, Drill More Holes, Stain Again

PXL_20220329_021628373.jpg
277361236_394603228780220_770027923519197930_n (1).jpg
PXL_20220410_224257798.jpg
PXL_20220424_001249203.jpg

Next up, indecisive staining.

I put on one coat of a gel stain I had a can of kicking around and then the next day I caught COVID and found myself isolating in the basement for 5 days. I didn't feel up to more construction, but I DID play about 40 games of solo Terraforming Mars to keep my sanity. I was already extremely happy with having a larger table surface to play on even without the electronics.

Once recovered, I drilled four sets of holes for the cup holders, then I did a second coat, then I realized I wanted more cup holders, so I drilled more holes and then promptly ran out of stain.

I bought a second can of the same stuff and touched up the remaining holes.

The cup holders require a 3.25" hole saw, but the closest size I could borrow from someone was a 3.5". This works, but the coholders go in really loose, check out my janky solution in the next step.

Install the Buttons and Cupholders

PXL_20220424_001251202.jpg
PXL_20220519_012611847.MP.jpg
PXL_20220519_012819972.jpg
PXL_20220424_001244580.jpg

For this step I just slapped all the buttons and cupholders in the holes I drilled in the previous step. The cupholders were, as expected, a little loose. After trying a few different things to make them more snug, I finally discovered that three equidistant cable mounts placed on the cup holders near the top (from the underside) will tighten them up nicely.

It's not the most elegant solution, but it works and it's all hidden under the table.

Install the Raspberry Pi and Other Components

PXL_20220424_001300097.jpg
PXL_20220519_012644435.MP.jpg
PXL_20220519_012745306.jpg
PXL_20220519_012716218.jpg
PXL_20220519_012706596.jpg

Underneath the table I mounted the Raspberry Pi and WIFI bridge, the Ultimarc control board, and all the associated cabling. I chose to mount all of the major components next to the seat at the table I intended to sit at regularly. I figured this would prevent any other players from accidently bumping the gear with their knees.

The Raspberry Pi is running Ubuntu server, but any OS should do. As the computer will largely be headless and users will only interact with the software I write for it, I didn't see a need for a desktop environment. I can SSH into the machine whenever I need and if push comes to shove I can always attach a screen and plug in a keyboard. I happened to have a case laying around for this particular Pi, so I was able to mount it easily to the underside of the plywood table.

Attached to the Pi I have a little TP-link WIFI bridge (again, from a bin of parts I already had). This allows the Pi, which doesn't have WIFI, to connect to my WIFI network. Alternatively I could have ran an ethernet cable, but I had this bridge anyway so why not use it. If anyone is making their own I would just suggest using a newer Pi with onboard WIFI. The bridge doesn't have any mounting hardware, but a little bit of Velcro tape fixed that.

The Ultimarc control board simply plugs into a USB port on the Pi. The control board translates arcade button presses into keystrokes that the Pi can understand and turns on/off the LEDS in the arcade buttons based on messages sent from the Pi. It also comes with a bunch of handy Windows utilities to configure and test the board. Mounting the Ultimarc board next to the Pi was a breeze with the mounting feet I bought along with it.

In addition, I added a large 110V Switch (again, from that magic bucket of parts), a few USB power bricks to run the Pi, control board, and WIFI bridge, and a bunch of cable tie mounts/zip ties to keep the cables nice and tidy.


Make the Buttons Work

PXL_20220424_030207562.jpg
PXL_20220426_025717257.jpg
PXL_20220425_011953562.MP.jpg
PXL_20220519_012808789.jpg
PXL_20220519_012652112.MP.jpg

Each button under the table has a total of 6 leads coming off of it, 4 for the RGB LEDs, and 2 for the actual button connections. Knowing I'd be running a ton of cable, I opted to use ethernet cables for the RGB LEDs in the buttons. Each player has two buttons next to their cup holder, so a single ethernet cable will hold all the RGB signal cables.

I purchased some ethernet breakouts made for wall jacks and attached the ends to the leads coming off of the control board. Conveniently the control board runs a demo program when it's plugged in which makes testing the lights easy to do. I had a few bad connections at the start and this made finding them a breeze.

For the remaining button connections I ran two additional lines per button for a total of 72 runs of cable, woof. The control board allows for X-input or keyboard emulation. To keep things simple I set it to keyboard emulation and set a different keystroke for each button, at this point the whole table acts as a giant 12 button keyboard.

Tying It Together With Node

2022-05-18 20_11_18-board-game-table - Visual Studio Code.png
2022-05-18 20_13_51-board-game-table - Visual Studio Code.png
2022-05-18 20_12_35-board-game-table - Visual Studio Code.png
2022-05-18 20_14_40-board-game-table - Visual Studio Code.png

Now that all the leads are tied back to the control board and are registering keypresses, the program to control what lights up when should be easy. The idea was to light up one of the buttons, then when that button is pressed, light up the button to the left and so on. Unfortunately, it's not that easy.

What about games where turn order changes based on the game state? Or what about games where players can pass when they've done all the actions they can? I started hardcoding a unique set of rules per game, but after doing a few I realized most games seem to be made of the same phases. There might be more out there, but based on the games I own these phases covered all the cases I came across:

  • Upkeep: Set up for the next round, give players money, reset game components, etc. The "admin player" presses their button to tell the table when this is done. Most games have some kind of upkeep even if it's only at the very beginning.
  • Infinite Round: The first player's button lights up and they take their turn, then they press their button when they are done. When they do, the next player's button lights up and they take their turn. This continues indefinitely. This phase is used for simple games like Catan, Monopoly, card games, etc.
  • Finite round: This phase is the same is an infinite round except each player also has a second button they can press to "pass". When a player passes they are taken out of the rotation and they will be skipped over. When all players have passed this phase ends. This phase is used in games like Terraforming Mars, Nemesis, etc.
  • One shot: All player's buttons light up, then they take their turns in any order. Each time a player takes their turn their button goes out. Once all players have taken a single turn (and pressed their buttons) the phase ends. This phase is good when turn order is variable. This phase is used in games like Brass Birmingham, Who Goes There, Power Grid, etc.
  • One shot with turn order: This phase is essentially a finite round, but without a pass button. The first player takes a turn, then the next player, until all players have had a single turn, then the phase ends. The only game I've used this in so far is Arkham Horror.

In addition, sometimes the phases used change based on the number of players or the number of rounds that have passed. So, that's an extra bit of logic that needs to be coded. In the end I wrote a parser that would read through config files for each game and then handle the sequence of phases of the game.

Here's the config for a "General" game that can be used for simple games like cards, or Catan:

 "sequence": [
        {"mode": "infinite-round"}
 ]

And here's the configuration for Brass Birmingham which is considerably more complicated.

  • Instructions are shown once at the beginning of the game
  • Then, specific round instructions are shown on the first round (different instructions are shown at the start of all other rounds)
  • Then based on the number of players, special instructions are shown half way through the game (the end of canal era)
  • Then based on the number of players the game will end after a certain number of players
 "sequence": [

        {"only_on_rounds": [1], "mode": "upkeep", "image": "setup_instructions.png",},

        {"only_on_rounds" : [1], "mode": "one-shot", "image": "actions_first_turn.png"},
        {"not_on_rounds" : [1],  "mode": "one-shot", "image": "actions.png"},
        
        {"only_with_player_counts": [4], "only_on_rounds": [8], "mode": "upkeep", "image": "end-of-canal.png"},
        {"only_with_player_counts": [3], "only_on_rounds": [9], "mode": "upkeep", "image": "end-of-canal.png"},
        {"only_with_player_counts": [2], "only_on_rounds": [10], "mode": "upkeep", "image": "end-of-canal.png"},

        {"only_with_player_counts": [4], "only_on_rounds": [16], "mode": "end", "image": "end.png"},
        {"only_with_player_counts": [3], "only_on_rounds": [18], "mode": "end", "image": "end.png"},
        {"only_with_player_counts": [2], "only_on_rounds": [20], "mode": "end",  "image": "end.png"}

    ]


There are also special phases to move the first player token, end the game, and a few other edge cases. All of the code can be found here: https://gitlab.com/jason.watson/board-game-table

Adding the Screen

idle.png
2022-05-18 20_02_40-select-who-goes-there.psd @ 300% (select-instructions, RGB_8) _.png
add-players.png
2022-05-18 20_03_29-who-goes-there-upkeep.png @ 300% (hit-p1b2-footer, RGB_8#) _.png
2022-05-18 20_01_35-who-goes-there-round.psd @ 300% (footer-b1-end-turn, RGB_8) _.png
279564468_323319146543367_1612057551054525177_n.jpg

You may have noticed in the previous section that there were a lot of images being thrown around in the game config files. About the same time I realized I had to write a different configuration for each game, I realized I could also show specific instructions for each game.

To accomplish this I attached a screen, made a buttload of images in photoshop, and figured out how to load them into the Raspberry Pi framebuffer to get them to display when they need to. This allowed me to show splash screens, instructions for joining the game, and instructions for each phase of a given game.

This has the added benefit of reminding new (or forgetful) players of the rules of a game and it does so in a context sensitive way.

Game Time

281293587_573869207592544_6077575505975743148_n.jpg
279849494_303204388667851_5036773925456937213_n.jpg
278463745_419431593330620_3158349838351912230_n.jpg
PXL_20220517_044148429.jpg
PXL_20220708_042851175.jpg

With that, the table was ready to go!


Overall it's a hit with the gaming group. It keeps track of player's turns and it reminds us of the rules when we're knee deep in a table spanning multi-hour board game, oh, and the neoprene mat and cup holders are just the icing on the cake :)

More Scope Creep

PXL_20220726_202527211.jpg
Jay's Board Game Table - Who Goes There Demo
2022-05-18 10_41_01-Window.png

But the table could always do more! These last bits are a work in progress at the time of writing, so I've left them for the end.

For starters, I've recently added a much larger screen and I've written a React frontend to display the game state. This allows for more info than just some simple images can provide. The big screen shows whose turn it is (mirroring what's going on with the buttons), how many turns have passed, and the instructions for the round.

The big screen can also show videos, AND, with a bit of careful timing theses videos can be synced up to my smart lights and plugs. Check out the YouTube video for a demonstration.

And the last thing pertains to the table itself. After a few months of use the folding table has proven to be a bit too wobbly. I've designed a base with storage for games and greater stability, but I've yet to break ground on the actual construction.


Thanks for reading!