Grouping/clustering cells in a 2D grid

I have this game with a grid similar to the one on desmos.com. there are a lot of points. each point is a part of the grid and is represented by a green square. In the photos below, the first one is showing the points mapped out. However, is it possible make it so that the points are more like the image on the right, where they’re grouped together?

The grouped cells will be represented by values in a table. the first value will be the origin cell which is the top left cell of the lot. The second value will be the amount of cells it goes to the right in the x direction and the third value will be how many cells it goes downwards in the y directions. The reason I want this instead of individually plotting each cell is because creating tons of UIs is obviously very resource-intensive

All of the points are Vector2 values inside of a table


You can do that by using something called greedy meshing. Here is a great tutorial by @5uphi that explains it in depth and can definately help you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.