Due to popular request: This is a tutorial/example from which you can learn how to make a puzzle game in Construct. One of the kind where you have to match three or more blocks horziontally or vertically.
Let me briefly mention that I wouldn't recommend this for absolute beginners. So if you installed Construct just yesterday, you should probably get a little more familiar with it before you check out this tutorial.
This is just my personal approach and doesn't claim to be the way to go.
<font size="5">Part 1 - Playfield Generation</font>
<img src="http://dl.dropbox.com/u/2306601/puzzexam1.png" border="0">
First things first. So we start out with the generation of the playfield. Simply randomized blocks won't do, because we don't want three or more blocks being matched in the beginning.
So let's use an array, some sweet sweet loops and basically crazy stuff. <img src="smileys/smiley17.gif" border="0" align="middle">
All in the cap, all commented, there you go:
DOWNLOAD PART 1
<font size="2">(File created with version 0.99.42 of Construct)</font>
<font size="5">Part 2 - Swapping, Matching & Destroying</font>
<img src="http://dl.dropbox.com/u/2306601/puzzexam2.png" border="0">
Now we get to the really important stuff. After all a cool puzzle game can't work if matching blocks aren't even recognized. It's not quite as simple this time, but nothing to worry about either.
Expect more loops, crazy Else events and... you name it! <img src="smileys/smiley1.gif" border="0" align="middle">
DOWNLOAD PART 2
<font size="2">(File created with version 0.99.42 of Construct)</font>
Oh, this time you will really need the Contrast Plus effect. Go get it here:
http://scirra.com/phpbb3/viewtopic.php?f=16&t=4835
<font size="5">Part 3 - Spawning</font>
<img src="http://dl.dropbox.com/u/2306601/puzzexam3.png" border="0">
What's left to do is filling up those unwanted gaps with brand-new blocks.
How is it done? Of course with some nasty events, featuring loops and all the other stuff your parents warned you about! <img src="smileys/smiley4.gif" border="0" align="middle">
DOWNLOAD PART 3
<font size="2">(File created with version 0.99.42 of Construct)</font>
<font size="5"><font color="red">Part 3.1 - Now it even swaps back!</font></font>
Here's the functionality some of you have been yearning for: blocks are swapped right back if there hasn't been a match. Thank sweet baby jesus!
Note: All of the newly added comments have green text color on black ground, so you can easily spot them.
DOWNLOAD PART 3.1
<font size="2">(File created with version 1.2 of Construct Classic)</font>
Also still available: alternative first part
DOWNLOAD ALTERNATIVE PART 1
<font size="2">(File created with version 0.99.42 of Construct)</font>