Just answering, I'm just starting new project, and I need SameGame engine in that game, because I don't know, how bricks move to left, when there are gaps, because I'm not expert in game making.
Originally Posted by emperor cecil what is even the problem? you need to be a lot more descriptive than that.
Oh, I'm just in the rush, but if you need to know how it works, then I have to describe like this:
"Same Game is played on a rectangular field initially filled with typically 4 or 5 kinds of blocks placed at random. By selecting one of a group of adjoining blocks of the same color, a player may remove them from the screen. Blocks that are no longer supported by removed blocks will fall down, and a column without any blocks will be trimmed away by other columns always sliding to one side (often the left.) The goal of the game is to remove as many blocks from the playing field as possible.
In most versions, there are no time constraints during the game, however, some implementations gradually push the rows upward or drop blocks from above. The game ends if a timer runs out or if no more blocks can be removed."
Does this help? If not, Then I have to ask for someone of help.
its done by manipulating matrices, not actually having rows of objects. If that makes sense to you. Try thinking about each step of what you want in the algorithm form a computer operates, but I'm going to warn you it will complicated to properly code.
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
29th August, 2008 at 22:27:56 -
I know this game, it's pretty fun.
Basically, you could have a 2D array filled with numbers (0 to n, where n = amount of unique blocks). When a whole column is 0, move all columns that are right from that one 1 left (you can use a fastloop to move these values). Not sure how to do it with MMF's array object, but in most scripting languages this wouldn't be a difficult thing to do so I presume it won't be in MMF either.
About the gravity part, that's as easy as checking what's above each "0" element in the array after each turn. If there's something, move it to the 0 spot.