Help Index
KLOTZ for Windows NT  Version 3.05 -  10/30/93 - compiled using VC++/NT (beta) 1.10.3180c, on the last day before it finally expires.

Context-Help: press Shift+F1, then use the [image] -pointer to click at the feature to be explained. Works for the main window only.

New for version 3

User Manual

Menu description

Do	Configuration

Help	Help, Keyboard layout

Copyright © 1989, 1990, 1991, 1992, 1993 by Wolfgang Strobl. All rights reserved. This program is free of charge. Copy and use it, if you like. Inclusion of this program in program collections, for example on CD-ROM is only allowed under two conditions:

I get a free copy of that collection (i.e. the floppy or CDROM which contains my program) sent to my address (see my address in the About box of the program or in this help file), and

The manufacturer of that collection doesn't try to prohibit buyers of his collection to give my program to other people.

To say it with other words: if anybody tries to make money by including my program (which he got for free), in program collections, he is free to do that, as long as  I have a chance to own and see the result without having to pay for it. In addition, it's still my program; if anybody pays you money to get it, that's fine with me. But if anybody tries to restricts the right of a user of my program more than I do, then this is against my stated intention.

Modification of this program (including translation) is prohibited without my written agreement.

If you are a shareware of freeware distributor and would like to get an actual version of my program, please send me a letter asking me to do so, a printed copy of your catalogue,  a formatted 3.5" floppy, a self addressed envelope and DM 50 (cash, no cheques). If I have time and if there is a new version, I'll send a copy back to you. If you have access to the internet, it is probably simpler for both you and me to obtain it from there.


Tue
Do	 menu	click here for the Help menu

contains a few commands to configure and control what Klotz displays and how it works.

Control	opens or closes a Dialog box named Klotz Control, which displays the actual Score and the number of removed lines. In addition, it contains a Scrollbar for to adjust the level from 0 to 10. Initially, Klotz starts on Level 5.

Statistic	opens or closes a Dialog box named Klotz Statistics, which displays the frequency of the different Klotz pieces for the actual game, graphically.

Hall of Fame	opens or closes a Dialog box, which displays the 50 best players.

Sound	enables or disables noise played through a sound card.

Grid	draws a grid on the play field, which makes the game a bit less difficult.

Frame	enables or disables frames around the squares - this is pure chrome.

Arrange windows	adjusts and aligns all the visible windows and dialog boxes which belong to Klotz on the screen.

Square pieces	if this switch is checked, Klotz will enforce square pieces by adjusting the width of the play field window, when you resize that window..

Network...	pops up a dialog box which asks for the name of the hall of fame file, for example to a shared one on a shared drive on a network server. That function isn't fully tested in the actual version.

Store Desktop	stores the above settings and the window layout.

Exit	finish playing Klotz


Hilfe
Help-Menu

Index	Help for Klotz

Help for help	The help browser explains itself

Keyboard layout	opens or closes a dialog box which shows the current keyboard layout and allows you to change it.


Neu in Version 3
New in version 3 for Windows NT

Klotz version 3 can't be run under Windows 2, anymore. Version for Windows 3 (only distributed locally in Germany) supports Windows 3.0 and Windows 3.1 in all modes.

The version which you are looking at is the result of a quick port of version 3 to Windows NT, first recompiled using the Preliminary March 1993 Software Development Kit for Windows NT, and now compiled using the beta Visual C++ for Windows NT.

There are a few features which I would have liked to add, but the beta Visual C++/NT development enviroment, which has been distributed to developers expires today (exactly two weeks after it was delivered here in Germany), and the real VC++/NT (which I ordered at the very same day I got the beta VC++/NT and the upgrade offer) still isn't available in Germany, and to me. I'm releasing Klotz in its current, still somewhat unfinished state, because I don't know when I'll get a working development environment again.

Klotz seems to run well on Win32s. The Win32s libraries aren't included with Klotz because of their size.

Some features have been changed or disabled in version 3: it isn't possible to continue to play Klotz even if it is iconized, anymore. It has got a coloured icon. The continuos background colour has been replaced by a static bitmap. The pieces have got a 3d outlook -this is essential for modern software ;-). Klotz now uses the built-in help feature introduced in Windows 3 (obviously), including context sensitive help.

Because many people asked me to do so, I've added a pause-feature (just in case your boss enters the room ...). As long as the game is iconized, it stops.

Price list

This game is free. My offer to send out updates and enhanced versions for 20$ has  expired - this was just to expensive for me: collecting that money from a single cheque costs more than 20$, here in Germany, sometimes.

