Do people like, still blog?

Tag Archives: condado

I spent a lot of time this August working on Android stuff. I revived Condado and started working on it some more, instead of my Monopoly Deal port (which is quite a ways off). I fixed some long standing bugs reported by the community and updated some of the infrastructure to use more current APIs. The point of which is to produce a version that can be played on tablets properly without having to duplicate or rewrite the entire UI. It’s a bit of work, worthy of a major version bump, and I’m still not done; but I’ve been putting an hour in every day or two to move it along.

We saw some respite from the hot weather in August, with a week of downright cold teens and low 20 temperatures. Then the heat came roaring back at the end of August. The days have also become shorter, so hopefully the cool temperatures are not that far off.

We finished our Korean course this month as well. We had to do a group presentation/skit which we put together as a video, and then took the final exam. That was pretty easy and I ended up with an A+! But, it honestly wasn’t very difficult to get a very good grade (and yet there were people supremely worried about passing).

This month has been a boring month for hockey. My hockey Twitter feed has been dull and full of non-hockey related news. Free agent signings have been rare, with only several contract extensions. The majority of this is a reaction to the impending CBA nightmare, where it looks like players will be locked out next month.

The other big event in the news was the impending contract situation between the Ontario government and the teachers. But it looks like that will extend into the school year before a resolution is found.


When I was working on Condado last year, I started building an Achievement framework into the game (as well as a couple of achievements). However, I never ended up releasing this functionality because of a silly thing – I didn’t have the chops to draw achievement icons or badges to match each achievement! So that functionality was shelved until I could procure some graphics.

I like the idea of achievements, maybe because I’ve been trying to unlock achievements on my XBOX360 for every game I owned; but if I think about it from a design point of view it makes a lot of sense. Achievements help to:

  1. Encourage users to explore and try new areas which they may ignore (because it’s a more difficult concept/strategy, it wasn’t described in the help/tutorial, or because they don’t have any other incentive to)
  2. Provide additional goals to work towards once the game has been completed or mastered. I think this is particular important for a game which doesn’t have a story.
  3. An opportunity for some puns or fun

For Condado, I wanted to add some achievements where the user would have to think and learn about card combinations, and enter into some more uncommon scenarios. But of course, I could think about it all I wanted yet I couldn’t implement it because I didn’t have any graphics!

Then I realized that I don’t really have to have specific icons. I could just give generic rewards. So I broke up the achievements into difficulty. Easy are the ones that reward the user for learning the game, Medium are the ones which are a bit fun, and Hard are the ones for specific scenarios; and just assigned them to bronze, silver, and gold stars. Here’s what it looks like to receive an achievement:

I also like the idea of knowing that there are secret achievements, but not knowing exactly how to obtain it. I can’t make all the achievements like this because then the user might get discouraged; but I added a couple of secret achievements, with appropriately leading titles, just to spice things up. These are the most enjoyable achievements to make, and here are a couple I like:


When I wrote Condado, I hardcoded the orientation to portrait mode, mostly because it reduced the variables that I had to work with when it came to laying out items on the screen. So for a long time it only worked this way:

Which was perfectly fine when most people have phones, but now there are a lot of tablets out in the world and people end up playing Condado like this:

Which is not so great. Redesigning a layout hasn’t been at the top of my priority for awhile, but I figure it’s time to do it now (along with making things size better on larger devices). I’ve started on splash screen first and really like how it turned out.

(btw some people volunteered to translate Condado in French and German so now you can play in those languages too!)

I’ve been having a problem recently because there are too many buttons on the screen so they don’t fit horizontally. I’ve resorted to make them scroll in a row, which doesn’t look very good. But if I lay them out vertically, they have more than enough space. It almost makes me want to make the default layout landscape!


This July continued the warmest summer I can remember for a long time (but AC lifestyle is still in effect). We started the month by going on a road trip to Pittsburgh with some friends. The original plan was to go to Grove City for shopping (although we just went last Easter) but we ended up spending more time in Pittsburgh (which I had went to in 2007. We visited a lot of the same places as my first trip, but it was fun to go with friends.

After we came back, I felt like I spent most of the month looking at, choosing, and listening to music. I started buying MP3s from Amazon and continuously scour their site due to free credits and sales. I’ve also taken advantage of my Korean course and started listening to KPop. I’m both surprised and disappointed at the quality of KPop, but there’s still a lot of artists and songs to go through.

I’ve also slowly started a project at putting my photos on Picasa. Maggie pointed out to me that you actually get unlimited storage if you upload photos less than 2048px, which means I can use Picasa to solve my problem. The drawback though is 1) I have an incredible amount of photos to go through, 2) Google will automatically notify anyone (via email) if you tag them in a photo. Well these are growing pains hopefully.

