These guides and tutorials will be written in Tcl/Tk. There are multiple reasons for this.
Tcl goes perfectly together with Tk, a toolkit for drawing User Interfaces.
Tk by itself may seem a little outdated compared to modern alternatives but it's the perfect choice for beginners who have no previous knowledge of programming.
It has an very easy syntax and you can easily code very fast
by requiring nothing than a text editor and a Starkit, Cookit or a simple installation.
We'll be able to package our games/apps very fast and with extreme ease to distribute them to other platforms.
This means that the people "using" these apps will not even need to download and install anyother dependency.
You'll be able to run your Games and apps on Andorid devices later with minimal changes.
Things that are very hard by using anyother platform/language since you'd have to almost rewrite everything.
The reason we use Tcl/Tk combination is so that you're introduced to programming concepts. Once you understand the thinking you can switch to anyother programming language you want.
For a complete beginner, well that person will spend a very long time learning the basics before he could do anything.
He would also be fixed to a specific toolset/ide.
You can create wonderful apps.
It's by no means a silver bullet language. It has certain limitations, but it gets the job done for what we want it to do
Download and install
Where to download and install Tcl from? You can get the Windows, Linux and Mac 32/b4 bit variants
Now after installing Tcl you need a good all around editor.
You can either use Geany, Notepad++ or anyother one you enjoy.
I'd recommend Geany since it runs on both Linux/Windows.
From this step on there is basic programming knowledge required in Tcl, you can follow the tutorials knowing nothing and picking up things along the way.
Previous programming knowledge is great but not required.
For the moment I will refer you to other introduction tutorials and howto's in Tcl since there are so many existent.
This lets us focus on the task at hand.
You can review a list on http://wiki.tcl.tk/1304
Great introduction tutorials from
Some links to always keep in reach are the ones for the Tcl and Tk manuals where you can review how a command works and examples.
Finding examples is always easy on http://wiki.tcl.tk
Now let the fun begin!
If you're on windows you can open Wish or Tkcon.
You can copy/paste the following code:
package require Tk tk_messageBox -message "HELLO THERE!"
You should see the following:
TODO more links:
GAME ART FOR YOUR GAMES IF YOU DON'T WANT TO DRAW
- Number Guessing Tcl/Tk Game
- Tic Tac Toe Tcl/Tk Game
- Falling Trolls Tcl/Tk Game
- World Conquest Tcl/Tk Game (unfinished)
You can always review the sourcecode of other existing games made in Tcl/Tk by going on this link: http://wiki.tcl.tk/898
Up until mid 2017 i used Tcl for 10 years as my primary software development language for most of my projects as well as for client projects. Beginning 2018 I switched to Elixir for the development of most new projects. Tcl still remains a fond memory and will remain a cool language.
Found these interesting? Did you learn something? Leave a comment or contact me.
You might enjoy these similar articles:
Be the first to comment!
The comments section is closed.