Lazarus

Programming => Graphics and Multimedia => Games => Topic started by: furious programming on September 08, 2021, 09:21:17 pm

Title: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on September 08, 2021, 09:21:17 pm
What is Fairtris?

Fairtris is a video game, a clone of the 32-year-old Tetris® (https://en.wikipedia.org/wiki/Tetris_(NES_video_game)) game produced by Nintendo (https://www.nintendo.com) for the Famicom (https://en.wikipedia.org/wiki/Nintendo_Entertainment_System) and NES (https://en.wikipedia.org/wiki/Nintendo_Entertainment_System) 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 (https://www.libsdl.org/). 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.

You can download the game here — Fairtris 2.0.0.5 beta 2 (https://github.com/furious-programming/Fairtris/releases/download/v2.0.0.5-beta.2/fairtris_2.0_beta_2_release.zip) (for Windows Vista, 7, 8, 8.1 and 10).

Also check out the project repository (https://github.com/furious-programming/Fairtris) and the rich Fairtris wiki (https://github.com/furious-programming/Fairtris/wiki) pages. If you want, you can also join a Discord server (https://discord.gg/qQRfEDcTrY) and take an active part in discussions and testing of the latest version of the game.


Important features:

More detailed information on how to handle the game and its mechanics can be found on wiki pages (https://github.com/furious-programming/Fairtris/wiki). If you want, you can also check out the FAQ (https://github.com/furious-programming/Fairtris/wiki/faq) page where you will find answers to basic questions. Information on the license can be found in the LICENSE (https://github.com/furious-programming/Fairtris/blob/master/LICENSE) file. In short, it is entirely copylefted, so you can do what you want.

Considering the fact that the source code was not written from the beginning with the idea of creating a full-fledged game, its quality is not the best. It is true that I tried to write it so as not to get lost in it, but some things (especially menu operation) I solved using copy-paste. However, the most important thing is that the game works properly and, above all, very effectively.

If they are willing to test the current Windows version of the game, please give me some tests and feedback. If there is anyone here willing to fork the repository and prepare a port for Linux, FreeBSD, and macOS, I encourage you to do so. I'm not able to create them myself, because I don't know Linux and I don't have access to a device with macOS.

This game was created mainly to test various RNG algorithms and I didn't think about turning it into a full-fledged form, or about its continuous development. Therefore, please don't send pull requests to extend the game's functionality, only to fix bugs. If someone would like to port to other platforms, I suggest forking the repository and developing it separately. If it appears, I will put a link to the repository in the readme (https://github.com/furious-programming/Fairtris#bindings) of my project.

So, have fun! 8)
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on September 08, 2021, 11:34:33 pm
Игре Тетрис уже 37 лет.

translate: The Tetris game is already 37 years old.  8-)
Tetris eng (https://en.wikipedia.org/wiki/Tetris) или Tetris rus (https://ru.wikipedia.org/wiki/Тетрис)
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on September 09, 2021, 12:15:46 am
translate: The Tetris game is already 37 years old.  8-)

The first version for Electronika 60 computer was created in 1984, not for NES consoles.

By the way, the NES version was created in 1989, so it has 32 years old. So it needs to be corrected anyway.  8)
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on September 15, 2021, 11:21:39 pm
Will I have people willing to test the game here?

Would you like to join and create a port to other platforms? It doesn't require a lot of work — the core game mechanics and all menus are not platform specific. All you have to do is to remove the code for updating the button on the taskbar, make a few small corrections and just check how the game works on e.g. Linux or macOS. The game is based on the base classes and SDL, and this one is cross-platform. I can help if something is not understood.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Soner on September 15, 2021, 11:40:57 pm

nice.

When I press help button then screen resolution change and fairtress is very small image on the top left edge. Look picture 1.
And when I press help button again then fairtress is going to windowed mode. Look picture 2.

Lazarus 2.0.11, fpc 3.2.1 Win64.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Blade on September 16, 2021, 12:31:38 am

...If there is anyone here willing to fork the repository and prepare a port for Linux, FreeBSD, and macOS, I encourage you to do so. I'm not able to create them myself, because I don't know Linux and I don't have access to a device with macOS...

...If someone would like to port to other platforms, I suggest forking the repository and developing it separately...

When it comes to forking, I think it would be more interesting and something different, if someone could port it to iOS/iPhone.  In theory, it should be possible to use the SDL Library and the Free Pascal compiler.  This is an area where Free Pascal/Lazarus has very few examples, especially anything recent.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on September 16, 2021, 12:50:50 pm
When I press help button then screen resolution change and fairtress is very small image on the top left edge. Look picture 1.

If you press the help button (i.e. F1 key) or select HELP from the main menu, the game window is minimized and the GitHub wiki opens in your browser. If video mode is active, after selecting HELP, video mode should be deactivated, resolution restored and the window minimized. It should look like the window shouldn't be visible, just a taskbar button.

The code that supports the help looks like this:

Code: Pascal  [Select][+][-]
  1. procedure TLogic.OpenHelp();
  2. begin
  3.   Sounds.PlaySound(SOUND_START);
  4.  
  5.   ShellExecute(0, 'open', 'https://github.com/furious-programming/fairtris/wiki', nil, nil, SW_SHOWNORMAL);
  6.   SDL_MinimizeWindow(Window.Window);
  7. end;

The last two instructions definitely need to be swapped, though on my computer the window always minimizes and restores properly. Although instead of minimizing the window, it is better to check if video mode is active and if so, turn on windowed mode, and if not, just open help in the browser (without any window manipulation). Video and windowed mode are quite hard to master. I'll try to fix it — thanks for tests.

How does the game behave after pressing F11? Video mode turns on and off well?


When it comes to forking, I think it would be more interesting and something different, if someone could port it to iOS/iPhone.

I can not see it. Even if technically possible, classic Tetris is too hard to play on a touchscreen. Note that, unlike modern, it doesn't support wall-kicks or sliding pieces when touch the stack. If the piece touches the stack, it's over — it sticks to it, and a new one appears at the top of the playing field. This is a clone of the console-only game, that's why today players only play it using the controllers (NES controllers and emulators on PC), and who doesn't have controller, play on a keyboard. Precise control is very important in this case, especially at levels 18+.

On the other hand, I've played modern Tetris for smartphones a couple of times and don't get it. I don't understand how anyone can play by touching the screen instead of pressing physical buttons. For me, the touch screen is not a device intended for gaming, it is useless on this topic. But that's just my opinion, I grew up on NES myself, I always played using the controllers, and as a last resort the keyboard. 8)
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Soner on September 16, 2021, 06:02:28 pm
F11 ist okay, It does what it is supposed to do, switching windowed mode and fullscreen.
I put SDL_MinimizeWindow above ShellExecute. Now, when I press first help button it is working normal. But when I press it again then you can see black small window on the top left edge.