Finally, I stopped working on Monopoly Deal and started working on Condado again. I decided to go back to it because I’ve been getting a couple of emails about it, and there have been a couple of bugs that cropped up. Hopefully I will also spend some more time next month and update the UI so that it works better on tablets.


After not working on Condado, my Android port of San Juan, over the summer; I started working on it this month. The game itself is almost feature complete, or at least as much as I want to add to it. The two missing things are: 1) Multiplayer support, and 2) The Events expansion.

Multiplayer is an interesting issue. I don’t want to maintain a server so there isn’t true online multiplayer. Instead, I’m taking a hotseat approach, where there is one device that you pass around to the various players on their turns. It sounds straightforward but in real game play, there is actually a lot of swapping that occurs. Whenever a player picks a role, each player has to act on the role, and sometimes there are buildings that cause the active player to switch for a short period. So while multiplayer “works” I don’t think it’s ideal. I guess it’s a tradeoff; you can have the game in a handheld device and suffer through some usability quirks, or you can carry around the physical cards and boards!

The Events expansion is a bit different than the original and the first (“New Buildings”) expansion. Instead of new err… buildings, there are err… Events. This means that my game engine had to be changed to handle this new type of card in addition to implementing the behaviour. Not an insurmountable task but it didn’t feel as straightforward or easy so I had put if off for awhile.

With those two major features, I’m pretty much done with Condado (and it should hit v1.0.0 finally). I’m kind of on the fence as to whether I want to work on another card/board game, improve my other apps, or just take a break from Android development for awhile.


Through a couple of forum threads, the Android market reviews and email, I’ve received some comments about Condado. I was able to group a couple of them together and solve them:

  • Difficult to swipe across boards on high resolution devices
  • High resolution devices could show a mini view of your opponents board
  • Score text is too small

Plus I was already unhappy with how I put the game scores into a small corner at the edge of the board – although I didn’t really see an alternative because there was not much space left in the UI to put this information. I wanted to put more information there (such as deck and discard information) but had to make some tradeoffs like using acronyms and removing spaces. Basically not a good solution.

I finally solved it by adding a popup. I still have each players’ scores in the bottom right, but now if you touch it, you will get a popup with more detailed information.

I also fit a row of each players’ board on the popup. You can see what types of buildings they have and whether they have produced a good or not. If you want to see what the buildings actually are, there is now a shortcut button to bring the board into view.

It actually looks quite nice, because the squares with rounded corners bring a nice contrast to the slate theme.


San Juan isn’t a simple game. Actually (German) board games in general aren’t that easy to learn because you typically have to go through 10-something pages to learn the game mechanics. It’s not something you can just pick up and play. That fact basically kills the demographic for Condado because my target audience would be (% of people who enjoy German-style board games ) x (% of people who know how to play San Juan) x (% of people who own Android phones) x (% of people who hear about Condado) which would equal to about 50 people in the world.

My success would improve if I could teach people how to play Condado. That’s still a tough task because I don’t think you would want to squint and read 10 8.5×11″ pages on your phone! In the initial versions of Condado, I just included a weblink to a PDF of the rules, and provided a tutorial on how to use the UI. Thereby limiting my audience to people who knew how to play or wanted to read a PDF. That’s maybe 60 people.

I knew the next step was to include the rules in Condado, so I started writing up a more concise version. One good thing about a computerized version of the game is that the user doesn’t have to understand all of the game mechanics, the game will just do it for them. So they just need to know the premise and then learn through experimentation in the game environment. I fit the rules into about a page of words (which still ended up being 8 pages in Android world!) and went about implementing it.

As I was doing this, a thought hit me and I realized that I could make the rules interactive. Just prior to this, I added some functionality where a game could be saved and loaded. By leveraging that functionality, I could let the user play in a custom-built, deterministic scenario to learn the major points of the game. Great idea, I should pat myself on the back for that. And so I implemented it into Condado.

The tutorial is still mostly words that the user has to read through, but at certain points in the tutorial they will jump into the game and be forced to play through several actions. Then at the end of the tutorial, they can continue with the rest of the game if they wish.

I guess it’s just like a tutorial level in *real* games, but it’s cool that I could actually implement it without entirely breaking the game engine.


I’ve started trying to apply genetic algorithms to come up with a better AI to play San Juan. I’m still having trouble modelling the problem but I think I am making progress in my thinking.

The first realization I had was that I was thinking that genetic algorithms were a solution to a dynamic system. Although the training/environment used when evolving the algorithm is dynamic, the algorithm itself isn’t reactive. It will generate a set of rules and hope that they work in whatever situation it is presented with.