But you would like to express your gratitude, please send me a picture of a bicycle, perhaps one on a postcard - I like bicycles. If you don't have one available, please put a 10$ note into an envelope, fold your letter around it (so that it isn't visible from the outside) and send it to the address below:

Wolfgang Strobl

Argelanderstr. 92

53115 Bonn

Germany


Steurungs-Dialogbox
Klotz Control

This is one of the four -support windows. It shows the score you've reached during the current game, the number of lines you have successfully removed, the relative performance (if this gets significantly below 100%, your computer is to slow to play at the current level), and it has a scrollbar to adjust the level.

Score	displays the number of points you got so far, in a big and fat font. Each time you settle a piece, this number increases.

Lines	counts the number of complete lines, which have been removed during the actual game. For each ten removed lines, the level gets incremented by one.

Level	The level goes from 0 to 10. Both ends of the scale (0 and 10) only can be selected manually. The higher the level is, the faster the pieces drop down. You can increase the level at every time (using the Scrollbar or the keyboard), if it hasn't been frozen during the game.

Performance	shows the ratio between actual and planned dropping speed. If this goes below 70%, the level becomes frozen.


Nebenfenster
support windows

In addition to the main, play field windows, Klotz may show four other support windows, which display various information about the game and allow additional control over it. This has the advantage that the user can control the amount of used screen estate much better as if everything would be in one, single window. This is because each of these additional windows can be show or hidden independently, and because Klotz can remember the position of these windows.

Optionally, Klotz can align and adjust the position of these windows, automatically.


Eingefroren
frozen

Klotz tries to move a falling piece according to the speed implied by the current level. Depending on the speed of the computer and its load this isn't always possible. Klotz measures the actual, real time for each move of a piece, and detects unintended slowdowns - this is shown as the performance number in the control window. If this number gets less then 70%, Klotz assumes that either the computer is to slow, or that the user tries to cheat. As a reaction, Klotz freezes the level. A frozen level can't be raised, anymore, neither via the automatic 10 lines incrementing, nor the manual one via the Scrollbar or keyboard. It is possible to continue to play on that frozen level, nevertheless.


Statistik-Dialogbox
Statistics

This support window display a graph of the frequency of all the pieces which have been dropped within the actual game.


Hall-Of-Fame-Dialogbox
Hall of Fame

The Hall of Fame contains slots for 50 scores. It only stores one score for each player, so there is space for 50 different players. This support window displays about ten of the 50 entries. Please use the scroll bar to see the others. If you get a new entry into the Hall of Fame, Klotz automatically scrolls to and highlights the new entry.

