Saturday, November 7, 2015

Robogem - The Evolution of a Board Game

A bit more than a year ago I took my first shot at designing a board game that teaches programming. It was fun but the game didn't really work too well. I still like the idea, but ideas don't turn into good games too easily, I've found out...

Soon I got the Robot Turtles board game and after some playing decided that it's not fun enough. I want games with action and fierce competition! I asked my kids opinions and they agreed: they want to compete against each other. So I started experimenting for a new game. The idea was that the players commanded tanks by making command sequences out of command cards. The game quickly from a co-operative search-and-destroy game to a competitive race.

The players raced each other on a hex board using the command cards (forward, left, right). Each player got to add or remove commands to their command sequence, which was repeated on each turn. So, you could either go fast by accumulating more cards to your sequence, or proceed more carefully. We used game assets from any available board games on my shelf.

The game was kind of fun, but was not very well balanced. You could easily drive yourself to a corner and it would take a long time to replace your program with something that will take you back on track. We changed the mechanism of adding/removing cards to a persistent program to one where you had a bunch a cards in your hand and could play any number of cards per turn. Then fill your hand back to 5 cards. That was nice until we discovered that unuseful cards will keep accumulating in your hand, because you play the better ones away.

Level design was very hard and the starting turn was too decisive. The hex board also made making full 180 turns quite tedious. Furthermore, the game was a bit dull, because it was quite linear; not many choices to make. Game design is not easy, I had to admit again. Still, I was convinced that I had a good idea and could make it work by applying my scientist skills. I was indeed keeping a very detailed diary of my observations and insights.

But So, after several iterations of changes, including laser guns of course, I decided to try something else. Treasure hunt it was!

So instead of racing through a track the objective was now to fetch 3 treasures from the board. This gave the players more alternative ways of winning: there are more than enough treasures on the board. Also, because there are more alternatives, the problem of "bad" cards accumulating to your hand got less irritating.

Then my daughter (5 years at the time) told me a new set of rules: you have to fetch a treasure from the sea and return that to "home". Also, if you push another player who currently has the treasure, the treasure is transferred 
to you. It naturally involved lasers that you could use to remove obstacles. The ideas of stealing treasures from your opponents and returning the treasure back home turned out to be a fun combination. Meanwhile, my younger kid was designing her own game.

We tried tens of variations of the treasure hunt game. Then we tried it on a rectangular board instead, to find the rectangular board worked better, because in a treasure hunt with opponents, you need to make a 180 degree turn every now and then. And it's also generally easier to play than a hex board. We tried loads different obstacle layouts and then found this one to be very good:

In fact, we never found a better one later, except for changes to the number and positions of the treasures.

We were still experimenting with different card-playing systems, including one where you could either build/modify your program with new cards or run it. Yet, a simple mechanism where you always get a completely new hand of cards after each turn turned out to be more fun. So I picked a game mechanism where you get 5 new cards for each turn and you play 0-5 cards on your turn, discarding the rest.I also decided that all players' cards should be visible. This gives you the opportunity to take others' cards into account when planning your strategy. You might think that having all cards visible would make the game simpler or more predictable but it's in fact the other way around: strategic players have much more variables to take into account. Yet, it gets easier for young children, because the older ones can easily advise them when the cards are in the open.

After about 1 month of active game design and dozens and dozens of iterations I finally had the feeling that we have a fun and simple game. I had the first set of game rules written down. I had simplified the game as much as possible, to make the rules easy to learn even for small kids. 

After signing a publishing deal (!) it took us a couple of months to finalize the game rules. This involved many rounds of testing with different groups of people, involving relatives and colleagues and their respective children. Minor modifications to the rules were tried and improvements were made.

I never explained the game rules to anyone. Instead they had to read the rulebook and start playing. It went quite well in general, but resulted in rulebook improvements of course. And this was an ugly rulebook with hand-drawn illustrations of course. Like this:

It also took some time to decide on the final game theme and the name. The tanks were ruled out pretty quick. We wanted to emphasize coding to some extent but still primarily make the game feel exciting and fun. It should be cool for both girls and boys. It should be easily applied to different languages and cultures. We finally landed on colorful and playful robots landing on a distant planet, in search of colorful diamonds.