Maybe you should use OpenURL (https://wiki.freepascal.org/OpenURL) instead of ShellExecute when you want to release it on other systems than Windows.

If you are a fan of classic arcade games then check out this page (https://www.lexaloffle.com/pico-8.php).
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on September 16, 2021, 09:08:09 pm
I put SDL_MinimizeWindow above ShellExecute. Now, when I press first help button it is working normal. But when I press it again then you can see black small window on the top left edge.

Currently, there is no condition in the code to check if the video mode is active, or if the window is already minimized. This code must be secured anyway so that it doesn't try to minimize twice. But the window does not have to be minimized - it is enough to deactivate the video mode, because the browser should appear above the game window anyway.

I checked this, added a condition to disable video mode instead of minimizing, but the window appears in the top left corner of the screen instead of in the middle of it (or where it was before). Once again, there is a problem with setting the size and position of the window — SDL ignores these instructions and doesn't change anything, so the window is in a corner and has the wrong size.

Handling the help with modifications should look like this:

Code: Pascal  [Select][+][-]
  1. procedure TLogic.OpenHelp();
  2. begin
  3.   Sounds.PlaySound(SOUND_START);
  4.  
  5.   if Placement.VideoEnabled then
  6.     Placement.ToggleVideoMode();
  7.  
  8.   ShellExecute(0, 'open', 'https://github.com/furious-programming/fairtris/wiki', nil, nil, SW_SHOWNORMAL);
  9. end;

This works as it is supposed to, which is to disable video mode and open help in the browser. But damn it doesn't want to change the size and position of the window. It doesn't want to do this even though the Placement.ToggleVideoMode method is being used for the F11 key and always works fine. And here it does half the job.

ShellExecute is the problem here — when I comment it out, everything works fine. WTF.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on September 16, 2021, 09:20:50 pm
Ok, I found a temporary solution — call ShellExecute in a separate thread. In this case, the video mode deactivates correctly, the window receives the correct dimensions and position, and the browser help opens. Stupid, but it works. So not stupid.

@Soner: if you have a minute, please test the fresh sources and let me know how it works now.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Soner on September 19, 2021, 09:25:19 am
It is okay now. It is doing what you describe abow.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on September 19, 2021, 02:56:32 pm
Ok, thank you very much for testing and feedback. Anyone else found any problems?
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on September 23, 2021, 05:47:43 pm
New version available for download — Fairtris 2.0.0.6 beta 3 (https://github.com/furious-programming/Fairtris/releases/tag/v2.0.0.6-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.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on October 14, 2021, 06:16:12 pm
The final, stable version has been released — Fairtris 2.0.0.7 (https://github.com/furious-programming/Fairtris/releases/tag/v2.0.0.7)

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).

If there is anyone willing to port the project to platforms other than Windows, I still encourage you.

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.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on November 19, 2021, 09:41:27 pm
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 2.2.0.1 (https://github.com/furious-programming/Fairtris/releases/tag/v2.2.0.1)


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 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 "rub" 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 (https://github.com/furious-programming/Fairtris/wiki/rng-algorithms#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.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Josh on November 19, 2021, 10:08:17 pm
hi

slight problem acronis security guard is reporting the following, when it is re-run.
not schecked but as its ini files, it would appear as though all are being modified on startup, causin it to fire.

checked with malwarebytes and virustotal all ok

Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on November 20, 2021, 12:18:09 am
Thanks for feedback.

slight problem acronis security guard is reporting the following, when it is re-run.
not schecked but as its ini files, it would appear as though all are being modified on startup, causin it to fire.

IMO this is a ordinary false-positive — there is no reason to consider this game's files as a threat. The game is clean and contains no malware. If you would like to, you can download the sources and compile yourself, and check everything for security — the sources are open. 8)
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on December 05, 2021, 12:43:12 am
New version available to download — Fairtris 2.3.0.1 (https://github.com/furious-programming/Fairtris/releases/download/v2.3.0.1/fairtris_2.3_release.zip)


Video mode and multi-screen support improved

This version introduces fixes related to video mode support, its resolution and aspect ratio. From now on, the video mode is always launched on the main screen and always in the current resolution (forcing to use 800×600 resolution for video mode has been removed). Additionally, unlike the previous version, regardless of the mode, the game image is always rendered in 4:3 aspect ratio, so it always looks correct, regardless of resolution and display mode.

Disabling the video mode has also changed. Previously, the window position was restored in this case, and in the latest version the window is always centered on the main screen. The windowed mode has not changed — it is still possible to move the window to any screen, as well as use the windowed full-screen mode also on any screen and with any resolution.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Roland57 on December 05, 2021, 08:08:57 am
Very nice project. Thank you for sharing.

I tried a quick and dirty adaptation for Linux: commented out the Windows specific code, replaced directory separator in files path. Now I get an "invalid floating point operation" immediately after application start. Maybe a division by zero, because of the code removed, but I have not yet found where.

I tried to replace 0 with 1 in Fairtris.Clock.pp, but the error still occurs.

Code: Pascal  [Select][+][-]
  1. function TClock.GetCounterFrequency(): Int64;
  2. begin
  3.   Result := {0}1;
  4.   //QueryPerformanceFrequency(Result);
  5. end;
  6.  
  7.  
  8. function TClock.GetCounterValue(): Int64;
  9. begin
  10.   Result := {0}1;
  11.   //QueryPerformanceCounter(Result);
  12. end;

I cannot use the terminal for debugging, because of the fullscreen mode.

When I have time, I will make another more serious attempt.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on December 05, 2021, 06:26:43 pm
For Linux and other Unix platforms, a slightly different approach should be used. QueryPerformanceFrequency and QueryPerformanceCounter do not exist on these platforms, so you need to use e.g. other functions. The class of this clock was taken from the Deep Platformer (https://forum.lazarus.freepascal.org/index.php/topic,44908.0.html) project — in this project the clock class is adapted to Linux. These functions look like this:

Code: Pascal  [Select][+][-]
  1. // from the Deep Platformer sources
  2.  
  3. function TClock.GetCounterFrequency(): Int64;
  4. begin
  5.   {$IFDEF WINDOWS}
  6.   Result := 0;
  7.   QueryPerformanceFrequency(Result);
  8.   {$ELSE}
  9.   Result := 1000000000;
  10.   {$ENDIF}
  11. end;
  12.  
  13. function TClock.GetCounterValue(): Int64;
  14. {$IFDEF UNIX}
  15. var
  16.   Counter: TTimeVal;
  17. {$ENDIF}
  18. begin
  19.   {$IFDEF WINDOWS}
  20.   Result := 0;
  21.   QueryPerformanceCounter(Result);
  22.   {$ELSE}
  23.   FPGetTimeOfDay(@Counter, nil);
  24.   Result := Int64(Counter.tv_sec) * 1000000000 + Int64(Counter.tv_usec) * 1000;
  25.   {$ENDIF}
  26. end;

In the thread hold method, the number of nanoseconds is calculated and the thread is frozen using the FPNanoSleep function. In the case of Unix, busy waiting is not needed, because FPNanoSleep supports precision down to a nanosecond (actually a microsecond, but that's enough), while under Windows, Sleep has only a millisecond precision, which is not enough — that's why busy waiting is used additionally:

Code: Pascal  [Select][+][-]
  1. // from the Deep Platformer sources
  2.  
  3. procedure TClock.WaitForNMI();
  4. var
  5.   {$IFDEF WINDOWS}
  6.   SleepTime: Single;
  7.   {$ELSE}
  8.   SleepTime: Int64;
  9.   RequestedTime, RemainingTime: TTimeSpec;
  10.   {$ENDIF}
  11. begin
  12.   if not Machine.Stopped then
  13.   begin
  14.     {$IFDEF WINDOWS}
  15.     if not FPrecise then
  16.     begin
  17.       SleepTime := 1000 / FFrameRateLimit * (1 - (FFrameTicksEnd - FFrameTicksBegin) / FTicksPerFrame) - 1;
  18.       SleepTime -= Ord(Round(SleepTime) > SleepTime);
  19.       SleepTime := Max(SleepTime, 0);
  20.  
  21.       Sleep(Round(SleepTime));
  22.     end;
  23.  
  24.     while GetCounterValue() < FFrameTicksNext do ;
  25.     {$ELSE}
  26.     SleepTime := FFrameTicksBegin + FTicksPerFrame - FFrameTicksEnd;
  27.  
  28.     if SleepTime > 0 then
  29.     begin
  30.       RemainingTime.tv_sec := SleepTime div 1000000000;
  31.       RemainingTime.tv_nsec := SleepTime mod 1000000000;
  32.  
  33.       repeat
  34.         RequestedTime := RemainingTime;
  35.  
  36.         if FPNanoSleep(@RequestedTime, @RemainingTime) = 0 then Exit;
  37.         if FPGetErrNo() <> ESysEINTR then Exit;
  38.       until False;
  39.     end;
  40.     {$ENDIF}
  41.   end
  42.   else
  43.     Sleep(50);
  44. end;

When using SDL under Windows, the Sleep function does not suspend the thread's work (I don't know why), so the specified number of milliseconds is frozen by the SDL_Delay function, which also has millisecond precision. The remainder is waited with busy waiting, calling the assembly pause instruction in loop:

Code: Pascal  [Select][+][-]
  1. // from the Fairtris sources
  2.  
  3. procedure TClock.UpdateFrameAlign();
  4. var
  5.   SleepTime: Single;
  6. begin
  7.   // calculating the number of milliseconds
  8.   SleepTime := 1000 / FFrameRateLimit * (1 - (FFrameTicksEnd - FFrameTicksBegin) / FTicksPerFrame) - 1;
  9.   SleepTime -= Ord(Round(SleepTime) > SleepTime);
  10.   SleepTime := Max(SleepTime, 0);
  11.  
  12.   // suspending the thread's work for a given number of milliseconds
  13.   SDL_Delay(Round(SleepTime));
  14.  
  15.   // suspending the thread's work for the remaining number of nanoseconds (busy waiting)
  16.   while GetCounterValue() < FFrameTicksNext do
  17.   asm
  18.     pause
  19.   end;
  20. end;

So, to make the clock compatible with Linux, you just need to use the fixed value 1,000,000,000 as the number of ticks of the clock (ticks per one second) and find the current time with high precision using the FPGetTimeOfDay function and simple calculations as I showed in the first code snippet.

However, to suspend the work of the thread for a given amount of time (a few or several milliseconds and the microsecond part), use the above code, i.e. simple calculations and the FPNanoSleep function in a loop. If the FPNanoSleep function will not stop the thread (like Sleep in Windows), then do the same as in Windows — calculate the millisecond part and freeze the thread with SDL_Delay, and eat the remaining (microsecond) part with busy waiting (loop checking the current number of ticks and the pause command).

So, probably the only thing that needs to be changed in the Fairtris code is the contents of the GetCounterFrequency and GetCounterValue methods, using the code taken from the clock in the Deep Platformer game. The UpdateFrameAlign method will most likely not need to be changed. And if FPNanoSleep can freeze the thread, then it should be used to avoid busy waiting and save even more computing power.



I cannot use the terminal for debugging, because of the fullscreen mode.

If you need the game not to use the exclusive video mode, just open the bin\settings.ini file and change its value:

Code: INI  [Select][+][-]
  1. [VIDEO]
  2. ENABLED=1 ; set "0" to disable video mode
  3.  
  4. [GENERAL]
  5. MONITOR=0
  6. LEFT=0
  7. TOP=0
  8. INPUT=0
  9. WINDOW=2
  10. THEME=0
  11. SOUNDS=0
  12. SCROLL=0
  13. REGION=0
  14. RNG=0
  15. LEVEL=0
  16.  
  17. ; ...

Additionally, you can change the initial window size by changing the WINDOW value to something else — 0 is the smallest window; 1, 2 and 3 are zoomed windows; and 4 is full screen in windowed mode (without exclusive video mode). The default value is 2, which is Zoom 3x (878×720 pixels).

Exclusive video mode can be toggled with the F11 key, while other options can be modified in the in-game settings screen (https://github.com/furious-programming/Fairtris/wiki/game-options) and gameplay settings screen (https://github.com/furious-programming/Fairtris/wiki/set-up-game) (and also using the mouse). It is not necessary to manually modify the contents of the configuration file.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Roland57 on December 05, 2021, 08:41:03 pm
@furious programming

Thank you for the detailed answer.

So, probably the only thing that needs to be changed in the Fairtris code is the contents of the GetCounterFrequency and GetCounterValue methods, using the code taken from the clock in the Deep Platformer game.

Yes, it works. :)

And if FPNanoSleep can freeze the thread, then it should be used to avoid busy waiting and save even more computing power.

No idea about that.

If you need the game not to use the exclusive video mode, just open the bin\settings.ini file and change its value:

OK, thank you.

It's great to have such a well written project using SDL2. Very good job!

Regards.

Roland

Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on December 06, 2021, 12:37:12 am
This project was created to check what classic Tetris would look like if all the problems were fixed, and also to learn how to create games using SDL library. I think SDL is a great library, lightweight, easy to use and very efficient, so it's worth using, especially in conjunction with headers for Free Pascal and Lazarus IDE. I'm glad that you like it. 8)

The knowledge gained while creating Fairtris will be the foundation for my big game, which I intend to create in the coming years — with Free Pascal, of course. And for those who want to know more, this project provides a pretty good knowledge base and a collection of practical examples.

Not everything is done properly (some copy-paste, no comments etc) but it's just a fun project. Besides, this game works the same as the NES console (the core game logic was translated directly from the assembler), and this approach is unlikely to be used in PC games. So this game should not be considered a foundation for modern games.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Roland57 on December 07, 2021, 08:57:07 pm
@furious programming

I don't want to tell you what you have to do, but why don't you include in the source code the modifications for Linux compatibility?

P.-S. Announced Fairtris on French-speaking Lazarus forum (https://www.developpez.net/forums/d2122844/autres-langages/pascal/lazarus/telechargez/fairtris/).
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on December 08, 2021, 01:24:07 am
I don't want to tell you what you have to do, but why don't you include in the source code the modifications for Linux compatibility?

Because I don't know Linux at all and I don't use it, so I don't add to the source code the operation of which I have no way to check. So I'm doing the Windows version myself, and if there's someone who knows and uses Linux, they can create a fork, remove the Windows-related code, and develop the version for other platforms separately.

Quote
P.-S. Announced Fairtris on French-speaking Lazarus forum (https://www.developpez.net/forums/d2122844/autres-langages/pascal/lazarus/telechargez/fairtris/).

Nice!
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on December 12, 2021, 10:34:01 pm
Yet another version is released — Fairtris 2.3.1.2 (https://github.com/furious-programming/Fairtris/releases/download/v2.3.1.2/fairtris_2.3.1_release.zip)

In this version the only change is the improved SDL subsystem initialization, so that Fairtris only uses initialization of the required SDL modules (video, audio, joystick and events). This prevents the problem with initialization of the "sensor manager" module, which occurs on some computers.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on December 28, 2021, 04:36:59 pm
I am preparing a new, third version of the game — all because in the coming weeks we want to organize an online tournament in Fairtris between the league seasons. And to be able to play matches under fair conditions, I need to provide both players with the same set of pieces, and to provide it, I need to add the option to enter seed for RNG to the game.

That's why I decided to add a new menu and give you the option to choose the game mode. The single-player mode remains unchanged, but in addition there will be a qualification and match mode for the tournament on points, as well as a qualification and match mode for the tournament in speedrun. I already have the mode selection menu programmed (first attachment).

The single "single player" scene menu hasn't changed, and the other four will look like on the second attachment.

For qualifications, you will be able to set a countdown timer, while for a tournament match you will be able to type the seed for pieces generator, which is usually drawn using a tetris-bot in the Twitch chat. The game interface for the gameplay scene will be properly prepared for these modes to display the current speedrun timer, etc. See the third attachment — on the left a match for points, on the right a speedrun match.

The core of the game remains one and it will be used regardless of the selected mode — all I need to do is add an additional code to it, which will take into account the time calculation, add a "kill-screen" at the 19 level for speedrun etc. In addition, the renderers will slightly expand so that they paint additional data. The new version should be ready this year.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 07, 2022, 10:25:27 pm
And finally there is a fresh version — Fairtris 3.0.0.2 beta (https://github.com/furious-programming/Fairtris/releases/tag/v3.0.0.2-beta) 8)

The main novelty in this version is the expansion of the game modes from one to six. Now the game is divided into two main categories — a marathon, the aim of which is to collect as many points as possible, and speedrun, in which you should reach the level 0 to 19 as quickly as possible (i.e. clear 190 lines) in no more than ten minutes.

In addition, the marathon and speedrun qualification mode has also been implemented, which allows you to set a qualifications timer (the counter is visible during the game and in several menus). In addition to qualifying, there is also a match mode, in which the generator seed is set in order to have the same set of pieces for both players, so that the duel is fair. Seed can be entered manually from the keyboard or generate a random one (you can also copy it to the system clipboard and paste from it, using standard keyboard shortcuts).

All results are collected in two main lists (marathon scores and speedrun times), regardless of the game mode selected (casual play, qualifying or match). Additionally, the game has temporary lists for qualifiers and matches to make it easier to show how qualifying was done and how the effectiveness of match games looked like.

A completely new thing is the ability to choose the control mechanics — modern mechanics are default, characterized by high responsiveness and greater possibilities, as well as classic, in line with the original mechanics from Tetris for the NES console. Generator performance has also been improved, rendering of some menus has been improved, and some new sounds have been added.

The full functionality of the new version of Fairtris is described in the project wiki (https://github.com/furious-programming/Fairtris/wiki).
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: lainz on January 07, 2022, 11:17:53 pm
Thanks, very good game.

I just did a change on the default configuration, switched the up key with the b key, so I can play with only one hand, like in the tetris for facebook game.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 08, 2022, 04:10:29 pm
This is what the keyboard mapping screen is for, so that everyone can conveniently set the controls the way they like. Although I suggest playing on the USB controller anyway, preferably with a shape compatible or similar to the NES controller.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 11, 2022, 09:44:54 pm
If anyone wanted to see Fairtris and professional players in action, there was a friendly match a few days ago where Xenophilius faced Mecex. The Mecex had tested the Fairtris before and got used to the timing and did much better because of it—at least when it comes to steering. 8)

Warm-up and free talk:
https://www.twitch.tv/videos/1257311433?t=1h49m3s

Match:
https://www.twitch.tv/videos/1257311433?t=2h1m7s
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Chronos on January 12, 2022, 12:30:37 pm
Fairtris can now run on Linux. You can find Linux fork here: https://github.com/chronoscz/Fairtris

It is also available for various Linux distributions as a snap: https://snapcraft.io/fairtris
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 12, 2022, 05:05:29 pm
Good job! Soon I will update the readme and add a link to your fork and snapcraft. 8)

But this is not the end of work as far as this distribution is concerned. There is no release in your repository and also no cloned wiki. In order for Linux users to have material explaining how to use the game, the wiki must be cloned and its contents changed to remove the information related to Windows and replace it with Linux guidelines (even the About section in your repository still says the game is for Windows).

If you would like and have time in the near future then please update the repository information and also add the wiki. Also add a link to my repository in the Bindings section of the readme.

Thank you very much for the port, I will announce that it exists on the web in a moment. :D
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Chronos on January 13, 2022, 02:54:50 pm
My goal was to try to port your game to Linux and release it into snap store. I don't plan to develop separate different Linux version. So less changes needed, better for the Linux port. You have already stated that you are not interested in maintaining Linux support but still you can consider some multi-platform programming recommendations and merge some of my changes back to your code so Linux fork would need to have less number of changes.

For example to use DirectorySeparator constant instead of Windows directory separator "\". Or use target executable name without .exe extension in project options as it will be added on Windows anyway.
Also you want your game to be distributed simply as zip file which is ok. But for Linux deb packages of snap, there is need to separate read-only application asset files and configuration files. On Linux configuration files and other modifiable data are usually placed in /home/username/.config/appname directory. Also executable file is placed in /usr/bin directory. Yes, it is pretty complicated in comparison for example Windows. But also Windows has Program Files read-only for normal users so at least configuration files needs to be placed in user home directory in C:\users\username\AppData\appname directory on Windows.

One more suggestion. It may be good idea to have predefined keyboard (and controller) mappings. So settings.ini file can be created as a new file during first start. You already have default values for other fields so this should be easy code change. Mappings for keyboard should be pretty standard and user can change it if needed. Also controllers can have different mappings but still one default mapping can be useful.

Anyway, your game is well programmed and thanks to SDL it was easy to port it to Linux. I will merge your future changes into the fork and update snap package. Snap store provides metrics for number of installations so I will watch it to see how many users have the game downloaded.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on January 13, 2022, 04:58:39 pm
translate: The Tetris game is already 37 years old.  8-)

The first version for Electronika 60 computer was created in 1984, not for NES consoles.

By the way, the NES version was created in 1989, so it has 32 years old. So it needs to be corrected anyway.  8)
И Nintendo не имела прав на неё, пока не получили разрешения! Почитайте пожалуйста историю.

Я извиняюсь, но просьба указать на истинную дату появления игры тетрис. :)

Google translate:
And Nintendo didn't have the rights to it until they got permission! Please read history.

furious programming, Chronos - I'm sorry, but please indicate the true date of the appearance of the Tetris game. :)
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 13, 2022, 07:09:40 pm
I don't plan to develop separate different Linux version. So less changes needed, better for the Linux port.

I also have no plans to further support and develop this game, not even for Windows. What is now its final version.

Quote
You have already stated that you are not interested in maintaining Linux support but still you can consider some multi-platform programming recommendations and merge some of my changes back to your code so Linux fork would need to have less number of changes.

If I wanted cross-platform code, I would just write it, instead of asking for a fork and distributing a separate version. But I didn't want to, because I don't have the experience, time and hardware/software to test such code. I preferred to deal with the version intended only for Windows, because I have known and used this environment for 20+ years.

Quote
Also you want your game to be distributed simply as zip file which is ok.

This game was meant to be portable so I didn't make an installer for it. In addition, it was not intended to be a product, but only a tool to test various aspects of Tetris on the NES console. The development of this project has come to an end.

Quote
But for Linux deb packages of snap, there is need to separate read-only application asset files and configuration files. On Linux configuration files and other modifiable data are usually placed in /home/username/.config/appname directory. Also executable file is placed in /usr/bin directory. Yes, it is pretty complicated in comparison for example Windows.

Which is why I don't want to complicate the code for this game and do something that I have no idea about. Better a separate port should be handled by someone who knows Linux very well and knows how to adapt the code to these systems.

Quote
One more suggestion. It may be good idea to have predefined keyboard (and controller) mappings.

The configuration file already contains the default keyboard mapping. In addition, it also includes default controller mappings in line with the universal controller mapping standard. So the player can plug in their controller and play right away, no matter what controller it is.

Quote
So settings.ini file can be created as a new file during first start.

It may be, but it doesn't make any sense. All information contained in this file and supplied with the game contains default data, universal for all computers, keyboards and controllers. There is no reason why this file should be created on first boot.

Quote
Mappings for keyboard should be pretty standard and user can change it if needed.

And it's pretty standard and the user can change it at any time by going to the game settings screen and then to the keyboard/controller mapping screen. The configuration file should not be modified manually, the more that the player does not have a list of scancodes for keys, axes and controller buttons in his head.

Quote
I will merge your future changes into the fork and update snap package.

There will be no further changes to the code for this game as development has now been completed. What is now is its final form, unless someone finds a bug, then I will fix it, and that's it. Everything I wanted to do and test has already been done and tested—now I will start my next project.

All I am asking is to adapt your repository to Linux conditions so that Linux users have a knowledge base for this game's port in your repository, not mine. Please adapt the readme, About section and tag cloud to Linux, and also upload my wiki to your repository, with the corrections applied (removed Windows information in favor of Linux). It won't take more than one evening of work. So I'm just asking you to take care of every detail in your repository so that it looks professional, not like a messy fork.



Google translate:
And Nintendo didn't have the rights to it until they got permission! Please read history.

furious programming, Chronos - I'm sorry, but please indicate the true date of the appearance of the Tetris game. :)

Nobody cares about the first Tetris, made at Elektronorgtechnica, because this version has nothing to do with Fairtris. Fairtris is a direct and faithful port of Tetris released by Nintendo in 1989 for NES and Famicom consoles (https://en.wikipedia.org/wiki/Tetris_(NES_video_game)), so the date 1989 is absolutely correct. So stop insisting because you are wrong and instead of criticizing, read the description in the readme of this project with understanding.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on January 13, 2022, 09:34:19 pm
Я всего лишь просил вас указать издателя.
The Tetris Company (https://en.wikipedia.org/wiki/The_Tetris_Company) - изучите, компания существует по сей день. Если вам нет дела, то тогда можете удалить свою игру она нарушает права The Tetris Company и вам могут предъявить претензии по поводу распространения вашей игры, а так же удалить её без вашего ведома. The Tetris Company могут и в суд подать. Вы не имеете ни какого права создавать игру тетрис, пока не получите это разрешение от The Tetris Company.
Тетрис вообще не принадлежит NES.

google translate:
I just asked you to name the publisher.
The Tetris Company (https://en.wikipedia.org/wiki/The_Tetris_Company) - learn the company still exists today. If you don't care, then you can delete your game, it violates the rights of The Tetris Company and you can be made claims about the distribution of your game, as well as delete it without your knowledge. The Tetris Company may also sue. You do not have any right to create a Tetris game until you get permission from The Tetris Company.
Tetris doesn't belong to the NES at all.

Уважайте авторское право!!! Ни какого уважения к работе людей. Это и ко многим другим относится.
google translate:
Respect copyright!!! No respect for people's work. This applies to many others as well.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: lainz on January 13, 2022, 09:53:06 pm
There is the concept of fan game as well, if you're not making money at all why this will be a legal problem... Or it will be?
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on January 13, 2022, 10:08:49 pm
Автор имеет полное право делать так, как ему вздумается. Как проигнорировать, так и подать в суд.
Eng:
The author has every right to do as he pleases. How to ignore, just sue.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 14, 2022, 01:23:01 am
@Seenkao: what the hell is wrong with you? I don't need any permission or rights to reconstruct any game myself, from scratch, whether it's Tetris or Super Mario, Doom or Rayman, if it's a fan project (as pointed out by @lainz) and I'm not making money on it. So both TTC and Nintendo and even the DMCA can't do anything to me (to put it mildly).

Fairtris is a fan project, free and open source, with the identification of the owner of the rights to the product on NES (Nintendo) and the rights to the brand (TTC), I am not making money on it and I am not going to—as well as dozens of thousands of other developers providing various Tetris clones in their repositories (https://github.com/search?q=tetris). Nobody needs any permits, because they don't publish the products and they don't make money on them, so TTC has no interest in pursuing and suing them, on the contrary, such people and projects only increase the popularity of this brand, which suits TTC.

Sober up first, before you start raving, panic, and slander someone.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: trev on January 14, 2022, 01:57:42 am
In Tetris Holding, LLC v. XIO Interactive (https://casetext.com/case/tetris-holding-llc-v-xio-interactive-inc), LLC, 2012 U.S. Dist. LEXIS 74463 (D. N.J., May 30, 2012) the Court ruled that a clone of Tetris was a breach of copyright.

If you just want an executive summary, the Court found that the clone  of Tetris (named Mino) strictly copied the exact rules and functionality of the game, but the clone's version of the artwork and audiovisual display was so similar as to be easily confused with Tetris even by those familiar with both games. The Court concluded that it was "the wholesale copying of the Tetris look that the Court finds troubling more than the individual similarities each considered in isolation".

Yes, it's a minefield, at least in the USA. However, I don't believe there's any case against an individual making a non-commercial clone of a game for the obvious reason that should a copyright owner decide to take action against such a person, that person would do whatever was needed to avoid being subject to any legal action and the consequent financial costs.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on January 14, 2022, 04:33:28 am
@Seenkao: what the hell is wrong with you? I don't need any permission or rights to reconstruct any game myself, from scratch, whether it's Tetris or Super Mario, Doom or Rayman, if it's a fan project (as pointed out by @lainz) and I'm not making money on it. So both TTC and Nintendo and even the DMCA can't do anything to me (to put it mildly).

Fairtris is a fan project, free and open source, with the identification of the owner of the rights to the product on NES (Nintendo) and the rights to the brand (TTC), I am not making money on it and I am not going to—as well as dozens of thousands of other developers providing various Tetris clones in their repositories (https://github.com/search?q=tetris). Nobody needs any permits, because they don't publish the products and they don't make money on them, so TTC has no interest in pursuing and suing them, on the contrary, such people and projects only increase the popularity of this brand, which suits TTC.

Sober up first, before you start raving, panic, and slander someone.
Вы его можете использовать для себя (если автор об этом не знает). Распространять вы его не можете! А вы его распространяете! Мало того, что вы не указываете истинного автора, вы просто указываете, что TTS не является автором продукта!
И это со мной что-то не так?  :o

Google translate:
You can use it for yourself (if the author does not know about it). You can't distribute it! And you distribute it! Not only are you not stating the true author, you are simply stating that TTS is not the author of the product!
And is there something wrong with me? :o

трев, in the link I posted (partial clippings)
Quote
In May 2010, lawyers representing The Tetris Company sent Google Violation Notice regarding clones available for Android.[15] Google responded by removing the 35 games listed in the notice even though, according to one developer, the games contained no references to Tetris.
Quote
In April 2021, a YouTuber called JDH made an operating system that only runs Tetris. Two months later, his GitHub repository was taken offline by The Tetris Company because of copyright infringement.
I don't think much has been published yet.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: 440bx on January 14, 2022, 06:14:56 am
<snip> it violates the rights of The Tetris Company and you can be made claims about the distribution of your game, as well as delete it without your knowledge. The Tetris Company may also sue. You do not have any right to create a Tetris game until you get permission from The Tetris Company.
<snip>
Respect copyright!!! No respect for people's work. This applies to many others as well.
Disclaimier: I am not a lawyer but, I think you're way overreacting.

Take two cars of similar size from different companies, they will have _thousands_ of things in common yet, unless one is an _almost perfect_ copy of the other, there is no copyright infringement.  The same applies to countless other items (all hammers are very similar but, one hammer manufacturer isn't infringing on the copyrights of the other, unless it's a close to perfect duplicate, in which case, it could be a counterfeit (particularly if it is sold with a very similar trademarked name.)

Another example, Lazarus and Delphi share quite a number of common characteristics.  That in no way means that Lazarus is infringing on Borland's/Embarcadero/owner_of_the_day copyrights.

Tetris is just a dynamic puzzle.  That idea is neither patentable nor copyrightable as Apple was clearly told by the courts when it sued Microsoft and HP for "appropriating" ideas they claimed to be theirs - in spite of the fact that they copied those from Xerox.  Gotta love  the display of moral and ethics in that case... I stole it!.. therefore it's mine!!  (sure, it is!)





Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on January 14, 2022, 08:44:34 am
Tetris is just a dynamic puzzle.  That idea is neither patentable nor copyrightable as Apple was clearly told by the courts when it sued Microsoft and HP for "appropriating" ideas they claimed to be theirs - in spite of the fact that they copied those from Xerox.  Gotta love  the display of moral and ethics in that case... I stole it!.. therefore it's mine!!  (sure, it is!)
Нет, Тетрис - это компьютерная игра-головоломка, аналогов настольных игр нет. За выпуск игры Тетис компании боролись, чтоб получить лицензию на право выпуска игры на своей платформе. Все крупные компании, которые воспроизводят тетрис для пользователей имеют такую лицензию. В противном случае на них подают в суд. С компаниями даже обсуждать это не будут. Как и в случае Tetris-OS.
Если вы сомневаетесь, свяжитесь с компанией The Tetris Company и обсудите с ней всё. Я думаю вам предоставят лицензию на пользование и распространение игры, только какую сумму с вас затребуют?

google translate:
No, Tetris is a computer puzzle game, there are no analogues of board games. For the release of the game Tetris companies fought to obtain a license for the right to release the game on their platform. All major companies that reproduce Tetris for users have such a license. Otherwise, they will be sued. The companies will not even discuss it. As in the case of Tetris-OS.
If in doubt, contact The Tetris Company and discuss everything with them. I think you will be given a license to use and distribute the game, but how much will they demand from you?

Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: 440bx on January 14, 2022, 09:55:15 am
No, Tetris is a computer puzzle game, there are no analogues of board games.
There cannot be analogues of Tetris in a board game.  It's like there cannot be a board game analogue of Asteroids or Mario.  The essence of the game depends on it being dynamic which means it needs to be implemented on a computer.

For the release of the game Tetris companies fought to obtain a license for the right to release the game on their platform. All major companies that reproduce Tetris for users have such a license. Otherwise, they will be sued. The companies will not even discuss it. As in the case of Tetris-OS.
If in doubt, contact The Tetris Company and discuss everything with them. I think you will be given a license to use and distribute the game, but how much will they demand from you?
The last thing I'd do is contact the Tetris Company, they obviously are not interested in supporting/approving-of anything that competes with their game. 

The _idea_ behind Tetris is neither copyrightable nor patentable.

If someone makes a game that is likely to be confused with the game from The Tetris Company then, they have a basis to sue (and probably win.)  If someone makes a game that _works_ like Tetris but cannot be confused with the game from The Tetris Company, they can still sue but, if the defendant has enough financial resources to fight it in court, the Tetris Company will lose, just as Apple lost in court.

Ideas are neither patentable nor copyrightable.  Their specific implementations are.

Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: dbannon on January 14, 2022, 10:22:17 am
Debian has 24 games in its repository that it describes as "Tetris like". And believe me, Debian are very serious about respecting copyright !

"Debian Games Tetris packages", some certainly seem to have a Tetris look and feel to me. But have not played it for a long time. See https://blends.debian.org/games/tasks/tetris

Davo
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on January 14, 2022, 11:07:24 am
Ответьте себе на вопрос: "Вы готовы бороться за свои права в суде, если вас привлекут за незаконное создание собственного тетриса? Вы готовы понести убытки, в случае, если вы проиграете в этом суде?"

Я не уверен. А всё остальное - это голословность. Реальность покажет как вы к этому относитесь в самом деле, а это виртуальный мир, где вы думаете, что вы безнаказанно можете делать что хотите. Пока не попадёте в суд за это.

google translate:
Ask yourself the question: "Are you ready to fight for your rights in court if you are sued for illegally creating your own Tetris? Are you ready to suffer losses if you lose in this court?"

I'm not sure. Everything else is nonsense. Reality will show how you really feel about it, and this is a virtual world where you think that you can do whatever you want with impunity. Until you get sued for it.

Самое интересно, что если нарушат ваши права, вы будете кричать что их нарушили. А тут как раз создатель faitris нарушил права собственника, но вы отстаиваете совершенно не свою позицию. Странные вы люди. Не подставьте того кого защищаете, и глядите не попадитесь в ситуацию, когда он вас подставит.
google translate:
The most interesting thing is that if your rights are violated, you will scream that they have been violated. And just then the creator of faitris violated the rights of the owner, but you are defending a completely different position. You people are strange. Do not set up the one you are protecting, and be careful not to get into a situation where he sets you up.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: 440bx on January 14, 2022, 11:57:23 am
Ask yourself the question: "Are you ready to fight for your rights in court if you are sued for illegally creating your own Tetris? Are you ready to suffer losses if you lose in this court?"
You seem to fail to realize that even if you had an _idea_ about something, you do NOT legally own the _idea_.  You can own an implementation of the idea.  You can own a specific implementation of the idea but, not the idea itself.

That's what the courts told Apple when they were suing Microsoft and HP over a graphical interface.  The idea of a graphical interface belongs to the world, not to Apple or anyone else.

I'm not sure. Everything else is nonsense. Reality will show how you really feel about it, and this is a virtual world where you think that you can do whatever you want with impunity. Until you get sued for it.
if you have a good idea, it's very likely that someone will try to improve upon it.  That's fair game as long as they aren't creating a counterfeit or a copy that is so close to your product that it could be mistaken for your product or using something you produced (like copying your code and putting their name on it.)

The most interesting thing is that if your rights are violated, you will scream that they have been violated. And just then the creator of faitris violated the rights of the owner, but you are defending a completely different position. You people are strange. Do not set up the one you are protecting, and be careful not to get into a situation where he sets you up.
The idea behind Tetris is public property.  The Tetris Company's rights are not being violated by games that implement the same idea, as long as those game cannot be confused with the game produced by the Tetris Company.

Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on January 14, 2022, 01:48:31 pm
Вы это пишите мне или себя уговариваете?  :)
Расскажите об этом компаниям которые очень спешили получить лицензию на игру. И компаниям, которые удаляют клоны тетрис, по любому заявлению The Tetris Company.

Ну да, прошло же 10 лет, идите по тем же граблям, что другие проходили до вас, раз вам не достаточно что они уже прошлись по ним. :)

Данный релиз игры, даже не развитие тетриса, а банальное копирование одной из копий.

google translate:
Are you writing this to me or are you persuading yourself? :)
Tell this to companies that were in a hurry to get a license for the game. And companies that remove Tetris clones, according to any statement The Tetris Company.

Well, yes, 10 years have passed, follow the same rake that others went through before you, since it’s not enough for you that they have already gone through them. :)

This release of the game is not even the development of Tetris, but a banal copy of one of the copies.

Очень хорошо что эта тема всплыла, а то я тоже как то хотел клон тетриса делать. Теперь понимаю, что нужна абсолютно новая идея.

Я закончил. Не хотите, ваше дело. Дальше уговаривайте сами себя.

google translare:
It is very good that this topic has surfaced, otherwise I also somehow wanted to make a clone of Tetris. Now I understand that a completely new idea is needed.

I finished. If you don't want it, it's your business. Then persuade yourself.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: 440bx on January 14, 2022, 02:07:16 pm
Are you writing this to me or are you persuading yourself? :)
I'm writing this to you.  It would be pointless to attempt to persuade myself when courts of law have already ruled on the matter.

Tell this to companies that were in a hurry to get a license for the game. And companies that remove Tetris clones, according to any statement The Tetris Company.
Sometimes companies seek a licence they know they don't need simply to avoid wasting time and money in court even though they know they would win the case.  It's just cheaper and less hassle to throw some money at the company that can cause a problem than fight it in court.

This release of the game is not even the development of Tetris, but a banal copy of one of the copies.
Based on your views then Lazarus would be infringing Embarcadero's rights.  Lazarus and Delphi are functionally similar but legally Lazarus is perfectly ok.  Also, you don't seem to have a problem with Lazarus copying the core idea of Delphi.  How come ?

Also, Delphi is just an extension of an idea popularized by Microsoft in Windows.  Specifically, the idea of using a tool to design dialog boxes that are subsequently used and shown by a program.  Delphi simply makes "dialog boxes" live at design time.  Were Microsoft's right infringed ? the answer is: No.  They don't own the idea.

What I find surprising is that, there are other ways of accomplishing what Delphi does that would generate much less and much faster code, strangely no one seems to be interested in that.  On the contrary, .net is the opposite of that.  Go figure!.


Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on January 14, 2022, 07:32:59 pm
I'm writing this to you.  It would be pointless to attempt to persuade myself when courts of law have already ruled on the matter.
Нет, в этом ты убеждаешь только самого себя.
Предоставь хоть один пример суда, где тот, кто реализовал тетрис и без лицензии - смог выиграть этот суд. Диалог будет продолжен только в  том случае, и только в том случае, когда ты предоставишь конкретный пример с тетрисом!!!
Не Apple против Microsoft. Не Delphi против Lazarus. А именно пример с тетрисом!!!
Вот тогда и будем вести дальнейший диалог.

В данном случае, ты просто отстаиваешь чью-то точку зрения и не более. И продолжаешь заниматься голословностью!!!
Я слишком много времени на тебя потратил.  :( Больше я не поведусь а твою "дичь".

google translate:
No, you only convince yourself of this.
Give at least one example of a court where the one who sold Tetris without a license could win this court. The dialogue will only continue if and only if you provide a specific Tetris example!!!
Not Apple vs Microsoft. Not Delphi vs Lazarus. Namely, the example with Tetris!!!
Then we will continue the dialogue.

In this case, you're just defending someone's point of view and nothing more. And you continue to be unfounded!!!
I've wasted too much time on you. :( I won't fall for your "game" anymore.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 14, 2022, 07:43:05 pm
Give at least one example of a court where the one who sold Tetris without a license could win this court.

Am I selling a Fairtris? No, so what are you talking about? WTF…

Stop screaming—you are acting like a child. If the DMCA will take down my repository, I will not see any problem with that. If I find it appropriate, I will contact TTC regarding the license, in the meantime I suggest you stop yelling at users and messing about with my thread.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Seenkao on January 14, 2022, 07:49:41 pm
Я говорю о неуважении к работе автора. По вам это явно видно.
Всего доброго.

Eng:
I'm talking about disrespect for the author's work. You clearly show it.
Have a good day.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: 440bx on January 14, 2022, 08:27:40 pm
No, you only convince yourself of this.
It sounds suspiciously like you are the one trying to convince yourself.

Give at least one example of a court where the one who sold Tetris without a license could win this court. The dialogue will only continue if and only if you provide a specific Tetris example!!!
You base your viewpoint on the fact that Tetris has the financial resources to bully others to support the protection of characteristics that are not protected by law.

Not Apple vs Microsoft. Not Delphi vs Lazarus. Namely, the example with Tetris!!!
You don't like that case because it shows that your claim is not resting on a really solid foundation.

Then we will continue the dialogue.
Either way, it's fine with me.

And you continue to be unfounded!!!
I'd say the decision in Apple vs HP/Microsoft is a fairly solid foundation.

I've wasted too much time on you. :( I won't fall for your "game" anymore.
You don't like Tetris ?  (note; I don't claim to own Tetris)

Tetris managed to win a significant court battle against a copycat that was too close to the original.  They lost because, it was possible to confuse their game with the original from Tetris.  They made it too close to the original, that was their mistake.  Unfortunately, now Tetris uses that to bully anyone who makes a look-alike game based on the original idea.

They act like the typical one-trick pony.  They are simply bullies.  What's great is that there are so many clones of their game that they couldn't possibly sue each of the clone makers.

If I didn't have better things to do, I'd write another clone.  One _identical_ to their game, an exact clone and, post it on a distributed file sharing network, with source for others to create more variant clones. 
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: PascalDragon on January 14, 2022, 08:28:51 pm
All I am asking is to adapt your repository to Linux conditions so that Linux users have a knowledge base for this game's port in your repository, not mine. Please adapt the readme, About section and tag cloud to Linux, and also upload my wiki to your repository, with the corrections applied (removed Windows information in favor of Linux). It won't take more than one evening of work. So I'm just asking you to take care of every detail in your repository so that it looks professional, not like a messy fork.

Why should Chronos remove the Windows parts? It's rather easy to make the same application work on multiple platforms, so they can create a multi platform fork of your game without problems if they want - especially considering that you don't want to do that yourself.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Akira1364 on January 14, 2022, 08:45:57 pm
Why should Chronos remove the Windows parts? It's rather easy to make the same application work on multiple platforms, so they can create a multi platform fork of your game without problems if they want - especially considering that you don't want to do that yourself.

I'll have to look at the source later, but if this game actually just uses direct calls to the SDL2 C API along with OpenGL for input handling / rendering / etc then it should have been automatically cross platform to begin with...

There shouldn't be any need for Windows or Linux specific code (except for that contained within whatever probably-third-party SDL2 "header" unit they're using, which should already have all the needed ifdefs and such in place).

Edit: Yeah, I just looked, and it would have been super trivial to make this run on all platforms that SDL2 supports in the first place.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 14, 2022, 08:49:51 pm
I'm talking about disrespect for the author's work. You clearly show it.

If I had no respect for the creators of the original game, I would not provide information in the repository and wiki about who is the producer of the original (i.e. the NES version from 1989), and who owns the rights to the brand. If I had no respect, I would not have written about it, so I mistakenly suggested that I am the originator and the author of not only Fairtris, but also the concept itself. But nothing like that happens.

Therefore, discussing with you is a pure waste of time.



Tetris managed to win a significant court battle against a copycat that was too close to the original.  They lost because, it was possible to confuse their game with the original from Tetris.  They made it too close to the original, that was their mistake.

Exactly. The problem is not to "borrow" the concept, but to make the game too similar to the official one to use someone else's intellectual property to profit from it (like a parasite).

In the case of Fairtris, this is not the case. This game is unlike any official and licensed version of Tetris and I am not making any profit from it as that was not the purpose of its creation. The game itself and the source code have been published for the CTWC and CTEC community so that they can learn as much as possible about the game's internal mechanics and be able to better play the original NES version (which is still in use), as well as the Free Pascal community to have an example of a game made with Lazarus and SDL.

I developed the game interface myself, all scenes, game modes and some mechanics are created by me. What has been borrowed is the look of the pieces, the color palettes, the scoring system, and the basics of mechanics (rotation system, DAS, and line cleanup animation). The game as it stands is unique and cannot be confused with any official version of Tetris released since the brand's inception.



Why should Chronos remove the Windows parts? It's rather easy to make the same application work on multiple platforms, so they can create a multi platform fork of your game without problems if they want - especially considering that you don't want to do that yourself.

My idea was that I would provide a Windows version and forks to be created for other platforms and systems. Thanks to this, everyone could take care of their port, without creating a multi-platform code.

But nothing prevents someone from creating a cross-platform version based on my version. This is why I chose no license and copylefted this work so that anyone can do whatever they want with it, without any restrictions. Especially since the project is finished and will not be further developed. And in the near future, the repository of this project will be archived (or made read-only in some other way).
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 18, 2022, 05:44:41 pm
I installed the newest Lazarus (version 2.2.0) and now I cannot run the game under the debugger because it dies every time (see attachment). Resetting the debugger doesn't help. Is that also the case with you or is it the only one who has this problem when starting the Fairtris? Anyone have an idea how to fix it?
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 20, 2022, 08:38:37 pm
A temporary solution is to change the debug info type to Dwarf3 in the project options window.
This is the only type of debug info that doesn't crash the debugger and allows me to actually debug my code.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on January 26, 2022, 10:13:41 pm
Yet another version is now available — Fairtris 3.0.0.3 beta 2 (https://github.com/furious-programming/Fairtris/releases/tag/v3.0.0.3-beta.2)

The main change in this version is the modification of the control mechanics, making the classic controls fully compatible with the original. If CLASSIC control is set, "soft-drop" is reset when spawning, while MODERN is as before, a "multi-spawn soft-drop" is available. Additionally, the "hard-drop" function has been modernized, making it easier and more convenient to use.

The last change is the next calibration of the BALANCED generator. The maximum length of drought and flood has been reduced, so it is possible to play perfectly. This change does not affect the quality of the generated sequences — the sequences are still highly unpredictable and challenging.

Feedback is welcome, as usual.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: furious programming on February 09, 2022, 05:43:07 pm
The final stable version of the game was released — Fairtris 3.0.0.4 (https://github.com/furious-programming/Fairtris/releases/download/v3.0.0.4/Fairtris_3.0_release.zip)

Full functionality is implemented, mechanics and controls are extensive and responsive, generators are balanced, the compliance of the selected mechanics with the original is maintained, all modes work flawlessly. Taking this into account, the development of this project is complete. This release is the last — all components worth testing have already been tested, the game contains everything what is needed to play and compete on-line.
Title: Re: Fairtris — a fair implementation of Classic Tetris®
Post by: Lulu on February 11, 2022, 04:51:35 pm
Well done !
TinyPortal © 2005-2018