TkGames.SF.Net

Author: Stevenaaus
Last updated: 28 June 2014


In TkGames 1.3 , you'll find the latest version of most games. The below links are probably outdated.

1. General

2. Projects

3. Card Games

4. Other Games

5. Utilities

6. Links

7. Author


1. General

1.1 About TkGames

Welcome to my SourceForge Tk Games page.

This page is a compiler free zone (mostly). All you'll need to hack my programs is a text editor!

While learning the powerful Tcl/Tk programming language, I've adopted several abandoned games, contributed to some larger projects, and coded a few widgets of my own.

You'll also find links to other cool Tcl/Tk projects on the web.

1.2 About Tcl/Tk

Tcl/Tk, also known as Wish, is a powerful computer language which was popular on early Unix systems, especially in commercial and scientific fields. The latest version - Wish 8.5 - has brought long overdue improvements in aliased fonts, vastly improving the ascetics of Tk applications.

It's first part is Tcl - an elegant scripting language whose only data structure is a string(!), and uses lists extensively. This allows for very readable and deeply nested code. It is also reminiscent of functional computer languages (as opposed to procedural languages like C and Bourne Shell) and, as such, can be hard for beginners to understand.

Tk is the powerful graphics library that the user sees on the computer screen. Versions prior to 8.5 had a slightly unpolished look and feel - which may be the reason it never gained more popularity. Tk allows for very rapid and correct application development. A simple Tcl/Tk application takes one line:

#!/usr/bin/wish
pack [button .b -text Finish -command {destroy .} -activeforeground RoyalBlue]

Another feature of Tcl is that it is designed to interface with other languages such as C and Perl, allowing best use to made of (for example) C's speed and Tk's easy to build interface.

1.3 Download

The latest version of these puzzles are found in this tarball. At the file archive you can still find individual packages, but they are most likely a little outdated.

1.4 Installation

Unix

Linux and FreeBSD should have Tcl/Tk installed by default.

To verify this, look for a command named wish or wish8.4. Users needing to install Tcl should visit Tcl.Tk for the source code, or try RpmFind or Active State for binary packages.

Sometimes the symbolic link "wish" is not created. To do this, type: cd /usr/bin (or /usr/local/bin) and ln -s wish8.4 wish

Building from source is fairly easy, with parallel installation of different versions no problem. For example, if "wish8.4" is in "/usr/bin", you can install wish8.5 in "/usr/local/bin". After downloading and uncompressing the tcl-8.5.2 and tk-8.5.2 source code:

    cd tcl8.5.2/unix && ./configure --prefix=/usr/local && make install
    cd tk8.5.2/unix && ./configure --prefix=/usr/local && make install

Windows

To run on Windows boxes, install Tcl/Tk, and rename each program with a ".tcl" extension (eg. rename tksol tksol.tcl). I recommend using Active State Tcl.

MacOSX

Mac users can install a standard version of Tcl/Tk from either Aqua Tcl/Tk or Active State, or try the Batteries-Included version.

The standard OSX installations of Tcl do not allow programs to be launched from the Finder. They must be run from the command line by typing

cd {directory where program is}
wish {program name}
Alternatively, you can install the Mac Tcl/Tk Launcher, which is also included with the "batteries-included" version.


2. Projects

These programs require Tcl/Tk 8.4, but may work with earlier versions. For more info see the installation section.

2.1 PolyPuzzle

Based on a tessellation puzzle named Beat the Computer, this is my first "original" Tk program. Over the last couple of years, I've implemented most of the different puzzles. Download. Version 1.8.2 has attractive Help, Changelog and About widgets, and a minor hack which should finally fix Wish8.5's precision issue.

You can find photos of the original puzzles and some mathematical background at Pascal's web page.

2.2 Scid vs. PC

Scid vs. PC is a usability and bug-fix fork of Scid. With it you can play chess online or against the computer, browse tournaments downloaded in pgn format, and create huge chess databases.

2.3 M.A.M.E. front-end

M.A.M.E. stands for Multiple Arcade Machine Emulator, and is an amazing project that brings the arcade classics to your PC. There are many, many versions and front-ends for this fairly chaotic project.