The Hall of Fame stores your name (or whatever you type into the window asking for your name - as a side note: it's quite interesting what people type into such score lists!), the level which has been reached, and, of course, the score.

The content of the file which stores the Hall of Fame is protected by a CRC scheme. you can throw it away, but you can't manipulate it - Klotz can become quite unfriendly if it detects an attempt to hack the Hall of Fame file.

Klotz contains an algorithm to allow concurrent use of a single Hall of Fame file on a file server. Klotz reads the Hall of Fame file during startup. Before a new score is entered into the Hall of Fame, this file is read again and locked, in order not to loose any scores which have been entered by other players in the meantime. Klotz doesn't try to track new entries to the Hall of Fame during the during the play, however you can command it to reread the Hall of Fame file at any time by typing a lowercase "r".


Sound ein- und ausschalten
Sound

Klotz now plays various sampled sounds through a sound card, if one is available. If you would like to change how Klotz sounds, look for files named klz*.wav in the directory where Klotz is installed.


Gitter ein- und ausschalten
Grid

A feature for the beginner. The grid lines make it a bit simpler to see when a piece aligns with a profile at the bottom of the playing field. Switching the grid on costs you a level - you only get the points as if you would play on the next lower level.


Vorschau-Dialogbox
Preview

This Support window displays the piece which will be dropped as the next one after the one which is falling currently on the playing field. It may seem to be quite difficult for a beginner to watch both the playing field and the preview window at the same time. But it is more or less impossible to play more than a short time without preview on the higher, faster levels. Because of that, you get more points if you play without preview.


Rand ein- und ausschalten
Frame

Pure chrome


Fenster anordnen
Arrange windows

This command arranges and aligns all the visible support windows around the main, playing field window. If the command  "store desktop" never has been given before, Klotz does an automatic "arrange windows" during its start.


Klötze quadratisch halten
Square pieces

This switch is usually off and doesn't get stored. If you switch it on and change the size of the playing field window afterwards, Klotz only uses the vertical size and adjusts the horizontal size in order to get square pieces.


Netz-Dialogbox
Path to Hall of Fame

Klotz uses a file KLOTZ20.DAT in ins working directory to store the Hall of Fame. You can use this menu command to point it to another file.

The file formats of KLOTZ20.DAT under Windows for DOS and Windows NT are fully compatible, so you can continue to use your current Hall of Fame data file.

Two or more players may share a Hall of Fame file located on a file server. (I tested it using two instances of Klotz, one running on my own NT machine, the other one running on a Windows for Workgroups computer, using Win32s).


Fensteranordnung speichern
Store Desktop

Klotz stores the position of all support windows (Preview, Control, Hall of Fame, Statistics, Keyboard layout) such that the same layout of windows will be restored when you start Klotz again.


Exiting
Exit

The application Klotz can be terminated at every time using this menu command.


Tastaturhilfe/-editor-Dialogbox zeigen
Display or change keyboard layout

This support window displays all the keys which are used to control the play itself. The following table displays the default layout.

key	meaning

7	move piece to the left

8	turn piece

9	move piece to the right

4	drop piece

5	move piece down one line

6	increment level

2	park piece and drop another one

1	toggle preview

In order to use other keys (for example the vi cursor keys :-}, you can overtype them in this dialog box (mark with the mouse, then overtype, tab to next field). Please activate the main window again if you are done. The new keyboard definition is active, immediately. The become permanent, if you use the menu command store desktop.


Hilfe über Hilfe
Help on Help

explains Windows Help


Maximize Icon

This topic describes the maximize icon. Unfortunately, there is no Maximize Icon within KLOTZ-


Minimize Icon
Minimize and take a break

Minimizes Klotz to an icon and stops it. There is a way how to avoid that the level becomes frozen, but I won't tell you!


Sizing Border
Frame around the playing field window

use this to adjust the size of the playing field. Switch  Square pieces on before resizing, if you intent to get square pieces, and adjust the vertical size, only. The horizontal size will be adjusted, automatically.


System Menu

It's standard. Please consult the Windows documentation.


Title Bar

It's standard. Please consult the Windows documentation.


Spielfeld-Fenster
playing field window

This is the only windows which must be open in order to play the game. In addition, it must be the active window to receive your keyboard input.


The user manual for Klotz
KLOTZ

Version 3 for the Windows NT operating system

This is my original English description for Klotz, as of version 2.11a. I have added a few comments for Windows NT, written in red, like this paragraph. I moved this text into the .HLP file, because the July'92 Windows-NT prerelease didn't contain the Write applet. The current  Preliminary Development Kit does contain WRITE.EXE, but I'll wait till the final release of Windows NT before reorganizing the documentation again. (Well, ... I didn't . Sorry about that.)

KLOTZ is  a game of falling pieces similar to TETRIS for use under Microsoft Windows. Why yet another version of TETRIS? The first reason simply was the wish to have my very own version of this game, as everybody else seems to have. At the CeBit in Hannover here in Germany most booths had some equipment showing  falling colored pieces, somehow. In the middle of 1989 a flood of tetris clones started to show up on usenet. A second reason to implement it was to have something useful (hah!) to explore the capabilities of Microsoft Windows with. KLOTZ isn't especially well behaved, so please don't take it as a model of a conforming Windows application.  It makes too much noise (in a different way, but now user configurable, on NT)  it grabs the focus or pops up a dialog box when it shouldn't (it doesn't do that, anymore). Its many windows can get confusing. But so what - it's a game!

The program is named KLOTZ.EXE. It stores the scorebook in a file named KLOTZ20.DAT in the current directory or the network directory (see below). This allows you to have more than one scorebook. The position and size of the main window and the position of the dialog boxes can be saved into WIN.INI or its Windows NT equivalent. These saved positions are used later, automatically. If you want KLOTZ to size and place the windows for you, don't use the Store Desktop function. You will have to edit WIN.INI with an editor and delete the [KLOTZ] section in order to get the automatic positioning back.

Picture 1: The playing field

Rules of the game

You get points for every settled piece. How much you get depends on the playing level, i.e. on how fast the pieces move down. If you force a piece down within less than five seconds you can get up to 12 extra points. At level 0 you have 30 seconds before the piece moves down one line, but you get only 3 points per piece placed at the bottom.

All pieces start at the top of the playing field - same place, same orientation.

