I’m already working again in the project after a loooong pause, but with renewed strength. I’ve mounted the Helvetios boardgame in a trainer that I made some time ago: a briefcase with a RaspberryPi, an LCD screen, some batteries and a power supply system. This way I can develop the software to control the boardgame without connecting a computer. The briefcase project can be checked in my other projects.

This program will manage the communication with the boardgame and to work as an interface between the player and virtual ‘Game Master’. This Game Master will be the code that will guide the player in the actions to take in each game phase (move, defend, attack, collect, mine, trade, etc…) and will show the consequence of these actions. That will be done using a screen where it will show the options of each phase and also in the board by illuminating the cells affected by the range, direction or target selected by the action. The player also could select the action with the selection, accept and cancel buttons, and has a navigation panel with 6 buttons to select the range or direction of this action. A simplified version of the interface will look like this:

Right now this program only communicates by USB with the boardgame, being able to control the color of the cells and read if there is a piece in any cell. It will also manage the flow of the game between various players and decide the result of the selected actions of each player based in some prearranged rules, assigning by the parameters of each piece or player as speed, energy, strength, range, shield, load capacity, goods pricing, etc…
It is intended that all text, actions and rules are programmable and editable externally to the code, so that the games can be fully adapted to a story and turn the board into a collaborative playground or battle as set in the configuration by the user without programming knowledge. This way we can set up multiple games on each board, totally changing the story and the objectives of the game, being able to be a game of asteroid mining, resource gathering, tank battles, ships, boats, soldiers, orcs, space marines…, or simply abstract logic games or puzzles. Everything is up to my ability to program the game logic and the editing system of menus, phases and rules.
The code of this application uses the HidAPI library to communicate with the board, with a more than acceptable speed for the intended application. The STM32F103 microcontroller is capable of handling a 12Mbits FS USB connection, but there is a lot of overhead in the USB protocol and the effective speed is considerably lower. However, based on tests it is more than sufficient to transmit a cell status update. The animations will be programmed and executed on the microcontroller side, leaving free the communications for state updates (cell color and animation, piece detection in each cell). This application will be available in my Github, so it can be used by anyone as a base to develop other interfaces or modify it to include other functionalities.
The representation of the interface is made with GTK3, which is light enough to run on any system, as well as the C++ code will also be fast enough without needing much processing power or memory, if it were developed in Python or QT surely the resource consumption would be higher. A simple GTK interface will be developed so that the board can be connected to any Linux computer or embedded system, but the goal is to recreate a hardware interface for each player on the board. That is: various OLED screens of 128×64 pixels, if required a larger one will be used, a button panel for menu and board navigation, a led bar that identifies the turn or status of each player and some leds that identify in which phase of his turn he is:

This way the board is independent of a computer, and using a low-resource embedded system such as the Raspberry Pi Zero 2W would be sufficient to control several of these player interfaces for the same board. And with more advanced development, this embedded system can act as a rival to play solo games, connect to the internet to play with multiple boards and remote games with other players. It would also allow a much more advanced game status interface through a web server and show the development or even to interact with the board from a mobile device with a player interface via web.
In addition to what is described for each player, it is intended to include an NFC reader to identify the tokens (meeples, ships, soldier, etc.) of each player or to read cards. In the manufacture of the tokens, an NFC tag such as the Murata micro tag can be inserted. In this way the token itself can gain skills or change characteristics, and this evolution can be registered in the token itself, being able to use these improvements in following games. It has also been thought to include a small speaker that can generate some sound effects of resolution of the actions (battle won/lost, resource obtained/spent, movement, etc…).
And here is a small demo of the USB communication with the board, all data of color is sent from the app in the raspberry. Sorry for the illumination, it's not easy to record leds with low ambient light:
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.