Log In  


Cart #inkspill-7 | 2023-01-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
16

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 (Note: Only works in init or free mode. In free mode it also lets changing the init cell with the arrows)

Changelogs

Version 1.3

  • Added free mode, which let you change the position of init cell every time, and renamed unlock/lock init cell to "default mode" and "init mode".

Version 1.2

  • Added menuitems to control seeds, repeat board, and animation effect.

Version 1.1

  • Addded menuitem (in the title and gameover screens) that unlocks selection of the init cell.
  • Saves configuration.
16


one square left

are all levels possible?

the bigger the board the easier it gets


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 ;)


1

Nice simple yet challenging game. I thought it's free spill until the counter hit me.


1

Nice game! Simple and fun


@liconaj no problem!
i finished all the boards.. the game was super fun!


1

What an interesting game, @liconaj !

I was wondering if it would be simpler (albeit quicker solution) to let you choose the square to start flood filling rather than starting at the top every time ?


@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 and @dw817 - changing the start position is a really interesting idea. I would love to see this implemented


@phil and @dw817, done! See changelogs for more information :)


@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.


@phil, love the idea! Let me see what I can do.


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.


1

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

Cart #diserawajo-0 | 2023-01-27 | Code ▽ | Embed ▽ | No License
1

... 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.


1

@phil - Now you can control the seed, and there is a repeat mode to repeat board instead of "restart" (create new board) when the seed is "random".

@dw817 - Liked the idea of using the ❎ key, but with arrows pressed at the same time for speed and simplicity, because it was the easiest to implement with the existing code. Without that hint I wouldn't know how to do it easily. Now you can do that enabling the free mode in the menuitems. Hope you like it and enjoy!


Hi @liconaj. Glad you like the idea !

For those of you having difficulty finding the Free Mode. It is in the menu BEFORE you start playing the game. If you are already playing the game itself - it will not appear.



[Please log in to post a comment]