The game has a clock. You can hear it ticking, if you have switched Sound to on. At each tick the piece moves down one line. How fast the clock ticks depends on the level; the higher the level, the faster the clock. The level number goes from one to ten. The game normally starts on level five. At level one the piece moves down one line in a second. On level nine it crosses the whole playing field in one second.

If the piece can't be moved at the tick, it will be settled and you get some points for it. Afterwards, you get a new piece. If this isn't possible, the game is finished. In this case your score is compared to the tenth best player. If your score is better, you are asked for your name. If you are already in the Hall Of Fame and your score is better than before, your score is updated. Otherwise you are added.

Independent of the clock tick you can move the piece. You can use the numerical keyboard for that purpose. The NumLock key has to be enabled.

Picture 2: Default keyboard layout

You have five actions (i.e. keystrokes) per line. Any more keystrokes are ignored. Unsuccessful keystrokes count. The ability to turn a piece depends on the target position, not on the possibility to turn it physically into the desired position. So you can turn a stick out of a hole, for example.

The following instructions assume the default keyboard layout.

If you release a piece with key 4, it will not be settled immediately. This will be deferred up to the next beat. You can move the piece in the short time interval between the release and the next beat.

Key 5 triggers the next tick. You will find this useful on level 0.

At the tick the following actions occur:

Lines which are filled will be removed immediately. All lines above the filled line will be moved down one line. You do not get any points for that, but this is the only way you can get space for new pieces. For every ten lines you get removed your level is incremented, when starting at level one. If you start at a level greater than one, you have that many (ten times the level) lines good before the level gets incremented. The automatic level increase stops at level 9. You can reach level 10 only with key 6 or the scroll bar in the control box.

If you want to play fast, you can increase your level by using key 6. If you use the scroll bar in the control box of the game to lower the level, your current game is terminated and your score is thrown away. This means, you can´t  lower your level within a game. Actually, this is not completely true. If KLOTZ cannot move the piece at the intended speed, it decrements the level and freezes it. A frozen level will not be incremented, neither automatically nor manually. Because KLOTZ is not a very large game, there is plenty of space to run other Windows applications concurrently. As long as these other applications don't slow down KLOTZ, this isn't a problem. KLOTZ doesn't try to monopolize the machine, as the commercial AMIGA version of Tetris does, for example. Instead it detects a slowdown and answers with lowering and freezing the level. So you can cheat by dragging around and holding a window to get time, but this will have the effect that you can't get to a higher level anymore. This is visible in the Hall Of Fame.

Key 1 is used to switch the Preview Box on and off. If the Preview Box is shown, you get the points of the next lower level.

Key 2 is a bit experimental. It parks the current piece and gives you a new one, which shows up at the usual place at the top of the playing field and starts to move. After this piece is settled, the parked piece starts to move again. You can park more than one piece, if you like. The reactivation policy is LRP (least recently parked). If a full line is removed, the parked pieces above this line will be moved, the pieces below won't. If a parked piece is removed partially as result of a full line removal, it cannot be reactivated anymore.

Operation

There is one main application window for the playing field. All other windows are modeless dialog boxes. You can open and close the dialog boxes at any time. The only required window is the main (playing field) window.

You can resize the playing field at your wish. The game starts with a field which uses the whole screen (without the icon area). The other windows are placed to the right of the playing field. You can resize the playing field and you can move around (and close) the dialog boxes. If you like the layout, you can save it using the menu entry Store Desktop.  This saves your window layout into WIN.INI. If Square pieces is checked before resizing, the size of the playing field is adjusted to give square pieces by using the vertical size and adjusting the horizontal size.

The menu entry Grid isn´t stored into WIN.INI. Sound and Background Color are.

There is no Background Color menu entry in this version, it simply has a static background bitmap. This is because I used a simple multithreading implementation for the lengthy generation of the background bitmap, under Windows for DOS. This scheme still works under NT, but it is quite inefficient, and should be replaced by a using NTs threads. (Real Soon Now - what did you expect?). I would like to implement an animated background, but haven't found an really elegant way to implement that on NT.

Please don't let the Attract Mode of KLOTZ confuse you. What do you have to do to switch KLOTZ into this mode? Nothing particular. Just start KLOTZ and then start another Windows application, i.e. switch to the MSDOS window and start CLOCK, for example. Suddenly KLOTZ starts to play for itself. It does that as long as it isn't the active application. If you go back to KLOTZ (by clicking into the playing field, for example), it will show its normal behavior again.

More Information

