austin-crumbles / minesniffer

0 stars 0 forks source link

Optimize performance for large grid sizes #5

Open austin-crumbles opened 2 years ago

austin-crumbles commented 2 years ago

The game builds boards painfully slow on grid sizes near 40x40 and above

austin-crumbles commented 2 years ago

The issue was caused by the main grid Frame, which had too many rows and columns to keep track of. Strangely, it was solved by adding more elements. The new elements relieve the main grid frame of responsibility to track columns.

The max grid size has been increased from 40x40 to 80x80, though at sizes so large, the revealing functionality starts to break down

2bff59714545482c3fdaf598c287e5ded2ecc654

austin-crumbles commented 2 years ago

Also, the mine percentages are WAY off now. Large grids have a much larger amount of bombs

austin-crumbles commented 2 years ago

41ec6a9fb46fcc73109f2d0f5c65d562c03d6b67

Next, I want to dynamically add more subframes if needed. Hopefully that will make even larger grid sizes more stable than at current.