Download

Blue Print Match 3

Hey I started working on a blueprint based match 3 game. Since I couldn’t use a 2d array I ended up using a 1d array doing this, but letting swaps and gravity happen keep things from being order associated in the array meaning I’m having to do some lookups to match a row column search. Having to forearch every time I need to find a tile at a particular row column pair is starting to introduce major lag as matching, filling, and dropping require quite a bit of referencing cells around the current cell. On a 5x5 Grid there are no issues but on a 10x10 grid there is slight amounts of latency as seen in this video…

https://www.youtube.com/watch?v=DImnG-VCaK8

I saw a bit about using an array of structs that have a member that is an array of the object / actor you want to use, but I’ve also read about struct bugs in the system and wasn’t sure if this is best.

Does anyone have any suggestions / advice for how you would arrange your data so that you can quickly lookup / iterate through the game board as things begin to increase? I’m also contemplating for a solution that would work with abnormal shaped boards (ie not a pure rectangle). Interested in hearing how others would approach the same problem.