We have mostly finished a new board game for the touch table. The game is inspired by Power Grid, but is intended only for use on our own table and will not be for sale.
I am pretty happy with the result. The game plays very fast since you don’t have to worry about setting up, distributing paper money and manipulating the cards. In the original board game, we often needed ‘thinking money’ that we could arrange in piles representing planned expenses. To meet this need in the electronic version, we included a calculator in each player’s area. Hopefully this will be adequate.
We used the same architecture that we used for Hansa Teutonica. The idea is to have a C++ model that handles the game logic, and all model changes are done with moves. Moves can save/load and do/undo themselves. The GUI is all torque script and is mostly just a dumb canvas that the model controls by calling functions to move around GUI elements and highlight areas for user interaction. User input is returned to the model via a callback written as a C++11 anonymous function.
The architecture continued to serve us well for this game and we made a couple of improvements:
First of all, we made more things into a move. In Hansa, the game setup was separate and it required extra code and work to handle loading a game and getting it setup the same way. In the new game, all game setup is a move that sets up both the model and the GUI when it is executed.
Second, all the model enums were exported to the script so that we didn’t have to define them in two places.
Third, the GUI animation was designed to be instantaneously executable. So, when loading a game, all the moves can happen at once without messing up the GUI or animations.
Finally, this game made full use of torque’s ability to re-load scripts while the program was running. I saved a huge amount of time during development of the GUI code because I could make a code change, hit F5 and have that code change re-loaded and live. Between that and all the moves being undo-able, it was extremely easy to find a bug, fix the bug, rewind the move and test the fix. All without having to re-build or even re-start the game.
There are still a LOT of improvements that could be made to the interface. It could be a lot prettier and more sounds and voice prompts would make it more enjoyable and intuitive. It could also use a computer player. But since the actions of the players strongly effects each other, it is important for any AI to play well.