Brainbow is a game written in C++ using the SFML API which borrows some inspiration from Tetris in terms of blocks falling down from nowhere, which also has to magically disappear somehow to keep playing. The twist here is that the colours is what decides if blocks are going to disappear or not.

Each block is made up by 3 colour components: red, green and blue. If both red and green are full, they make the colour yellow (yes, we're talking in computer terms here, not real life ones).

Most blocks start out with one of the components filled, and will then radiate that colour onto nearby blocks after having been positioned, which will radiate further to their nearby blocks which will radiate further and so on, while getting weaker in strength for each iteration.
The goal is to fill all 3 components so that you get a white block. This block will then disappear and you will get points. The more points you get, the better.

There are also black blocks which will prevent your progress. As they have no colour they won't radiate any either, but will still need to fill all 3 components to disappear.

Get ready for a colourful experience!

Latest Blog

Added a few changes to the game.
- The disturbing background has been removed and should disturb no more
- The speed increases for each level has been somewhat lowered, creating room for more levels (up to 20 now).

There might be some other stuff as well in terms of internal structure that I don't remember, cuz I actually made this long ago, just didn't get around to finish it up for a long time (and wanted to add more and blah).

Sometimes the rotation would be handy as I need 2 in one place, and 1 in another to make a whole bunch of tiles disappear. As far as coding, it could be a simple if, then statement. If z is pressed, then turn 90 degrees left (and if you wanted to have it turn 90 degrees right have a separate command) I used to code in C++, and even tho I've not done it in awhile, it shouldn't be *that* hard.

Normally, it wouldn't be that hard, true enough. But this project is pretty much the result of some dire cowboy coding, meaning it wouldn't be that simple after all, unless I'd want add variables to keep track of the current shape and then make a lookup for the current shape.

The cowboy coding resulted in the actual order of the blocks in the shape being relevant to some later calculations (...I think), which is what's making the trouble. Otherwise I could probably just have created a tiny matrix where I could more generically done a rotation for any shape.

It's not just that it would be a hassle to implement either though, but rather that I'd rather give priority to other stuff, like names for high score and possibly a puzzle mode as well (which probably would be more hassle, but more interesting to implement as well).

But who knows, I might look into it anyway and see if I'll see some genius way to fix it regardless