I'm finally ready to present you the second version of my #Orca #Tetris patch.
- Controls are much more responsive now, no delay felt at all
- Type and orientation of the piece is always monitored to prevent it from going out of the field
- Line deletion is bug free now. It scans every line after every placed piece and clears the filled ones one by one
- Overall while being much more complex, the code takes up much less space
This is definitely the most complex thing I made in Orca.
Here are some details on how lines are cleared.
After the piece is placed, the game stops, then:
1) every line gets scanned and numbers of filled lines are going to that upside down pyramid
2) The pyramid outputs the least line number and line is being cleared
3) X operands that hold #, decreases it's offset to gradually uncomment every line above so S operands falls down naturally.
4) scanning happens again, loop is repeated on until there are no filled lines. And the game continues.
And well I think controls is very cool part of the patch. It's very simple. Just a chain of I(F)'s looped by (O)ffset.
So you place a character in the output of bottom F, it gets read by offset and (V)ariable operands and instantly erased.
Then assign different actions based on the character coming from the variable.
I'm not very good at explaining things (also the character limit), but #Orca -people should understand