TeTkis

A simple Tetris clone in Tcl/Tk written by dther in 2024-05-22, with the intention of implementing a loose interpretation of the 2009 Tetris Guidelines. Source is available at dther/tetkis on Github.

Screenshot

TeTkis Screenshot 1

Features

  • Written entirely in Tcl/Tk 8.6!
  • Set custom controls, ARR/DAS and game seed!
  • Use with your favourite Tk theme, or with the bundled Azure theme for ttk!
  • Available as a starkit, or as a starpack for 64-bit Windows or Linux! (Download)

Reflection

I wrote this over the course of a week as a way of coming to grips with Tcl/Tk. It was a lot of fun! Though, I wish there were bindings to a library/framework more suited for game development. I wrote quite a few notes on feature wishlists and friction points that, if addressed, would make Tcl very capable for hobby game development. I'll link to those notes here if I end up publishing them...

Actually, one major one that I hope might be addressed in Tcl 9.x: The total lack of a cross-platform sound library. Snack hasn't been supported on Windows in almost twenty years(!), and on Linux, it still relies on OSS, which is arguably three layers of deprecation separated from the current standard audio streaming interfaces on Desktop Linux. (OSS->ALSA->PulseAudio->PipeWire)


Jeff Smith 2024-05-22 : Below is an online demo using CloudTk. This demo runs TeTkis in an Alpine Linux Docker Container. It is a 27.5MB image which is made up of Alpine Linux + tclkit + tetkis.kit + libx11 + libxft + fontconfig + ttf-linux-libertine. It is run under a user account in the Container. The Container is restrictive with permissions for "Other" removed for "execute" and "read" for certain directories.



arjen - 2024-05-22 10:53:16

I tried to use the CloudTk version online, but somehow the arrow keys were not working (or have I used the wrong set?) and I saw the blocks consuming blocks below them, an odd sight. Is this merely a problem of CloudTk with the game? Or does the game have some glitches?


arjen - 2024-05-22 10:55:11

Oh, the grey block shows where the actual block will end and I need to use the separate arrow keys on my keyboard, not the ones that are part of the numeric keypad.