Tetromino falling block game on Fortran using Ncurses

less than 1 minute read

The Tetran tetromino falling block Fortran game exhibits several types of best practices for modern Fortran design with user keyboard input and animated text output. Ncurses is used to handle the screen drawing via iso_c_binding from Fortran.

I dramatically reformed the base Fortran code, moving it to modern Fortran 2018 style from Fortran 77 and added command line options.

Ncurses redraws the screen on each necessary update (pseudo-interrupt driven). CPU load is very low.

It would be straightforward to add color, sound and more.

Notes

Lewis B original

Leave a comment