Years ago I did paint my living room wall with a Voronoi graph: I marked random points, used a over-sized protractor to find the middle between points and then the edges before colouring the polygons. Lots of fun.
I’ve since used a Voronoi graph in a terraforming game prototype years ago and now again in what I think will become a Match 3 Game that requires a bit more thinking-ahead than usual in the genre.
Anyways, here’s the first screenshot I’d like to share, just a nice graph with no two neighbouring polygons having the same colour.
Graph-wise the centers are spread on an even grid and then given a little bit of wiggle.
Graphics-wise I only have a shader that runs on a cycle and multiplies with COLOR.rgb with a small value. I guess for the colour-blind I will add a pattern shader to have stripes, checkboard or cats for watermarks.
Removing a polygon, or rather it’s center, already works fine but I have to keep a dictionary of all the polygon centers and compare them with what the Delaunay lib by bartekd97 produces after recalculating the Voronoi. I might change the lib here so I can do removals and relaxation only within the library.
1 Like
Progress is slow, specially after I decided I needed to refactor before I put too much code in that VoronoiBlock class. I do love a short source file. Just look at how nice my scene tree looks now: all done via signals over an autoloaded GameState that isn’t even in the scene tree.
Here’s the latest from the game itself, I changed how the colours are distributed, the original version had no same colours next to each other and I only needed to check if any neighbour had already a matching neighbour before I discard a colour.
Next up is making the colours drop down after you removed some. Right now that’s buggy and clears half the screen at a speed that I can’t watch properly 
Getting close with my falling blocks/colours.
How did I not know that Vector2.UP was (0, -1)?
Next up is avoiding gaps appearing, when a block is cleared (no color no more) then it tries to steal the colour from its upward neighbour. That works unless that neighbour is also cleared…
https://youtu.be/nkLhbViQWHo
1 Like
I really like the voronoi match 3 idea.
It looks better without white lines but try adding some kind of graphical symbol to the tiles, that serves as an additional identifier along the color. Relying solely on color coding is not ideal for multiple reasons. It’s also an opportunity to make the game look more “expensive” and give it a theme.
2 Likes