Home - g-maxim-u/Fairtris GitHub Wiki

Welcome to the Fairtris wiki.

If you want to download the latest version of the game, go to the releases page, where you will find both the release versions and the full source code for this project. To find out more about what it is and how it works, see the information below as well as the rest of the wiki pages.

 

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 and Linux 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 Direct3D and 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 meta-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!

More detailed information on how to handle the game and its mechanics can be found on specific wiki pages.

 

Compilation and developing

Lazarus 2.0.12 with FPC 3.2.0 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.

 

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:

 

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.