This is a flood-it clone inspired by the game Ink Spill from the book "Making Games with Python & Pygame". This game and also some of the others that I have already done and published here are part of a personal challenge which consists in doing clones of these games.
How to play
In order to win you have to flood the entire board with one color within a certain number of moves. You can do a flood fill on the tip left tile, changing the color of any adjacent tiles of the same color.
Controls
- Change color - ⬅️/➡️
- Flood fill - 🅾️/Z/C
- Highlight init cell - ❎/X/V (only available when init cell unlocked)
Changelogs
Version 1.1
- Addded menuitem (in the title and gameover screens) that unlocks selection of the init cell.
- Saves configuration.


Hello @Tatery1! First of all, thanks for playing it.
Yeah, that also happens to me a lot. Honestly, I just copied the maximum number of moves from https://unixpapa.com/floodit/ and added 2 to make it a little easier as each board is made up randomly and there is no difficulty selector as the original one in the book (in which some cells are changed to the colors of their neighbourhoods), so you will always be playing in the "hard" mode. Boards of the same size sometimes will be easier, sometimes will be harder, and maybe some of them will be impossible. However, all the boards of differents sizes may be resolved at some point with a bit of strategy and luck ;)


@dw817, well that's not hard to implement, the algorithm works with any start position of the board, but making the interface would take some time. Here there is a version with global variables for the start position, so you can change it in the runtime and see if it can be easier. Personally, I would think so. Let me know what you find out.

This is an example about how the global variables (flood_x, flood_y) could be modified:



@liconaj - Thanks for the update. I now find that what I think is a good starting move (usually right in the center) is nothing of the sort.
On a lose, it would be interesting if you could play the same arrangement of colours again to see if the board actually was possible.


Oh no, @liconaj, I did not explain myself well.
What I mean is EVERY time you do a fill, you can specify the coordinates using the ARROW KEYS each time before you fill.
So when you run your cart and the game is going, you have a flashing cursor. Use the arrow keys UP and DOWN to move it where it quickly goes from one square to the next. If you go too vertically low y<0, it starts back at the bottom back over left by one.
If you go too vertically high y>12, it starts back at the top and over right by one.
if y<0 then y=11 x=x-1 if x<0 then x=13 end elseif y>13 then y=0 x=x+1 if x>13 then x=0 end end |
It could also be done with modulos, %
yet I was just showing the format it would follow by pressing UP and DOWN on the arrow keys where LEFT and RIGHT still choose the color.
Also GOLD STAR for your hard work and unique gameplay so far.


Here is an example showing how you can reach all points with only up and down arrow keys, @liconaj.


... Of course you could also just hold down the ❎ key which is not in use and then use the UP, DOWN, LEFT, and RIGHT arrow keys to select a new point to paint at.
[Please log in to post a comment]