Tetris: Block Deletion (solved)

Get help using Construct 2

Post » Sat Dec 15, 2012 7:43 am

Hey all!
So. I'm trying to create a tetris-like game. I've got the spawning and the collision down. The thing I'm having the biggest trouble with now, though, is that I have absolutely no idea how to handle detecting if a row is full, and then deleting that row and causing the other pieces to fall.

What I've tried so far is set up "detector" sprites in each 32-pixel tall row, and have them count the number of non-falling sprites. There's ten rows, so when it reaches ten, I tried having it delete the row, and make all of the non-falling sprites become falling sprites, so they would fill in the gap.

Basically, it doesn't seem to be counting correctly, and if I enable the event that deletes blocks, it just goes crazy and deletes all of the blocks.
I don't think I understand unique IDs very well, if that's even the problem. =/

Any help?

Thanks!MadameBerry2012-12-15 09:55:34
B
18
S
5
G
1
Posts: 96
Reputation: 2,680

Post » Sat Dec 15, 2012 9:55 am

Solved. @_@
B
18
S
5
G
1
Posts: 96
Reputation: 2,680

Post » Sun Dec 16, 2012 4:44 am

Running into another problem, trying to detect which row contains the lowest amount of blocks. Any ideas?
B
18
S
5
G
1
Posts: 96
Reputation: 2,680

Post » Mon Dec 17, 2012 2:26 am

Have a look a my tetris example on the arcade:
http://www.scirra.com/arcade/puzzle/1259/tetris
There is a link to the capx under the game. Some bits of isn't working right in the latest release of C2 but in general it works correctly.
B
85
S
27
G
77
Posts: 5,000
Reputation: 53,734

Post » Mon Dec 17, 2012 4:18 am

Thanks!
This was for Ludum Dare, and it's done now, but if I ever decide to go back and improve on it, it'll definitely help.
B
18
S
5
G
1
Posts: 96
Reputation: 2,680

Post » Tue Jul 16, 2013 6:53 pm

@R0J0hound how add in your tetris game, GAME OVER when blocks touch top of screen?
B
100
S
23
G
38
Posts: 1,872
Reputation: 30,610


Return to How do I....?

Who is online

Users browsing this forum: AllanR and 10 guests