My touch table conversion of Puerto Rico is complete. As usual, I will continue to work on the game, but it is mostly done. There are probably still some bugs to fix and some of the animations should be cleaned up. The game is for two to five players and seems to play quite a bit faster on the table.
Unfortunately the owners of Puerto Rico (Alea), aren’t willing to give me permission to distribute the game. I have also talked to the creator of Tropic Euro, and they have given me permission to make a version of their game. It would take a little work to convert Puerto Rico into Tropic Euro, but then I could release the game.
I have spent about 90 hours working on this game. I wrote the whole project in torque script and ended up with 6682 “raw” lines of code. Here is a comparison of this project to some of our other games
Game | Script | C++ | Other | Total | Hours |
---|---|---|---|---|---|
Yacht | 2218 | 0 | 0 | 2218 | ? |
Power Grid | 3442 | 6017 | 0 | 9459 | ? |
Fire Platoon | 4027 | 4697 | 1115 | 9839 | ? |
Hansa Teutonica | 4891 | 7107 | 0 | 11998 | ? |
Le Havre | 5117 | 0 | 1161 | 6278 | 150 |
Puerto Rico | 6682 | 0 | 0 | 6682 | 90 |
I was able to re-use quite a bit of my Le Havre conventions and some of the code. The Puerto Rico code was easier to write (per-line) than Le Havre was because Puerto Rico needed a lot of code to layout the graphics while Le Havre had more game logic.
There were several things that went well in this project.
- Writing exclusively in script saved time and effort. I missed C++ at times, and I spent some time debugging problems that would never have happened in a strongly typed language. But being able to quickly add data to objects and not having to keep two versions of the game model save a lot of time.
- The dialog system for player interaction worked well. I particularly like how the dialog system allows all the players to think about and play their action at the same time. More about this below.
- The save/load/undo capability saved a lot of testing by allowing me to get the game into the state I needed to develop or test, add or test the new feature, fix code and get right back to that state.
One of the lessons from Le Havre was to encapsulate the member data with access functions. I didn’t follow my own advice in this game, but it didn’t end up biting me too often. I was a bit more careful about always defining the variables in the same place so that I could quickly look up the correct names.
Puerto Rico ended up being a mostly dialog driven game. In the game, one player selects a role and then all the players take the ‘action’ associated with that role. In my version, when a player selects a role, a dialog comes up for all the players to perform their action. Here is what the captain dialog looks like:
The dialog has a ready button that you click after choosing your action. If the first player isn’t done yet, a check appears in the box. If your selection is still valid when it is your turn to act, your pre-selected action is executed and your dialog closes. If an earlier player takes an action that invalidates your selection, your check mark goes away and you have to select a new action.
I think that this dialog system is a big part of why the game plays so much faster than the board game. Even if players wait till their turn to act, they have at least looked at their options and started thinking about it. Having the invalid options grayed out also saves time.
Another time saving feature is that the game summarizes all the information that affects each role in a table next to that role. So instead of having to look around at what all the players have on their boards, the relevant information is collected in one place.
This is the captain table and it shows the state of all the boats, how many of each type of good the players have, how much warehouse space the players have, who has a harbor and wharf.