Coder Social home page Coder Social logo

Premature gameover on line clear about tetris HOT 4 CLOSED

0xjmux avatar 0xjmux commented on June 22, 2024
Premature gameover on line clear

from tetris.

Comments (4)

0xjmux avatar 0xjmux commented on June 22, 2024

Not resolved - similar crash occurred on a 4 row clear in a game a couple minutes ago - see test/files/final-gamestate-4row-clear-premat-gameover.ini

It looks like some weirdness is causing incorrect bit values to show up at the top of the file, which prevents the new piece from moving down - triggering the game over condition. Need to figure out what is causing the corruption in the first place.

from tetris.

0xjmux avatar 0xjmux commented on June 22, 2024
  • possible cause might be clearing lines down to row 31
  • it seems to happen right around when the level increases, so maybe it's the change in level that's doing it?

from tetris.

0xjmux avatar 0xjmux commented on June 22, 2024

Issue possibly fixed in 6a23430, but until i've gone through several rounds of testing trying to break it will leave this open.

from tetris.

0xjmux avatar 0xjmux commented on June 22, 2024

Commit 6a2340 fixed this issue.
As I stated in the commit, the problem and fix were:

* clear_rows modified so it won't try to move rows above the top of the
  board down, which is a possible cause of the premature crash as a
  result of garbage data I've been seeing (Issue https://github.com/0xjmux/tetris/pull/2). Garbage data ends up in the
  first few rows, pieces can't move down into it, they stop falling, and
  then the game_over condition activates.
    * to fix this, added another loop to clear_rows() so that it stops
      once it would start touching the top of the board, and will fill
      rows at the top with BG_COLOR without trying to read OOB

from tetris.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.