Then, like a frog turning to a prince, the cardboard monstrosity turned into something beautiful. I was blown away by the first graphic designs made by Mikko Hiltunen for the game. I haven't got those at hand right now, but here's the pretty much final box design.

So now we had a working but ugly game and beautiful game asset designs on the computer. You can imagine it felt like a lifetime to wait for the ready products to be shipped. And that it was amazing to finally lay our hands on the finished product. And it was super! To me it looked even better than I had hoped for. And the game assets (robots, diamonds and the board) are good quality and nice to use. The diamonds fit the slots on top of the robots and everything feels solid.

And now the game is available both online and in many Finnish stores! It was pretty cool to see our game in the local supermarket.

Please have a look at the gameplay video and the rulebook online! 

You can buy the game and have it shipped to Europe and the U.S at least, for a reasonable cost. We are still looking for distrubutors worldwide, to have Robogem in the board game boutiques, supermarkets and bookstores all around the world.

It's been an exciting voyage so far, starting from learning vim and writing a few blog posts to actually being able a board game around the world. Now let's see if people like our game and we get to make more games. In fact, I'm already working on something new :)

Sunday, September 20, 2015

Talking Moose

Lately I've been fooling around with Bluetooth speakers so I suggested that we take some of my daughters toys and make it talk. She was obviously very excited. Imagine if someone suggested this when you were a kid. I'd personally had gone nuts. Well, she chose her dear Moose. 

So I went to buy a cheap'n'small bluetooth speaker for 17 euros and we started by makingthe bluetooth speaker talk using the Mac's fabulous say command line tool. First we connected the Bluetooth speaker by fiddling with the Mac's Bluetooth preferences. After that, the speaker is ready to use. Now, when you type something like

    say "Hello world"

You'll hear speech from the bluetooth speaker. There's even a bunch of different voices available and you can add more from the Text-to-speech preferences. For the Finnish language, there's a nice voice called Mikko. To use a specific voice, you do like

    say -v Mikko "Huomenta Suomi!"

And it was fun, once again. We've played with the say command before, but now the sound comes from a different box, so it was even more fun. Even our 3-year-old made the box talk. She can type her own name and learning more words every day.

Then I suggested we break the bluetooth speaker to pieces, just for the heck of it. And sure we did. We found a lithium battery, a circuit board and a speaker element. And I do find my daughter to be much like me when I was a kid. I always broke things to pieces and usually was unable to put them back together. We, however succeeded also at putting the speaker back together too. And yes, we tried if it works when in pieces too.

Later today, she came back and asked whether we are going to make the moose talk. And we stuffed the speaker into the Moose's butt. Now it speaks. Through its butt. Great! We even added some velcro so that you can close the gap and hide the electronics. And open it to recharge the speaker via USB.

By the way, you can actually connect several bluetooth speakers to your Mac. And you can address each of the individually using the -a parameter of the say command. What this mean in practise is that you can make a theatrical play with several soft toys speaking (through their butts) with different voices, by programming! 


Monday, September 14, 2015

Hello Ruby!

A while ago we got mail.

The long-awaited Hello Ruby book by Linda Liukas arrived! We read it as a good-night story the same night and both the girls (6 and 3 years) seemed to love it. Even with about 60 pages of story, it was an easy and quick read and even the 3-year old was all ears and had no problem concentrating. 

I was expecting a bit more "programming" in the story though. There are references to algorithmic thinking (Ruby thinks like a programmer), but without extra explaining, the kids won't notice that. The references to Python, Django, Snowleopard, Androids et al are also cute but don't ring any bells to small kids. Not sure that it makes sense to add that kind of a layer on the story.

Nevertheless, the most fun part in the book are the excercises though. From page 65 or so starts a "workbook" (not sure about the wording as my book's in Finnish) section, which is a real treasure chest full of fun and graphical programming exercises that you can do without a computer. This is the section that makes the book twice worth its price even if there wasn't a story at all!

Working on the 1st exercise

The exercises may seem simplistic, but at least for my quite-a-bit experienced 6-year old coder girl, they were just perfect. Easy and fun. We covered the first three exercises in half an hour or so. The first exercise was about writing written instructions for stuff like eating breakfast. Below there are the 6-year old's instructions. She even managed to make a loop to make sure that all the oatmeal gets eaten. She wasn't sure how you make a loop in this Finnish pseudo-language, and asked me how to "make a repeat" in Finnish, as she didn't know the right "coding words" in her mother tongue.

The exercises involve not just writing step-by-step procedures, but also breaking things into parts, boolean logic and so on. As an extra, she got to draw Ruby in her weekend costume, the rules of which she had to write in exercise three. You can probably guess the rules from the picture?

And how about the 3-year old? She was busy too, and also drew a picture of Ruby.

Ruby pictured by 3-year old artist

So, Ruby is not just cute, but smart too. Well done, Linda!

Tuesday, May 26, 2015

The Milatron

We haven't coded much lately. Seems that she's interested in hardware at the moment :) And stuff like sports and music. With regard to music, we've been building a thing I call Milatron.

