I just finished working on my newest app for Android: Dominoes.
Dominoes was one of my favorite games as a kid. I'm from Texas, so we played what was called Straight Dominoes. Apparently it's closely related (if not identical) to the dominoes games Muggins, Fives Up, and All Fives.
The current implementation is two-player vs. a computer opponent. Each player takes turns playing dominoes, and you score when the open endpoints total to a multiple of 5. Here's a demo video:
There were some unique challenges in creating Dominoes for the mobile platform. The biggest challenge by far was the layout. I initially thought I was going to be able to display all played dominoes, but there's just not enough real estate on the screen to do that. Well, there sort of is, but the layout algorithm would have to be incredibly complex. The one I ended up coding was complex enough already.
I struck a compromise between showing some of the played dominoes, but clamping the ends, so that if a played domino goes off the screen, it basically overwrites the domino it was just played on. This doesn't look great, but I think it strikes a decent balance between only showing the endpoints and showing all played dominoes.
As you can see in the video, the user can pull up the Played Dominoes dialog at any time to see which dominoes have been played.
For the most part I wanted to have as much information available on-screen as possible, so that the user wouldn't have to navigate away from the main play screen in order to see:
1) How many dominoes their opponent has left
2) How many dominoes are left to draw
3) Whose turn it is
4) Each player's score
Also, if the player draws more than 7 dominoes, an arrow appears to the right of their hand, allowing them to scroll through their hand. I initially thought I would display all the dominoes in the player's hand at once, but this would simply take up too much space.
Anyway, I'll likely release it this afternoon and we'll see how well it does. Back when I released Spades, I got several requests for a dominoes game. When I wrote one of them back and asked what kind of dominoes, he said "Doesn't matter!" So we'll see what kind of demand there is.
No comments:
Post a Comment