Posted Tue Mar 24, 2009 4:04 PM
I have an idea on how to make blocks fall. I am not sure if this will work or if it will be too intensive.
Stacker does not have a score. Why can't we use a hidden score as some sort of check digit for dropping blocks?
Here's how my example would work.. let's say we had a 6 x 6 grid (we don't, yours would be much bigger) where every dot on the grid is a playfield pixel. 6 x 6 would mean you'd have 6 horizontal spaces your line can move and 6 tall.
X X X X X X
X X X X X X
X X X X X X
X X X X X X
X X X X X X
X X X X X X
Now let's say you dropped your first piece (the first piece is 3 wide), your grid will now look similar to this:
X X X X X X
X X X X X X
X X X X X X
X X X X X X
X X X X X X
X X - - - X
The -'s are where your piece is dropped.
Now we're going to use the score to define and tell where a piece is placed.
Here is how your grid would look with no pieces dropped:
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
Thus, score = 0.
Here is how your grid would be labeled:
1 2 3 4 5 6
2 3 4 5 6 7
3 4 5 6 7 8
4 5 6 7 8 9
5 6 7 8 9 1
6 7 8 9 1 2
Thus, your piece (3 wide) landed on the bottom row in 891, so if score is 8910, we know there's a 3 piece sitting in the grid spots corresponding to that. If it had been 891 alone, it would have been one row up all the way to the right.. but it can't be just 891 because it needs blocks underneath to hold it up one row, so let's assume it was 891 in the second row and 912 in the bottom row, that's 891 + 912, score = 1803.
Obviously this is just an idea of mine and of course your grid would be much bigger and I haven't totally figured out how to make this work, but maybe it's a start of some sort. Thus, when pieces fall down it just checks the score to see if it can drop part of the line or not.