PDA

View Full Version : Connect three swap game engine


molkman
10-03-2008, 02:09 PM
Hello,
in the future, I want to make a game that features the common "swap and connect three" gameplay. Like, you have a board with symbols on it and swap two to create rows of three or more to make them disappear. Like this one: http://www.mausland.de/234.maus .

Now, I have no idea how to make a game like this. Does anyone know a tutorial for the technique needed to make a game like this? Someone told me that it is not hard. I know AS2 and have already created many flashgames, but I don't know what I need for this.

Also note, that I don't want to simply make a copy of that game I linked to, I just need an engine like this as part of the game I want to make, it'll only be a part of the game among other things, kind of like a twist etc.

xdeath
10-04-2008, 04:12 AM
it is complicated to explain but basically you need to tell it to to move to the new destination meaning grid movement and then it gets there it does a hitTest to see if there is the same movieclip as it's self next to it and if there is it gets deleted. i would make you an fla but that would be making an entire game for you and i would make the entire thing for someone or at least not for free.

nakedkafka
10-04-2008, 10:10 PM
^ I agree
do a class (level manager) which will hold a matrix and he will need to have a swap function (which will swap and chack the grid for matches) and a clear function (removes the blocks and drops new ones).

molkman
10-08-2008, 08:10 PM
Okay, thanks, I'll see what I can do.

rrh
10-09-2008, 06:01 PM
Good things to know about for this:
2-dimensional arrays
var newX:int = Math.round(PuzzlePiece(grid[oldX][oldY]).x/GRID_SPACING)
Basically, make GRID_SPACING a const that determines how far apart your pieces are, make grid a 2-dimensional array that contains all your pieces