0

I am creating a tetris-style game in Actionscript 3 while using the flashpunk library. I have everything working except for some of the collision detection that I'm having trouble figuring out. When the blocks fall they don't stack on top of each other. Any thoughts or suggestions?

hRdCoder
  • 579
  • 7
  • 30

1 Answers1

0

Using matrix to describe the game logic.

check : http://wonderfl.net/search?q=tetris

there are a lot of code sample here

YopSolo
  • 165
  • 6
  • How would I implement a matrix array. The only type of collision detection that I know how to do with flashpunk is by using getType() and passing the result of that into an array and then checking each element with either collide() or collideWith(), and that only works with objects as far as I understand it. Is there another way to handle collisions that I'm just not aware of so I can make this work? – hRdCoder Apr 08 '13 at 00:47
  • Never mind my last question I posted above. I tried out the matrix array that you recommended to me and voila! It works beautifully now thanks to you and a little help from this link: http://gamedev.tutsplus.com/tutorials/implementation/implementing-tetris-collision-detection/ – hRdCoder Jun 04 '13 at 02:48