Week 10 - Memory Matcher

Flip cards over and match them to win. You can play it here

memorymatcher

Why a matching game...

My son has a Rescue Bots matching board game that he likes to play.

So I wanted to make a game that would be fun for him, so I made a matching game. All the fun and none of the setup :)

What I learned

It's a simple thing, but not something I'd used before. Chaining the tweening of one object off of another. Simulating the card flip is done by shrinking the x scale for one sprite and increasing it for the other and, doing the transition one right after the other.

  var hide_back = this.game.add.tween(this.back.scale).to({x: 0}, 100);
  var show_face = this.game.add.tween(this.face.scale).to({x: 1}, 100);
  hide_back.chain(show_face);
  hide_back.start();
other stuff

The source code is available here

Anyway, that's all for now. See ya in the next one :)