kroyee / SpeedBlocks

Fast paced tetris game cloned from Cultris II
GNU Lesser General Public License v3.0
11 stars 7 forks source link

Add sounds for lineclear and block placement #12

Closed chinatsu closed 7 years ago

chinatsu commented 7 years ago

I'm not entirely sure if I've added the function calls to the right functions, but it seems to work as expected during gameplay.

chinatsu commented 7 years ago

Ugh, I realize now that our editors don't indent the same way.. I'll fix that when I wake up

kroyee commented 7 years ago

If you clear a line, is it not better if only one of the sounds are played and not both? If so, you could move both sounds to sendLine function (it's always invoked when a piece is placed) and place it within the existing: if lines.x==0 blockplaced, else if lines.x==1 lineclear.

chinatsu commented 7 years ago

I am under the impression that Cultris II (and the majority of implementations of Tetris I've come across) behave like this, where sounds stack on top of each other. However, I think you raise a point anyway, because if only one sound plays at a time, it would give a little more freedom to the sound design. As such, I moved pieceDrop() where you requested it, but left lineClear() as it is. Moving it into if (lines.x == 1) would make it trigger only when a single line is cleared, after all.

kroyee commented 7 years ago

Excellent!