It's a custom electric instrument that we designed earlier (see my previous post). The idea is that we use an Arduino microcontroller to produce different sounds through a speaker, when you press one of the 8 colored buttons. Simple enough. We found a suitable cookie box to use as the chassis and decided to use a 4 inch speaker element which is way too heavy for our use but later on proved to be a good choice.

First, we had to measure, draw and cut a hole to the chassis for the speaker, and install the speaker with bolts. She did most of the hard work, of course.

Then it was time to drill holes for the keys. At this point you could already see that this thing is gonna look awesome. 

She installed the keys mostly by herself and did all the soldering too. She just loves soldering!  

We added the Arduino and a breadboard inside. The breadboard had a sticker surface on its bottom so it could be nicely fitted on top of the speaker. At first I added a resistor between the Arduino and the speaker to turn down the volume a bit. Later we replaced the resistor with a potentiometer so that you can adjust the volume to your liking.

We installed a 9 volt battery which is held in place by the huge magnet of the speaker. So the big speaker turned out quite handy in many ways. It also gives the gadget a considerable weight, so it doesn't feel like your average children's toy.

Here's the Milatron now. It's tuned in D major and makes terrible noise. It even has kind of a polyphony. 

We did some experiments with software-generated sound before we started working on the actual instrument though. But I decided writing the actual Milatron software myself, because generating waveforms with different, accurate pitches isn't actually trivial. A bit too much for a 6 year old, I'm afraid. I think the main thing is that she knows it can be done.

All in all, we spent something like 3 nights working on this. Good times! And the monstrosity is still in active use, a few weeks after its birth. We are planning on adding extra features like pitch bending later... 

Maybe I should post a video of how it sounds?

Saturday, March 21, 2015

Lesson 67 - Modding Switches

Today I got a shipment of electronics. Me and my little girl were both excited to open a bunch of envelopes to see what's inside; we have been waiting for some more Arduinos and mechanical switches for our upcoming Electronic Instrument. She immediately recognized the Arduinos, of which I was kinda proud.

The switches were a disappointment though. Colorful and all, but unfortunately of the "latching" type, meaning a switch that stays down when you press it, and comes back up when you press it again. And that just won't do if you're planning to build a keyboard for a musical instrument, will it?

So, we started "modding" the switches be removing certain parts from inside. We had 15 switches to mod in total so there was some real work to do! You'd thing this would be tedious and boring for a 6-year old girl? Nope, not at all. Even the 3-year old helped the best she can. In the end, I was the only one (not counting the 3-year old in) unable to open the plastic casing of a switch without breaking it. 

So the 6-year old can now mod a switch without any adult help, and does it better than me... And here they are, all 15 switched, modded by willing child labor!

Then we did some design on how the instrument would look like.

Next up: woodwork. We need to build a casing for our thingie. And maybe we need to visit the local "recycling center" to scavenge some parts, including a little speaker element. The Hartke element might be a bit too heavy-duty for our use case, weighing 1 kg or so. You can see it in the picture too. Quite a monster, ain't she?

Friday, March 6, 2015

Soldering school

Today her older cousins were visiting. She organized a Soldering School where she explained how to solder and had them all do some basic soldering. Was fun.

Thursday, March 5, 2015

Solder On!

Yesterday she was sick and I got to spend the whole day at home with her. Guess what we did? Well, she slept and watched Netflix while I was working. For a while. But when she got her energy back, guess what she wanted to do. Solder. So we did some serious soldering. Behold the METAL HORSE!

And today, I asked her to do her violin homework. Guess what she wanted to do. Solder. So solder we did. She soldered a resistor on the perfboard perfectly!