I guess that makes sense. Even in a human, evolution has given us tools with constraints. For example, our arm is only flexible in 3 places (wrist, elbow, shoulder) and if we were trying to grip a pole with just our arm, it would be difficult depending how thick the pole is. How well the evolution is is also a function of how many points of variability you are modelling with. The hand is flexible in 20+ different places so it would be much more suited to grip cylindrical objects than an arm.

Of course, the more points of variability, the more generations that need to progress before a solution can be found.

I think this is an important thought, because board and strategy games are a dynamic system. The other players can play things in different orders and interact with each other. It would be too time consuming to try and model all the interactions – and we’re not trying to find a perfect solution – we just need an optimal one that will give a challenging AI.


The first AI I made for my San Juan clone was a random one. It used random functions to determine which cards to discard to build, which cards to build, which factories to produce goods on, etc. Obviously, it wasn’t a very challenging opponent and I wanted to do better.

I looked at some other hobbyist San Juan clones to see how their AI had been written. There was one AI which people thought was challenging, and I found out that the AI had been evolved through genetic algorithms. The difficulty I was having was that there were many different actions (pick roles, build cards, discard cards, produce goods, trade goods, etc) that an AI had to do, and the AI also had to take into consideration the current state of the game such as what they and other players had in play, what they had in their hand, what roles had been called etc. It seemed like a decent AI would be a lot of if-then-else clauses.

As I thought about it more, I was able to simplify the problem greatly. I realized that at any point in the game, you only care about two things:

  1. An ordering of roles you want to call
  2. An ordering of cards that are important to you

(1) is only needed when you pick a role. For example, if you have 13 cards in your hand, you probably will value calling Builder highly, and then Producer, and then finally Trader, Councillor or Prospector (since you don’t need any more cards in your hand). At any given moment (although you only care when you have to pick a role) there is a preferred order given the conditions in the game.

(2) is needed much more often. The concept is that, given a set of cards, there are some I value more highly than others (because I want to build it etc). The ones I don’t value, I am free to use to pay for building or to discard them. By having an order of the cards at any given point in the game, the AI can figure out what they want to build, how to pay for it, whether they should bury a card in their chapel and also consider what role they should pick. The complexity comes because of the number of different cards, and the effect of other cards in play. Some combos are great (i.e. Aquaduct + Well), some combos are useless, and some are counterproductive (Triumphal Arch with no monuments).

By implementing these two things, I was able to create a variety of AIs with different strategies. It can still get quite complex – I haven’t tried making an AI which reacts to (i.e., blocks) another user’s strategies. I’ve also been thinking about evolving an AI, but modelling the problem domain is so foreign to me that I can’t get my head wrapped around it yet.


On Wednesday, I released Condado onto the Android market. Condado is my implementation of the San Juan card game. It’s not done, not even close; but I have been able to get the game engine and associated UI working (and relatively bug free). I also put in a simple AI – it’s not challenging but it knows how to play by the rules. I’ve implemented most of the cards, but there are still a few that need some special UI treatment and I haven’t gotten around to grinding those out.

Once I’m done all the nitty gritty stuff, and fixing the hard-to-debug problems, and polishing the UI to my satisfaction; I can get to the fun part, which is programming (and playing against) a challenging AI. One problem I have is that I haven’t actually played San Juan (although I’ve played Puerto Rico a fair bit so I know some general strategy). Another challenge I have is how to architect the AI so I don’t end up writing a 2000 line if-elseif construct. As I’m thinking about this, I’ve already realized some things which make it easier (for example, is there any reason why you would not want to trade your most valuable good?)


This week I was able to find a couple of board games that I’ve played in Android form, specifically Settlers of Catan and Dominion. That let me to enjoy playing these games on tablet for a few hours at a time. I actually like playing these games single player (i.e., versus the computer) because you can play fast without having to wait for other people to take their turns. Dominion is particularly good because the AI is challenging. Perhaps I’m a newbie at the game, but I’ve only beaten the AI twice in I am guessing 30 games.

These experiences have motivated me to try my hand at making a board game for Android. Of course, I’m not a board game designer so I am going to base it off an existing game – specifically San Juan, the card game version of Puerto Rico. I’ve decided to call it Condado which is a district of San Juan and also means county in Spanish. Fitting I think.

This will take awhile for me to do, especially coming up with a competent AI. But it should be fun. Here’s what it looks like currently:

That’s the welcome screen when you enter the game. The coat of arms is the San Juan coat of arms.

This is the UI to pick a role for your turn. You swipe left and right to see each “card” and the button updates to confirm your selection.

I’m pretty happy with the way these two screens turned out, but I think the rest of the GUI will be much more challenging (especially trying to fit all the information onto a QVGA screen).