KLOTZ20.DAT is  protected using a CRC scheme, so please don't mess around with it. This ensures that text and data in the Hall Of Fame arent´t hacked.

If your computer is too slow for KLOTZ, you will not be able to play at higher levels.

How to become a professional KLOTZ player

The following is the result of looking over the shoulders of some of our better players.

It takes only a few minutes to learn the game, but it takes months to get the feeling and play it well. But don't play it too much: if you start to dream about colorful pieces, all turning counter clockwise, perhaps you should try something else.

Play with borders around the pieces and without the grid on the playing field(default). Learn to use the lookahead box; you will need it on higher levels. Try different positions of the lookahead box; some people prefer it at the top, others at the bottom.

If the standard window layout doesn't give you square pieces (it should), adjust the play field and use Store Desktop.

Don't give up too early.

History

KLOTZ is the result of a spare time programming activity. Much of it was created during carnival '89, in one week. Later refinements of the implementation were done mostly to explore some hidden corners of Microsoft Windows. So please don´t take KLOTZ as the result of a professional programming project.

The current version is the result of a port to Windows NT. It took me about one hour to get a fully functional version running under the July'92 prerelease of the Windows NT SDK, and a few days to get some minor details right. This still isn't a "final" release, because I still have to work with a preliminary compiler (VC++/NT beta).

New for Version 2.11

Background Colors

KLOTZ now uses an optional coloured background bitmap. Its generation may take a few seconds and needs a lot of memory. If this isn´t available, KLOTZ falls back to the usual gray background. While the bitmap is generated, KLOTZ uses the gray background. This does mostly happen under Windows 2.x or Windows 3 in Real Mode.

The background color type gets stored when using Store Desktop

The handling of sound has been redone; the sound device is opened only if it is really used. Sound doesn´t seem to work well under Windows 3 in standard or enhanced mode. I got reports of crashes of Klotz 2.09 under Win3 in standard mode and system clock slowdown (factor five) in enhanced mode. I think I have traced this down to concurrent memory activity and sound usage. Please don't use sound under Windows 3 in standard or in enhanced mode - it may crash your machine. Because of these problems I have changed the default to Sound off. Sound support on Windows NT is different, but Sound is still off by default.

Desktop

The menu entry Store desktop stores more information: sound state, background color, path to the Hall Of Fame file [registered version only]. There is no registered version anymore!

The new menu entry Square pieces  can be checked to restrict the play field resizing to a 1:1 aspect ratio giving square pieces. Use it as follows: select Square pieces, resize the playing field vertically (the horizontal size will be adjusted accordingly), then save it using Store desktop.

Miscellaneous

It is possible to play KLOTZ even if it is minimized and only its icon is visible. Minimize KLOTZ, activate it again by a single click into the icon area, get rid of the system menu by single clicking outside the system menu. Now KLOTZ is active, but minimized. If you use a keyboard layout with numeric keys (the default one, for example), you can play now - if you have good eyes.

After placing a piece on top of the playing field, there is one tick without a downward move. This gives a little bit more time when the playing field is nearly full.

The keyboard layout is changeable by editing the keys in the Keyboard Help dialog box. So you may use your custom EGAINT keyboard layout, for example.

KLOTZ now has two icons, a monchrome builtin icon, and an external coloured icon. An internal coloured icon will be added in the next, Windows 3 specific version (if the Windows 3 SDK ever comes to Germany, that is).

The Hall Of Fame has been enlarged to fifty entries. Old versions of the Hall Of Fame file will be used and enlarged. Don't use the old (2.09) version of KLOTZ with a new Hall Of Fame file - it will be shortened to ten entries without warning.

The non registered version of Klotz is able to run on a network with a shared Hall Of Fame, but will allow only one player at a time by locking the Hall Of Fame file during the play. Not valid anymore.

Error corrections in 2.11

Earlier versions of Klotz had problems when running under the debugging version of MS-Windows, because of two (more or less harmless) bugs in my code. Thanks to Chris G. from Microsoft for pointing that out.

Error corrections in 2.11a

Two programming errors prohibited using the game under Windows 3 in real mode and made it flaky under Windows 3. It wasn't possible to launch more than one copy of FÜNEF. There are no functional differences between 2.11 and 2.11a.

Version 3

This is the first version developed with the Windows 3.0 System Development Kit, earlier versions where done using the Windows 2.1 SDK. Main differences: integrated coloured icon and helpfile support, minor corrections.

Version 3.05 for NT

Sound now uses the multimedia services for sound output. There is currently no version of FÜNEF (i.e. Klotz with Pentominos) available.