1 decade ago by Bitbot
I've been playing around with impact JS and I managed to get a simple board with some blocks that fall down tetris-style:
http://alpha.exerpg.com/minigames/
Right now I'm clearing blocks in collideWith, but I'm not sure how to get all the blocks in a column to shift down once a block is cleared. Each block is an instance of an entity called Brick.
I could assign each block a group based on the column, and then select/move blocks by group, but that seems slow. Is there a better way to do it?
http://alpha.exerpg.com/minigames/
Right now I'm clearing blocks in collideWith, but I'm not sure how to get all the blocks in a column to shift down once a block is cleared. Each block is an instance of an entity called Brick.
I could assign each block a group based on the column, and then select/move blocks by group, but that seems slow. Is there a better way to do it?