Category Archives: Games

Game Review – RoboRally

RoboRally Box ArtRichard Garfield is justly (in)famous for creating Magic:The Gathering, a game so nerdy that groups have to meet in secret less a roving chess team find them and beat them up. But before that, Garfield made RoboRally – a game that makes Magic:The Gathering players look like cage fighters.

RoboRally is exactly want it sounds like; each player has a robot which they guide around a factory floor. The object is to win the race by touching numbered flags placed in strategic locations in turn – the first robot to touch the last flag wins.

Each turn players are dealt 9 program cards each specifying a simple instruction (“turn 90° clockwise”, or “move forward 2 squares”, etc). Before any of the robots move, players place 5 cards face down in front of them in “registers” and discard any cards left over. Then each player reveals the card in register 1 and moves their robot on the board accordingly. Then register 2 is revealed, and so on.

But things aren’t so simple. In addition to avoiding the other robots, the factory floor itself is littered with obstacles. There are conveyor belts that carry any robot on top of them, walls that block movement and worst of all, lasers. Each robot also carries a laser, so damage is inevitable. Damaged robots first receive less cards at the beginning of the turn. The damage quickly accumulates to a point where the registers themselves become faulty, locking a movement card in place for multiple turns.

Because you effectively program in 5 movements ahead of time a certain amount of forethought is required. Forethought that might go to waste, because other robots can interfere with your carefully laid plans. You never quite get the cards dealt to you that you need, and once the damage starts to bite your robot with be careening all over the board.

RoboRally board, showing positions part way through a game
RoboRally scales really well and is actually better with more players, so long as you don’t mind a certain amount of chaos. It sounds complex but the rules are very clear and each turn takes only a few minutes. It is certainly not a game of deep strategy as any plans you make will collapse hilariously, but it is not totally random either.

Fast paced, humorous, and nice to look at. Highly recommended.

Jumping Frogs – Using Python to Solve Puzzles

A few months ago I came across the following puzzle in a video game I was playing:

The starting position for the siz frogs puzzleThree frogs are happily hopping along a narrow board together when they meet another group of three frogs traveling in the opposite direction. These frogs can only move in the direction they are facing, and only if there is a space directly in front of them. Additionally, a frog can jump over the frog in front but only if there is clear space on the other side to land in.

How can the frogs (moving one at a time) pass each other and continue on their way?

Of course, this is a hoary old puzzle that most people come across and solve as children. It should be only a couple of minutes work with a pen and paper to confirm that it is possible to exchange both sets of frogs but I wouldn’t be much of a programmer if I used a piece of paper where hundreds of dollars of computer equipment would do just as well.

To solve a puzzle like this programatically requires three things: a representation of the current state of the problem, a way of generating every possibly legal move from a given position, and a way of figuring out when is a good time to stop.

Firstly, the representation of the board is a simple python list:

1
start = [1, 1, 1, 0, -1, -1, -1]

Frogs traveling right or left are represented by “1″ and “-1″ respectively. Empty spaces that frog can move into are represented by “0″. The advantage of this representation is that you can calculate the new position of a frog by:

1
newPos = pos + (representation * distance)

where pos is the current index in the array, distance is the size of the hop (either 1 or 2) and representation is either 1 or -1.

Next, we need a way of generating legal moves for a given position:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def legalMoves(board):
	moves = []
	for pos, piece in enumerate( board ):
		jumpmove = pos + (piece * 2)
		move = pos + (piece)
		if ( piece == 0 ):
			continue
		if (not (( jumpmove < 0 ) or ( jumpmove >= len(board)))):
			if (board[jumpmove] == 0):
				t = list(board)
				t[pos] = 0
				t[jumpmove] = piece
				moves.append(t)
		if (not ((move < 0) or ( move >= len(board)))):
			if ( board[move] == 0):
				t = list(board)
				t[pos] = 0
				t[move] = piece
				moves.append(t)
	return moves

Now we need a way of keeping track of all board positions we have seen, so once we find the target we can print the states that led to the solution:

1
2
3
4
5
6
7
8
9
10
11
def evalAll( current, target ):
	next = []
	for a in current:
		n = legalMoves(a[-1])
		for q in n:
			t = list(a)
			t.append(q)
			if ( q == target ):
				return t
			next.append(t)
	return next

