The Making of Blob Attack

Code by JO3RI

Art by Castpixel

The first time I played Puyo Pop, was on my Nintendo GameCube. I did try the game on other systems too, but the GameCube version will stay my favorite. I do hope to honor the original creator (Masamitsu "Moo" Niitani, the founder of Compile) with this game.

While Blob Attack, feels like the original, it isn’t a copy. First of all, I doesn’t do 2 player mode. Not even man VS cpu. My game is more like Dr Mario, where you play on your own, trying to clear the field.

At first I did start making a 2 player game for the Video Game Shield. It is only after making Blocks, I knew how I had to set up a playfield and move tiles around it. Using everything I learned at making Blocks, I doubled the playfield and all other parts for Blob Attack.

BUT I ran into a buffer overflow. Back then, I didn’t have a clue on what was happening, nor did I know how to shrink the ram I used. So I gave up, thinking I would restart coding once I would have learned more on the subject.

After converting Shadow Runner to Arduboy, Blob Attack felled like it would be a perfect second game. This time I decided to go for a 1 player version, with success. To be honest, doing so, reduced ram significantly and solved my problem, without the need to solve the real problem in the first place. But I had a working game. ;-)

Actually, when I restarted coding the game, I was surprised on how far I already had gotten. The only parts that needed to be worked on where: dropping only one blob in a duo when the blobs fall partially on an other blob, removing blobs when a group is made and dropping the remaining blobs when holes are created by removing groups.

On the manual page you can read all about scoring, combination possibilities and chaining to get even higher scores. If you want to know some more on grid based puzzle games, you should also check the technical page of begemmed. It uses the same technique.

Basically you have a grid representing the playfield. Each place in that field has an X and a Y coordinate and can hold one blob number.

So when using int Field[x][y]; you can actually store a number on the grid. That number represents one of the 5 blobs. 0 = no blob.

Field [3][4] = 2; means that on the grid, on column 3 and row 4 we put blob number 2.

A smaller grid 3x3 represents the two blobs. But this time we only store the blob number in the 3x3 grid and move the complete grid at once. We use int blobsXY holding x and y for the small grid, positioned on top of the playfield grid. Position 0,2,6 and 8 in our small grid will always be empty. The middle blob will never rotate and the blob starting on position 1 can move to 5, 7,3. Doing so, makes the blobs rotate. This is simple done by copying the blob to the next position and clearing it from the current position, all within that small grid.

int Blobs[] ={          int Blobs[] ={          int Blobs[] ={          int Blobs[] ={

     0, 3, 0,                   0, 0, 0,                   0, 0, 0,                   0, 0, 0,

     0, 2, 0,                   0, 2, 3,                   0, 2, 0,                   3, 2, 0,

     0, 0, 0,                   0, 0, 0,                   0, 3, 0,                   0, 0, 0,

};                            };                            };                            };

Gameplay is nothing more than comparing the small grid to the big grid. If the big grid has empty places, the blobs in the small grid can be moved or rotated. Once a blob hits “ground” or stops on top of an other blob, the game checks if you made certain groups of blobs, by comparing neighboring grid places (do both places have the same blob).

For checking combinations of the same blob, we use a “flag field”. In a small loop we check certain combinations, like “four in a square” or “four in a column” or “four in a row” or others. If the check returns true, those places get flagged in a “flag-grid”. Once all those checks are done (return false), we compare the “flag-grid” to our playfield grid. Wherever there is a flag, the blob in the playfield will be cleared. (set blob number to 0)

If you do so multiple times, you can create chain reactions, which will give you a higher scores. Now try to get the highest score possible, by setting up stairs, which will trigger those chain reactions.