Fairtris — a fair implementation of Classic Tetris®

Thread in 'Other games' started by furious programming, 15 Sep 2021.

  1. What is Fairtris?

    Fairtris is a video game, a clone of the 32-year-old Tetris® game produced by Nintendo for the Famicom and NES consoles, designed for modern Windows systems. Fairtris is not an emulator — it is a full-fledged game, created from scratch in Free Pascal language and with OpenGL support via the SDL library. Thanks to this combination, it is super-fast and ultra-light. This project was initially created as a tool to test various RNG algorithms, but after some time it turned into a complete video game.

    You can download the game here — Fairtris beta 2 (for Windows Vista, 7, 8, 8.1 and 10).

    Also check out the project repository and the rich Fairtris wiki pages. If you want, you can also join a Discord server and take an active part in discussions and testing of the latest version of the game.

    Important features
    • implementation of gameplay mechanics compatible with the Nintendo Tetris® game,
    • extended mechanics with hard-drop and accumulation of soft-drop points,
    • support for EIGHT regional versions of the game, including original NTSC and PAL versions,
    • support for as many as SIX random piece generators, including the classic RNG,
    • the ability to start the game from any level up to the killscreen,
    • the ability to play on a keyboard or any USB controller (with input mapping support),
    • supports window mode and the low-resolution exclusive video mode,
    • support for additional meters, such as TRT, BRN or gain meter,
    • stores the best results for each game region and RNG type,
    • has a pause menu with the ability to quickly restart the game and change settings,
    • shows the game summary screen after each game,
    • support for two themes (minimalistic dark and classic skin),
    • possibility to use it with NestrisChamps and MaxoutClub,
    • it's light and very fast — should run smoothly even on a heavily loaded PC,
    • it is fully portable, no installation required,
    • and many more!
    More detailed information on how to handle the game and its mechanics can be found on wiki pages. If you want, you can also check out the FAQ page where you will find answers to basic questions.

    Last edited: 14 Oct 2021
    sinefuse, K and Muf like this.
  2. New version available for download — Fairtris beta 3

    There were no big changes — only slight fixes for several menu screens, making it easier, for example, to resume and restart the game. I also changed the behavior after pressing the help button. Previously, the window would minimize and the browser help would open, but for some users, the window would not minimize properly when exclusive video mode was active. Therefore, I gave up minimization in favor of switching to windowed mode. I've also added code to open a specific wiki page based on the current scene, so you can get helpful information faster.
  3. The final, stable version has been released — Fairtris

    Final and stable version, implementing all fixes and improvements from the three previous beta versions. The last modification is the rendering of the window just after waiting for the next frame, which better imitates the NMI of the NES console (get input, handle logic, wait for the interrupt and then display the image on the screen).

    This release is designed for 64-bit Windows only (Vista, 7, 8, 8.1, 10 and further).

    End of development

    Fairtris was created mainly to test, in conditions similar to the original NES console, whether the classic Tetris® could be better by implementing a different and better RNG, as well as introducing changes to the gravity system in the PAL region. In one sentence, it allows you to check different variations of the same game and choose what's best for it. Considering the job is done, the development of this game is complete — all plans have been fully realized.

    If there is ever a demand for a PC version to replace the NES consoles, the code for this project can be used to create a worthy successor. In this case, the only need will be to select one or invent fair but challenging RNG and select NTSC region (possibly additionally PAL, if players care about it), implement the correct transition calculation and avoid any bugs in the game mechanics that exist in the original.
  4. I decided to break the compatibility with this Nintendo crap and fix the mechanics to create responsive controls. This will allow the player to focus entirely on stacking, rather than thinking about whether the DAS is charged or not (and if not, what to do to charge it). The original DAS is just as shitty as the controls in Prince of Persia — the player feels like pulling a charcoal cart rather than shifting small pieces.

    The latest version is now available for download — Fairtris

    Repaired DAS

    In the original game, DAS is clunky to use, preventing smooth play at levels 19 and above, which effectively limits the player from maximizing scores. To keep the DAS charged, you need to use the "wall charge" frequently. But wall charge was implemented to make the tucks possible, and using it to load the DAS so you can move piece quickly is nothing more than exploit.

    Therefore, I decided to fix this mechanism so that it does not hinder the player's gameplay. DAS works as in the original, but is additionally fully charged during the "entry delay" if the player is holding the left/right button. Since the player is holding the left/right button before a new piece spawns, it means the player knows where he wants to put the next piece and want to move it as quickly as possible after spawning and should be able to do so.

    This solution makes the controls responsive, but on the other hand, it is backward compatible — the basic technique of playing is still "skill stop", but thanks to the fix, "slow-tap" can be used without fear that it will not be possible to quickly move the next piece.

    Spin buffering

    In the original game, it is possible to make tucks in two ways — either by pressing the left/right button at the right moment (when the piece is on the desired row), or in advance (in a buffered manner). The second method makes it possible to push the piece against a fragment of the stack, and in the first frame of the game, in which the piece is on the desired row, it is automatically slid into the slot. Unfortunately, in the case of spins, their buffering is not implemented.

    In order to make the mechanics consistent and encourage the player to undertake advanced stacking techniques, spin buffering has been implemented. Thanks to this change, it is possible to press the rotation button a little earlier, and the piece will be rotated in the first frame in which it will be possible (similar to the case of tucks).

    Wall kick

    The original game has such poor control mechanics that a piece that is pushed against the stack frame cannot be rotated in certain configurations (because after rotation, a part of the piece would be outside the stack frame). This means that some spins, e.g. allowing you to burn a line in order to prepare for a tetris, are not available at all. For example — "S-spin" on the right edge is possible and often used, but not on the left, and would be very helpful.

    In order to expand the spin pool and give the player more room for maneuver, a basic "wall kick" has been implemented.

    However, the wall kick has been implemented in its basic form, i.e. the piece can only bounce off the walls of the stack and only changes its position horizontally. It is impossible to bounce off the contents of the stack, and the unrealistic, overcomplicated spins and twists, known from modern Tetrises, are also unavailable. Thanks to all of this, the controls are comfortable, intuitive and powerful, giving the player tons of possibilities, while maintaining the classic style (which is important in this case).

    New RNG algorithm

    The last thing added is a new generator — called BALANCED. This generator works very similar to the classic one, however, it prevents droughts by checking drought counters for each type of Tetrimino, and also prevents flooding by keeping a short spawn history.

    The operation of this generator is similar to the classic one, but it is balanced in such a way as not to hinder the gameplay unfairly. The generated sequences are unpredictable, the distribution of pieces does not seek equality, which makes the game challenging. However, on the other hand, it does not prevent the player from stacking perfectly, although only a few (the best stackers in the world) will be able to get to the killscreen without burning a single line.

    IMO, this is the best generator available in Fairtris.
    Last edited: 24 Nov 2021

Share This Page