This code keeps a list of lists, each sublist being it’s own list of the sequence of moves investigated so far. For each sequence of moves, the next legal moves are discovered and new sequences are added to be investigated the next time this function is called. Technically this is called a breadth-first search because at all of the current legal moves are investigated before moving on the next stage. This is a very simplistic way of doing the job, but in this case the puzzle is small enough that it works well enough.

Finally, a simple wrapper that we can use to set things up and return the final result.

1
2
3
4
5
6
7
def solve(start):
	temp=[[start]]
	end = list(start)
	end.reverse()
	while(temp[-1] != end):
		temp = evalAll(temp, end)
	return temp

So now we can do this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
print solve([1, 1, 1, 0, -1, -1, -1])
 
[[1, 1, 1, 0, -1, -1, -1],
 [1, 1, 0, 1, -1, -1, -1],
 [1, 1, -1, 1, 0, -1, -1],
 [1, 1, -1, 1, -1, 0, -1],
 [1, 1, -1, 0, -1, 1, -1],
 [1, 0, -1, 1, -1, 1, -1],
 [0, 1, -1, 1, -1, 1, -1],
 [-1, 1, 0, 1, -1, 1, -1],
 [-1, 1, -1, 1, 0, 1, -1],
 [-1, 1, -1, 1, -1, 1, 0],
 [-1, 1, -1, 1, -1, 0, 1],
 [-1, 1, -1, 0, -1, 1, 1],
 [-1, 0, -1, 1, -1, 1, 1],
 [-1, -1, 0, 1, -1, 1, 1],
 [-1, -1, -1, 1, 0, 1, 1],
 [-1, -1, -1, 0, 1, 1, 1]]

Success!

You might say this is a waste of time since you figured out the problem in your head. Good for you, but try this on for size:

1
[1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1]

Game Review : Wrath of Ashardalon

Things are not going well for the villagers that live near the dark volcano that dominates the landscape. The smoke and ash the billows from the inaccessible crater is only a minor problem, far worse are the horrible creatures that dwell in the crevices that split the mountain’s flanks. And lurking somewhere deep within the lava-fulled depths – Ashardalon awaits!

First things first – Wrath of Ashardalon is an official Dungeons and Dragons game, played like you would a D&D adventure with simplified combat with the game mechanics taking the place of the DM. Still reading? Very well, let us continue…

Up to 5 adventures can play, each selecting a different pre-defined character but choosing a subset of the available abilities to start with. Each turn, the a player moves his character around the board and possibly attacks a monster if one is in range. At the start of the game, the board consists of a single 4*4 tile but if a player ends his move on an edge then pick a random tile and place it on the board, exposing a new part of the dungeon. At least one monster is placed on each new tile. Usually an encounter card is drawn as well, these have effects (almost always bad) ranging from the current player being hit by an arrow from the shadows to everyone taking damage from poison gas.

Then it is the monsters turn to move, the current player does that before ending his turn. The monsters all behave slightly differently, but the cards carefully explain what to do. Combat is very simple – roll a 20 sided dice and add the attack value to see if it meets the armour class of the defender. Most monsters can be dispatched with one or two hits so bookkeeping is kept to a minimum.

The ultimate goal changes depending on the scenario chosen at the start of the game. In our most recent game we had to fight our way through the random tunnels to find a special tile that opened into a large chamber filled with monsters led by a special “villain” monster with extra abilities. Our first attempt failed utterly but we got there in the end.

One word best describes Wrath of Ashardalon – hardcore! The box contains a vast amount of cards, tokens, thick cardboard map tiles, and 42 unpainted plastic figurines. The figurines are different from the normal D&D figures but detailed and suitable monstrous. The map tiles are very heavy card-stock and the art in nice throughout; full marks for presentation. The rulebook looks good but has a uphill battle trying to explain things, especially since many of the rules only apply during certain scenarios. It was only on our second game that we felt we were playing things correctly and even then we had problems.

The closest thing I could compare Wrath of Ashardalon to is the old Gauntlet arcade game from the 80s. The game forces you to move fast, uncovering the dungeon quickly to reach your goal. The clock is ticking since horrible events befall your party nearly every turn. Trying to mop up every single monster before continuing only leads to defeat; far better to keep moving and conserve your meagre resources as long as possible.

Wrath of Asgardalon certainly can be fun, but is really only for experienced players. The game balance is brutally stacked against the players, so everyone has to be making the most of their abilities all the time. Even then blind chance can completely screw you (and everyone else) over with no chance to counter it.

Recommended only if you have a group of friends who really like Dungeons and Dragons and Losing and Restarting.