Mamex is a minimalist front-end written for the Linux M.A.M.E. port, XMame (versions 0.96 and 0.106). I've written many new widgets - overhauling functionality and appearance, and also hacked a useful "Mute" option into the game. You'll find more info in Mamex-1.4.1.

A front-end for SDLMame, which is a more current M.A.M.E. port, is here: SDLMamex-1.4.1.

2.4 Tk TiMidity++

Linux midi support is such a mess. I've given the Tk interface an overhaul - see the readme in the tarball for details - fixing as few little bugs and giving the widget a QA overhaul. Hopefully someone will find this useful.

Download


3. Card Games

TkTp

3.1 TkHearts

Mike Griffiths coded this great Hearts clone. My latest version is 0.90 which includes a few changes.

I had a look at resizing this game, but doing so breaks up the nice clean look of the face-up cards in the player's hand... Instead i have added an auto-raise feature. It helps a little, and looks cool too.

3.2 TkSpider

This thoughtful game of solitaire is played with the equivalent of two packs of cards. I recently removed the poor quality sound support till Snack is working better. On the plus side , at http://www.fotosearch.com i found some great art work and made a few nice card-backs. (One of which is also in TkTk and Hearts).
Download

3.3 TkTk

Tk Time Killer is a great little solitaire written by Greg Bacon. Unfortunately, I really hate Perl. And while Greg's version used Tk, it espoused Tcl for Larry Wall's bride-of-frankenstein creation.

Anyway, it wasn't much effort to re-use plenty of TkSpider and code this game. Features include full undo, configurable decorations, a modest tally box and a few fancy mouse bindings.

More thanks to Greg for letting me borrow the name TkTk.

Download

3.4 TkTp

Tk TriPeaks is an easier variation of TkTk.

Download

3.5 TkSol

Bao Trinh originally coded tksol for FreeBSD, and it hadn't been updated in 8 or 9 years. Over several point releases I've fixed quite a few bugs, added some features and really got my hands dirty learning Tcl. Recently some new artwork has been contributed, and the game is looking nice. Download


4. Other Games

4.1 TkYahtzee

This is another program I found at tcl.tk which was mostly complete but had playability issues. I've made a few changes, including the addition of high-score and help widgets, and redesigning the buttons and menus. Thanks to the original author, Kevin Kenny.
Download.

4.2 TkHangman

My first Tcl/Tk program - A half-working and abandoned hangman program I adopted from Ibiblio.org, and eventually rewrote. Download.


5. Utilities

5.1 Tkvol and Tkgamma

Minimalist volume and screen brightness widgets. Tkvol requires the aumix program, and Tkgamma uses Xorg's xgamma command.

Download Tkvol
Download Tkgamma

5.2 Alert

# Steven.a's first tk script
# Modeled on beos' Alert
# No , I don't really know what I'm doing  ;->
# 13/5/02 : patched up a bit.....

A dialog widget modeled on the "alert" command from BeOS.

[I started using linux around 1999, with slackware 3.4, and from the comments it looks like I started learning Tcl in 2001.]

Usage: alert [-g] message response(s)..

Download

5.3 Tkexe

Small Tcl/Tk command launcher.

Download


6. Links

6.1 Utilities

TkDiff

TkDiff -- A graphical front-end to diff for Unix and Windows by AccuRev Inc. and John M. Klassa. I love it.

TkDiff Home Page

TkCVS

Dorothy is a computing professional who shares with me a fondness of Macs, Fvwm, Tk and music :->. She is also the maintainer of TkCVS, a front-end for the revision-control software, CVS.

TkInfo

Yes, the GNU "info" files suck big-time. This front-end makes the pain more bearable.

TkInfo Home Page

6.2 Games

6.3 Other Links

TkGames Project Page.

Tk Game Pack

Tk Game Wiki

Tcl/Tk Homepage

Active State Tcl

Aqua Tcl/Tk


7. Author

Stevenaaus is a uni graduate in math and computer science, who programs as a hobby in tcl/tk, bash and C. I live and work in rural australia, and enjoy beating up Lachlan at squash.

Email

Get Tkgames at SourceForge.net. Fast, secure and Free Open Source software downloads