Skip to content

Clone of the official classic Tetris® game for the NES console, intended for Windows systems. It implements the original mechanics and includes many regional versions and several RNGs (all in one executable).

License

chronoscz/Fairtris

Repository files navigation

This is Linux port of this game https://github.com/furious-programming/Fairtris. It is released as Ubuntu snap https://snapcraft.io/fairtris


Fair implementation of Classic Tetris®
Copyleft 2021-2022 furious programming. All rights reversed.


PC clone of the official classic Nintendo Tetris® game for the NES console, intended for Windows systems. It implements and slightly extends the original mechanics, supports two themes and includes many regional versions and several random piece generators. All in one native executable.

Ready to play like a true master? Download the game and show off!



Compilation and developing

Lazarus 2.0.12 was used to compile and work on the code, so you should use that as well (or a newer version if available). The headers for SDL2 are in the source\sdl\ subdirectory, while the .dll libraries are in the bin\ folder, where the executable file is created after compilation. So all you need to do is just open the project in Lazarus and hit the compile button.

If you are using Free Pascal IDE or regular text editor such as Notepad++ or Vim, be sure to somehow add the SDL units path in the project settings and well... keep torturing yourself.


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 (using the Lazarus IDE) 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 and rich video game that provides lots of fun. However, since Tetris® is a proprietary brand to which The Tetris Company is entitled, Fairtris is not a product — it is a knowledge base for those who would like to know more about the internal mechanisms of the classic version of this game.


Important features

  • implementation of gameplay mechanics compatible with the Nintendo Tetris® game,
  • DAS mechanics fixed and spin buffering added, making the controls fabulously responsive,
  • extended mechanics with basic wall kick, hard-drop and multi-spawn soft-drop,
  • support for EIGHT regional versions of the game, including original NTSC and PAL versions,
  • support for as many as SEVEN random piece generators, including the classic RNG,
  • support for free marathon and speedrun modes, qualifications and matches with same piece set,
  • 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 exclusive video mode,
  • support for additional meters, such as TRT, BRN, as well as gain popup,
  • 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!

Table of content

General:

Game screens:

Game specifics:

More help:

Click on one of the links above to go to the project wiki. If you want, you can also check out the FAQ page where you will find answers to basic questions.


License

Information on the license can be found in the LICENSE file. In general, this project is completely free, you can use it for whatever purpose you want, both the entire game and parts of it. So play, share, fork, modify — do what you want, I don't give a shit about it.


Bindings

Fairtris mainly targets 64-bit Windows systems, versions Vista, 7, 8, 8.1, 10 and 11. In the future, its clones for other platforms may appear — if someone decides to fork this repository and modify the game source code. Currently available releases:


Acknowledgments and useful links

During the development of the game, and in particular during the reconstruction of the original Nintendo Tetris® mechanics and the CLASSIC random piece generator used in it, I relied heavily on the knowledge contained in the article Applying Artificial Intelligence to Nintendo Tetris and the source code from the TetrisNESDisasm repository. In addition, the TMG and TGM TERROR generators was implemented based on the The history of Tetris randomizers article. Huge thanks the authors of these materials for sharing their valuable knowledge.

To test some of the behavior of the original game, I used the FCEUX emulator and some modified ROMs which was also very helpful. Thanks are also due to the authors of the NestrisChamps and MaxoutClub tools, thanks to which it is possible to use Fairtris for an online competitive game. Many thanks to the authors of Lazarus, the SDL2 headers and the SDL library. These tools allowed for the convenient creation of the Fairtris in a light and super-fast form.

The last dose of thanks goes to the Polish community putting a lot of work into the development of the Polish (and not only) classic Tetris scene, focused on the Classic Tetris Polska server on Discord. Thanks are also due to the 4programmers.net and Free Pascal community for testing the game and feedback.

About

Clone of the official classic Tetris® game for the NES console, intended for Windows systems. It implements the original mechanics and includes many regional versions and several RNGs (all in one executable).

Resources

License

Stars

Watchers

Forks

Packages

No packages published