Minecraft Creeper Shirt

The minecraft creeper face textureI don’t use my computer for games much these days, but I have been playing a bit of Minecraft lately. Minecraft is a strange beast, more of a pastime than an actual game, but well worth the money. I have tried online games before, and although I like shooting things, the first person shooters all look the same after a while, and the MMOs are tedious. A huge, multiplayer lego set turns out to be just what I wanted. Besides, I find the lo-fi graphics and even the obvious bugs in the game charming.

As I was invited to a fancy dress party recently, I decided I needed a Minecarft creeper shirt. The creepers are the most terrifying creatures in the game, and I knew I needed to do them justice. 4 pots of fabric paint and many hours gave this result:Me in my creeper teeshirt

SsssssSSSSS – kabooom!

Not too bad, if I say so myself.

Update: I have been asked how the tee shirt was made. This was my first experience with this type of craft, so perhaps a better way exists, but the following steps seemed to work OK:

Materials

  • Plain white tee shirt (I brought mine from the Warehouse for the princely sum of $8. If I was going to do it again I might spring for a better quality shirt since the one I got was made from rather thin fabric.)
  • Long straight edge ruler
  • A dark pencil (2B or similar), dress makers chalk would probably be better
  • Textile Ink – I used Fastex Textile Ink which I found in the craft section of Warehouse Stationary. The colours I used for the Creeper design were Black, White, Leaf and Green.
  • Some brushes
  • Water
  • Small containers for mixing colours (I used yogurt pottles)
  • Lots of newspaper to protect the table top
  • Lots of copier paper for stencils
  • Baking paper
  • An Iron
  • Some scissors

Method

First I ironed the shirt until it was as smooth as I could make it. Then with the ruler and pencil I divided the shirt into squares of equal size. Because the design I wanted extends all around the shirt, some of the squares wrap around across seams.

Don’t make the squares too small! Large areas are much quicker to paint than small ones.

I started at the centre line for both the front and marched the squares towards the edges. It doesn’t matter that the squares the wrap around over the seams are slightly different widths, being symmetrical is more important.

With the dining table covered in newspaper, I laid out the tee shirt as flat as I could. Then I inserted the glossy insert magazines that came with the paper into the tee shirt to keep the inside surfaces from touching. This is to stop the ink from bleeding through to the reverse surface when you brush it on.

I used a purpose-bought Weekend Herald for this, because I knew it came with a lot of glossy paper inserts that will not absorb ink or fall apart when damp like newsprint will. If you follow my lead, it is vitally important not to accidentally glance at any of the editorials, regular columns, or especially the letters to the editor. You need to maintain your calm for applying the ink.

To get really straight edges on the design it is best to mask out the fabric with masking tape. I found the really cheap off-brand sello-tape works even better, as the adhesive sticks just well enough to do the job but comes off very easily. However, I had far to many square to paint, so I just used bits of copier paper cut more or less straight with scissors. Holding down the paper against the fabric with one hand, I quickly brushed on the int with the other, taking particular care with the corners. Working this way I found I could do a square every couple of minutes.

I needed a lot a shades of green, so I was continuously mixing colours. Some very vivid colours can be created, but mixing in too much black or white just results in a muddy mess. Some of the squares are supposed to be white – I just left them unpainted.

The squares that wrap around from front to back across the seams were the hardest. I carefully folded the sides of the shirt up to reach the hidden side, then placed bits of baking paper over the wet ink before I laid the fabric flat against the newsprint. The prevented the ink from smearing if the shirt moved around, the baking paper doesn’t get stuck to the ink as it dries.

Once the front was done and completely dry, I fixed the ink (see below) before completing the other side. Remember the wash and dry your brushes.

Fixing the ink (so it doesn’t run when damp) is done with a hot iron. Iron each part of the shirt for 3-5 minutes to make sure that the ink stay where it is supposed to. I thought I did a pretty good job, but found the the black areas still ran a little when I washed the shirt, so you might like to pay particular attention to dark colours.

Go forth and impress people* with your custom, one-of-a-kind shirt.

* results may vary

TrapIt

My friend Aaron has been working on an iPhone game for ages, and now it has finally been released. It is well worth the NZ$1.29 being charged (there is no demo version available).

TrapIt Title Page

You can see more about the game at the TrapIt official site, or jump straight to the App Store page.

I must say I am a little envious. I have been an Apple Registered iPhone developer for 3 years and haven’t managed to produce anything.