by Thanx » Thu Jun 26, 2008 2:44 pm
Here's my idea:
The gameplay is made up of clones, nothing will have to move, each clone has the animations it might need.
Next, you'll need an array, for the gameplay, basically describing where there's a block, where there isn't.
Then for the shapes falling down you need a small array, the size of howmany squares the shape's out of. Each variable in the array contains the position of that square on map. (the cloneindex of the clone showing its animation). Each rotation you'll change thes numbers.
Each step if the space is free under it,you add to the numbers of the shape array the width of the board (that'll give the squares 1 row beneath the ones in the earlier turn.
to check wether there's space beneath, you'll have to use the board's array to help, but that shouldn't be too complicated.
If it reached the bottom, simply refill the shape's array, without changing the filledness of the ealier squares you were working with, to keep the old shape in place.
To check wether a line is full, divide the board into lines. E.g. the board's width is 10, then divide it to 0-9, 10-19, etc. And check wether they're all filled. (Using the board's array).
If a ine were to be filled copy the rows above to the row below, and so on, and the new row should be all open, as you know.
I think that's what has to be done, this is the way I'd do it...
Hope this helped,
Thanx