ejona86 / taus

Tetris - Actually Useful Statistics and other mods

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sometimes garbage is shared between two games

Soljanka opened this issue · comments

ips-files: twoplayer-nextontop-1-4-0.ips (probably doesn't matter, but that's the version I use) & twoplayer-garbage-1-4-0.ips

After playing a couple of two player games I noticed that a player sometimes gets garbage "randomly" at the start of the game, although the other player hasn't even cleared a single line yet. I think that garbage is from the previous game.

I am not completely sure on how to reproduce, but the following steps seem promising:

  • start a two player game with B-Type
  • player 1 finishes the game (i.e. clears 25 lines)
  • while "success" is shown for player 1, player 2 quickly clears a couple of lines with the current piece
  • start a new game; player 1 now gets the garbage from the previous game right as the first pieces have been dropped

Hmm... Those steps to reproduce would point to pendingGarbage or pendingGarbageInactivePlayer not being initialized when the game starts. But that code looks fine. So this will take further investigation.

I can verify there's an issue with garbage initialization. Using NesEm, every time in the same place I get four dark blue zeros 0000 in the upper left corner of player two. They move down for every line player two clears. Once they're down low enough, they can be cleared as normal garbage. However, it makes it mostly unplayable being a pretty severe handicap for Player 2 since it's super easy to hit it when it's at the top causing immediate game-over. I imagine it's likely a bug somewhere in the original code and probably not the fault of the mod, but it would be super cool to have it fixed... it's just not the same without garbage.