Tetris for MATLAB

A functional and customizable Tetris game.

You are now following this Submission

Features include:
- soft drop and hard drop
- display ghost piece in hard-drop position (optional)
- indicate next piece (optional)
- left and right rotation
- customizable game area size
- customizable key bindings
- Nintendo scoring system
- 3 color schemes

See beginning of code for some options.
Please try it out and let me know about bugs and/or missing features!

Cite As

lp18692 (2026). Tetris for MATLAB (https://se.mathworks.com/matlabcentral/fileexchange/78501-tetris-for-matlab), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0

- Added proper display of next piece
- Added 7-bag Random Generator
- Added pause, quit and restart functionality
- Fixed bugs with bottom sliding and hard drop
- Updated window size and placement

1.0.1

Updated image

1.0.0