Rock is a new game in the game tutorials and is a match three type game (like Bejewelled Blitz, Puzzle Quest etc) themed about a dungeon crawl. Ie every game of Rock is a challenge to see how many levels you can complete before running out of "steam".
This will be the first game to be programmed in C#.
- Want to learn C# Programming? Try our free C# Programming Tutorials
What is a Match Three Game?
Built usually on an 8 x 8 grid (though no reason why it has to be), the game plays like a typical match three game where you drag a symbol on to another next to it to form three or more symbols in a line.
The grid is full of several types of symbol. Usually there are 4 or 5 different symbols in play. It looks a bit like this where I've used 1-5 as symbols.
Nowhere in there are there three symbols the same vertically or diagonally but there are a few places where by swapping two adjacent symbols, a block of three can be achieved. On the 4th row, swap the leftmost 2 with the 1 beneath it.
So it becomes:
At that point the three 1s are removed and all three columns above move down 1 and three new random values are introduced above. Moving the columns might make three (or more) values appear next to each other.
Though in this case it didn't. abc shows where the new three appear.
If you look closely at the 2nd and 3rd rows there are now two ways to move the rightmost 4, either swap it with the three to the left on the 2nd row or swap it with the 5 to the right on the third row to form three vertical 4s.
So that is the basic Match 3 mechanism. If you are lucky, sometimes 4 or 5 can be matched in one go. Five is almost the longest, to get six you would need a very rare combination of symbols lined up like aa..aa and complete two vertical sets that drop another aa in the gap (Thanks Ryan!) If you do get a six then the level is cleared immediately. Talk about a critical hit!
To make the game more interesting there are lots of things that can be done. Here are three:
- Play against the clock. Highest score in a minute/. Eg Bejewelled Blitz.
- Earn rewards that you use in some way. Eg the iOS game Ten Million.
- Build it into a larger game as a way say of resolving combat. E.g. Puzzle Quest
Rogue and other games of the same ilk are dungeon crawlers. Your character starts and has to progress through a series of levels fighting monsters and acquiring magic items.
For Rock, these provide the theme for the game. As luck would have it, the game image files for Warlords II (by SSG), a favourite of mine in the 90s, are available free from FreeGame Empire. They are in PCX format but that's not an issue as I can convert them to .gif or .png so I can use them in the game.
Note, I used Irfanview to convert the .pcx files to .png. There aren't many applications that can handle .pcx; Irfanview is highly recommended.
How to make subsequent "levels" harder?
Here's how I see the game play going. At level 1 there are four monster types, some dungeon cave symbol types and some treasure types. Matching a type gives a particular reward:
- Monster type. There are only so many monsters per level. Once a certain number have been matched the level is complete. These also give mana.
- Treasure types. These add points to your score.
- Dungeon/cave types. These add points and time.
Note the time requirement. To give the game an edge, there is a clock that counts down. It starts at 60 seconds and matching dungeon/cave types adds extra time. If the clock reaches 0 it's game over man. Each monster matched adds a little time as well and matching four or five of anything gives a 30 or 60 second bonus.
At higher levels there are more monster types thus making it harder to find a match. If the board reaches a no matches left then all symbols are removed from the board, added back to the symbol sets for the level and the board refilled from scratch.
Mana is earned by killing monsters and is used to power spells. When a monster match occurs the monsters are removed and one treasure left in their place, leaving two or more blanks.
There are four spells, though if better ones occur, I'll add them. Game design isn't an exact science; sometimes an idea improvement will occur during gameplay.
- Add time.
- Zapp! 5 Mana. Removes all symbols in one column.
- Bang. 25 Mana. Destroys a symbol and all those immediately around it.
- Death. 590 Mana. It removes all symbols of one monster type on the board.
When symbols are destroyed the refill mechanism replaces the blank tiles. Refill moves all symbols above an empty space down by one then adds in random symbols in the first row to replace any blanks. It then checks if there are any new matches created by this and processes those. This continues until there are no blank tiles.
I'm going to create thus using SDL.NET, see Programming games in C# using SDL.NET.
- Here are some more Game Programming tutorials.