Digitally enhanced boardgame - Part 2: Fiducial markers

Digitally enhanced boardgame - Part 2: Fiducial markers
Photo by Melissa Keizer / Unsplash

Link to Part 1:

Digitally enhanced boardgame - Part 1: The dungeon tiles
Welcome to this blog post series about a dungeon boardgame enhanced with some digital magic. What kind of game? Something like a dungeon crawler :) The dungeon I want the dungeon to be random, which is not too hard to achieve procedurally, but how will the players be able to see

How will the digital game interact with the real-world boardgame?

Playing on a field generated by the game would be possible through something like a table with a build-in monitor or a projector, both of which are quite expensive.

I opted for a solution where the playing field is made up of cardboard tiles that can be placed like described in Part 1.

Next up I needed a solution that lets the game know where the tiles and players are on the playing field. After some searching I came across something called fiducial markers. These are square-shaped patterns that can be detected by a camera. There are a lot of variations so I chose the one where there was a library available in javascript, ArUco.

Let the testing begin!

To get a better understanding of how big the markers need to be, I printed some out between 15mm and 35mm in size and tried out different distances:

aruco markers at 50cm distance from the camera

As expected the smallest marker cannot be recognized at some point

Distance \ Marker Size 15mm 20mm 25mm 30mm 35mm
20cm - 40cm
50cm - 60cm
70cm - 80cm

Other things that have impact on the detection

Lighting:

markers at 70cm distance, bad lighting
markers at 70cm distance, medium lighting
markers at 70cm distance, light directly above

Focus

out of focus
almost focused
focused

Angle

20mm grid, top down perspective
20mm grid, at an angle

Resolution

all 20mm markers detected @1080p

Conclusion

Having the resolution at 1080p means that the detection is more computation-intensive, but
a) it yields the best results
b) we do not need hyper-realtime-detection of the markers, it's a boardgame.

Having the markers at 20mm seems the best size, not too small, not too big.

Before starting the game, the camera focus should be adjusted manually and the camera should be placed as top-down as possible.

Digitally enhanced boardgame - Part 3: Perspective
Link to Part 2 Digitally enhanced boardgame - Part 2: Fiducial markersLink to Part 1: Digitally enhanced boardgame - Part 1: The dungeon tilesWelcome to this blog post series about a dungeon boardgame enhanced with some digital magic. What kind of game? Something like a dungeon crawler :) The dunge…