Glad you're liking it, though the input system hasn't received any attention just yet. I've never played Gameboy anything, , but I'm working with a limited color palette, so that aesthetic seemed appropriate. YES. I figured this bit out. The next-piece-display-thingie was activated at times when it wasn't meant to be. That's been resolved in the code, and the fix will show up sometime tonight. No rush tho. Right now I'm tracking down a timing bug, which always show up in my Tetris clones at one point or another, but once I get that and the foundations of the color system done, I'll start a new thread to discuss timing. So don't post any of that stuff here.
glitch: Code: z zz zxx x xx x xx xxxxxxx xxxx xxxxx xxxxxx xxx .......... Z tetromino is about to lock... zz zz xx x xx x xx xxxxxxx xxxx xxxxx xxxxxx xxx .......... Rotated before locking... xx xx xx x xx x xx xxxxxxx xxxx xxxxx xxxxxx xxx .......... Locked in midair. Also, I find the DAS really frustrating.
I've noticed the bug fnord mentioned, but I've also been able to produce other interesting behavior as well. Input is handled strangely during piece lock or entry delay, it seems. After piece lock and before the next piece appears, a piece can be DASed over to the far side of the field and rotated. This can allow for some very fast play as long as it is handled in such a way that will not cause other bugs. Another interesting thing you can do is hold pieces after they have been used. The previously held piece will begin to fall while the current piece is still locking and then reset and be swapped for whatever piece that had been previously used once the entry delay has finished. The piece can then be swapped again. You can apply this to score 2 tetrises off of one I block, for example. After abusing this for a while, I ended up getting "double placements." A piece would hard drop, clear a line, and then occupy the same space again. A single piece being hard dropped could also produce something like this: Code: z zz zz z I've also managed to get the wrong piece to lock. Mystery I blocks appear in the field from time to time. I'm not really sure what is happening, though. EDIT: I take that back about mystery pieces. The mystery piece thing was my misinterpretation of the double locking problem. You have active control of a piece for the duration of the delay of any lines cleared by the double lock glitch. After that, the piece in play is removed from play. Combining multiple bugs may allow you to clear more than 4 lines with one piece entry. I'm not sure what causes the double locking behavior, but it seems to be exhibited fairly consistently with every piece for the rest of the game after it has begun. If it stops, however, it tends to stay stopped. EDIT2: It is also useful to note that input handled during the entry delay of a piece that cleared a line will control the current piece and input handled during the entry delay of a piece that did not clear a line will control the next piece. EDIT3: I forgot to mention that the hold bug destroys the piece in the hold box, allowing you to use it to strategically destroy unwanted blocks. Since it is in play during the line clear, it is removed from play when the next piece is spawned. On a somewhat related note, the hold during a line clear will prevent the double lock bug from occurring rather than cause the wrong block to lock. EDIT4: Just now I caused the wrong piece to be displayed in the hold box. I'm not precisely sure how I did that, but it was something along the lines of "mash the hold button any time a block does anything." EDIT5: I can confirm that the hold bug does allow 2 piece locks with one deal/entry. My other theory was that the entry of the held block was superficial, but I have been able to get 5-8 line clears. I promise this will be the last edit, haha. EDIT6: I lied about that being the last edit. Part of Edit 3 is incorrect. I was able to do the hold trick for an 8 line clear and leave double lock artifacts. The artifacts only applied to the piece that had been introduced into the well by the hold, however. If the stack was high enough, this would have resulted in a 12 line clear. Instead, I was left with an I block artifact floating in the middle of the well. Apparently I had reached a point in the game where lock delay was less than the line clear animation. I also feel it is worth mentioning that this occurred very early in the game since the game speed had been maintained from the past game played. EDIT7: DASing a piece during the entry delay seems to allow you to avoid topping out if the original orientation would cause this. I'm not sure what happens if the piece overlaps something as a result of shifting it during entry delay. (Last edit, I swear! By swear I mean hope, of course.)
Yeah, I noticed a few of these bugs last night, and have tried fixing them. Locking in midair is no longer possible, and I torched that piece-doubling bug this morning. "I nuked 'em till they glowed, then shot 'em in the dark!" I can't replicate any problem you're experiencing with the hold piece, but maybe it's gone; I just updated the one online, so maybe try triggering it again. ALSO: I'll be in a low-Internet area for a few hours. I might not start the DAS/key input/timing thread till later tonight.
Pieces are no longer committed to the well twice, but I'm still able to lock pieces in mid-air. I haven't tried to do a just shift lock yet, but line clear just rotate still works like a charm. It seems that the piece is committed to the stack, allowed to be controlled during the line clear animation, clear lines, and be committed to the stack again in its new orientation. I also mentioned just shift locking. I've only been able to produce this once on the previous version, but I was able to shift a piece in the same frame that it locked and have it lock in a position that would have allowed it to fall another row. The hold bug still exists. Keep in mind it only works during line clears. If it is used at any other time, it will affect the next block entering the well instead. During a line clear, the player still has active control over the current piece. This control allows them to swap for a piece already committed to the stack. Try hard dropping a block into a position that will clear lines, swapping for the block in hold, and hard dropping again. If you acted quickly enough, the second block should be committed to the well as well as the first block. Any lines that would result from the commit of the second block also go through. When the next block enters, the block that you swapped for will be held. If you hold an I, you can perform this trick to clear 8 lines every time a new I is dealt.
I just found and fixed a bug that probably caused these problems. Let me know if any persist, including locking in air. The update will be online in just a minute.
It is very close to correct now. The hold bug no longer allows two pieces to be committed in one deal. What it does do is a little trickier to identify. Currently shift and rotation input after a piece locks will affect the next piece. (I'm still not sure you intended the player to be able to move pieces during entry delay, but that can be addressed later.) Applying hold during entry delay halfway affects the next piece. If you hard drop a piece and apply hold, the next piece dealt will always been the same as the one you just locked. The piece that was going to be next will instead be stored in the hold. The piece that was in it previously is entirely removed from play. The preview advances as it should, but we are given the previous piece instead of the piece that was in the hold box. The locked piece is swapped for the one in hold, but the hold piece does not enter. Two pieces will no longer enter from a single deal, but a swap is still being made even though the piece is committed to the well. This behavior is incorrect. Since input entered after a piece is locked is intended to affect the next piece, the swap will occur once the next piece enters. This behavior is correct. The end result is the duplication of the previous piece. The player cannot indefinitely duplicate one piece, since the process uses up the hold swap of the next piece. If the player has already used up their hold swap for that deal, inputting a hold during entry delay will work as intended since it can only affect the next piece and not the current one. Essentially, two swaps are occurring sequentially. This duplicates the piece that was just locked. Although a piece cannot spawn after it has locked, it can still be swapped out.
Aha! Found it. Fixed it. And yes, shifts to the left and right, holds, and rotations are "recorded" during game inactivity (while the game is playing) and are "played back" once a new piece shows up. But the input system, again, hasn't received my attention yet. New update in a minute. I appreciate this, these bugs are a pain to find after you add several features. EDIT: Nuts still broken! I can reproduce the issue now, though, so I can debug it a little better. I'll keep you posted. EDIT 2: Maybe it's gone? This one's tough to track down.