×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Tetris TFM
Tetris TFM
Khajiitos
« Citoyen »
1676111640000
    • Khajiitos#0000
    • Profil
    • Derniers messages
#1
  3

Tetris TFM


Hi, welcome to a recreation of Tetris in Transformice!

You probably know how Tetris works so I will skip most of the explanation.

Gameplay

To start a Tetris TFM game, press the Start game button on the bottom of the screen.

To move the falling tetromino, use A/D or Left/Right arrows.
To rotate it, use W or Up arrow.
To move it one level down, press S or Down arrow (aka Soft Drop).
To move it all the way down, press Space (aka Hard Drop, you get points for it based on how far the block was from the bottom).

By default there is prediction enabled, which highlights where the tetromino will fall down if not moved sideways. You can turn it off by pressing P.

Scoring system

The goal of the game is to get the highest score as possible.
You get score for the following things:
  • Using Hard Drop, you get 2 * distance score.
  • Filling whole lines:
    • One at a time: 100 score
    • Two at a time: 300 score
    • Three at a time: 500 score
    • Four at a time: 800 score

Images

https://i.imgur.com/OLsR7XG.png
https://i.imgur.com/LXIjElq.png


Running the game

The game is meant to be run in the Tribe House using the /lua command.
It doesn't use any Module Team specific features, which means everyone can run it without problems.
Copy-paste ready code: https://pastebin.com/raw/qdfK6YHU

Tinkering with the code

The game is open-source, which means the source code of the game is available to the public.
You can make changes to the copy-paste ready code in the section above, if you'd like.
However, since Transformice can't run multiple Lua files at the same time, the whole project has to be merged into one file to be able to run it.

To make the code more readable and more easily maintainable, the project consists of multiple files merged into one.
This is the GitHub repository of the whole project.

After you've cloned the repository, and made changes, merge all of the files into one by running the merger.lua file.
To do that, type the command lua merger.lua in your Command Prompt/Terminal, in the location of the project.
(to do that, you must have a Lua Runtime installed on your computer)

After successfully running the command, output.lua should appear in the project's directory. This is the copy-pasteable game code.

I hope you enjoy the game!


If you have any ideas or feedback, I would highly appreciate it.

Good luck!
Bomboffkiler
« Citoyen »
1676114280000
    • Bomboffkiler#0000
    • Profil
    • Derniers messages
    • Tribu
#2
  1
Cool! To eliminate that merger.lua, have you looked into luabundler? It might be interesting to try it (it resolves require()s).

Dernière modification le 1676114340000
Laiba
« Sénateur »
1676118000000
    • Laiba#5965
    • Profil
    • Derniers messages
#3
  2
Very nice game!!! Keep it up
Khajiitos
« Citoyen »
1676127660000
    • Khajiitos#0000
    • Profil
    • Derniers messages
#4
  1
Bomboffkiler a dit :
Cool! To eliminate that merger.lua, have you looked into luabundler? It might be interesting to try it (it resolves require()s).

It's definitely something to consider as it makes using multiple files more "natural", I might make something like this myself if I'll feel like it
Nnaaaz
« Citoyen »
1676409960000
    • Nnaaaz#0000
    • Profil
    • Derniers messages
    • Tribu
#5
  1
it was fun
Laiba
« Sénateur »
1676456460000
    • Laiba#5965
    • Profil
    • Derniers messages
#6
  1
The game was good and I really liked it Keep up the great job ♡♡
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Tetris TFM
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27