This is driving me crazy…
Match 3 game
How do you know when a board has stopped filling with gems after a player has made a match? i.e. when the board has settled and the move ends
In my game each gem checks itself for everything. I don’t loop through the grid to check for matches. Each gem transitions into each tile checking below, left, right all the way down the grid unit it stops, then checks itself Horizontal and vertical for a match after it has stopped moving. When a gem drops down, it drops the one above it. If a gem is destroyed it puts a new gem into a Queue and attempts to drop it on the top row.
You think it would be easy to know when the grid has stopped filling and settled.
I know you need to perform this check for each gem, particularly gems that have stopped moving and have no match.
But for each gem – if you loop through the entire grid to see if each tile is settled --this slows the game down, besides a millisecond later there could BE A MATCH on the other side of the board.
The way I do it now – I fire a timer 1000 milliseconds after a gem has stopped moving and has no match. Then if a gem is being created or is dropping on the board the timer is reset. But this makes the player wait almost a second after each swipe… ugh I know a second doesn’t seem like much but other professional games know instantly … any ideas or help