9 ms·
neat! I've wanted to add irregular grids to my infinite minesweeper. Playing your version, it definitely adds something. How do you generate your grid? Is it vo
by kaesve 3y ago
neat! I've wanted to add irregular grids to my infinite minesweeper. Playing your version, it definitely adds something. How do you generate your grid? Is it voronoi cells on top of blue noise?
- frading 3y agoThanks a lot. And I've had some thought about making this infinite, but it's a bit harder! The generation is inspired by what Oskar Stålberg has done for his game Townscaper. It is done with those steps: - start with triangles (ideally in an hexagonal pattern). - merge pairs of triangles into quads, randomly leaving some as triangles. - we subdivide both quads and triangles, and end up with quads only. - smooth the whole to get nicer shapes It can be a bit abstract with just this list, so you can see some videos in my tweet: https://twitter.com/fradingue/status/1712218108826460428 https://twitter.com/fradingue/status/1712218108826460428 I've also created a webgl engine to solve this type of procedural modeling for the web, and you can see 2 examples scenes where you can play with parameters that affect the shape of the irregular grid: - https://polygonjs.com/gui/irregular_quads/edit https://polygonjs.com/gui/irregular_quads/edit - https://polygonjs.com/gui/irregular_quad_relaxation/edit https://polygonjs.com/gui/irregular_quad_relaxation/edit