CanTris Quick Start

This is a quick-and-dirty help document to get you started.

 

Foreword

Every electric device becomes usable if you can play Tetris with it. I couldn't find any decent Tetris for my HP Jornada 720 so I had to program one myself. This is the result. You can distribute it freely as long as you don't charge any money from it. Enjoy! Programmers, support FreeWare! Don't ask money for your software!

 

Disclaimer

This program is provided "AS IS". So if CanTris wrecks your computer - tough luck. I won't take any responsibility for it or any other problem this program may cause (mainly addiction :)).

 

System requirements

PDA:

Windows version (a quickie port of the CE-version):

 

Installing CanTris 

PDA version:

  1. Insert the PDA into the cradle.
  2. Click the ActiveSync icon in the system tray with the right mouse button and select 'Explore'.
  3. Copy the 'CanTris.exe' from applicable directory (depending on your PDA's processor and form factor) from the hard drive  into a directory of your choosing in the PDA.
  4. If you have a PPC device and haven't installed GAPI library already, download and install it. You can find it from Microsoft's web site at www.microsoft.com.
  5. Run the 'CanTris.exe'.
  6. Enjoy!

Windows version:

  1. Run the 'Win32\CanTris.exe'.
  2. Enjoy!

After you have run the game for the first time a configuration file called 'CanTris.ini' will be created in the root directory of your PDA. In the Windows version the configuration file is stored in the directory the game executable resides in. This file contains your settings and Hi-scores, so do not delete it unless you really want to lose your settings and Hi-scores. No other files are needed or installed.

Note: To uninstall the game just remove the 'CanTris.exe' and the 'CanTris.ini' files.

 

Playing the game

The idea is to form full lines by moving and rotating blocks.

Blocks fall down until they hit on either the bottom of the playfield or other blocks. When a full line or several full lines are being formed, they are removed and every line above them will drop down.

The game is over when there's no room for new blocks anymore.

 

Keyboard help

You move blocks with the navigator button (arrow keys in the HPC version).

Push the navigator button left and right to move the block left and right respectively.

Push the navigator button up to rotate the block.

Push the navigator button down to drop the block (you can also use the space bar to drop the block in the Windows version).

You can pause the game by tapping the screen with stylus (key 'P' in the HPC version). Game is also paused automatically when you switch to another application.

Note: You can alter key mappings with the key mappings menu option.

 

Options

You access game's  menu by tapping the screen with stylus.

Start a new game with 'New game'.

Select starting level from 'Level' submenu. Changing the starting level in the middle of a game doesn't take effect until the next game.

Select the number of scrambled lines at game start up from 'Scramble' submenu. This too doesn't take effect until the next game.

If you want a small delay every time a line is being removed, check the 'Options\Block remove delay'.

If you want to see the next block beforehand, check the 'Options\Show next'. Note that enabling this option cuts bonus to half.

If you want the blocks to rotate as they did in the original Tetris, check the 'Options\Dersumize'. By default the blocks rotate as they do in Nintendo GameBoy's Tetris. Dersumize-option also affects whether you can "slide" the block sideways after dropping it. When Dersumize-option is enabled, you can slide the current block sideways after dropping it, before the next block shows up. When Dersumize-option is disabled, blocks "glue" instantly, so you cannot slide them.

If you want to synchronize your Hi-scores with a global Hi-score list residing in a CanTris portal server, select the 'Options\Sync Hi-scores'. Note that you have to configure portal server address, your nickname and your username/password using the 'Options\Configuration...' before you can synchronize Hi-scores.

If you want to alter key mappings, select the 'Options\Key mappings...'. You can choose alternative key mappings for the following actions: move left, move right, rotate, drop, pause and send message. The '<HW 1>' through '<HW 5>' keys refer to the hardware keys on HP iPaq. They may work on some other devices as well.

In the Windows version you can toggle menu bar with 'Menu toggle'.When the menu bar is hidden you access the menu by clicking the right mouse button anywhere in the main window.

To change the background image, select 'Background\Load background ...'. The background image can be drawn centered, tiled stretched, placed freely or not drawn at all. When you place the background freely, move the image with the stylus and "drop" it by pushing the center of the navigator button (in the HPC2K version you drop the image by pressing enter, in the Windows port you drop the image by clicking the left mouse button). You can also choose background color with 'Background\Set background color ...'.

 

2-player mode

It is possible to play againt other person using infra red or TCP/IP.

To connect to other player using infra red the other player selects '2-Player\Infra red\Server' after which the other player selects '2-Player\Infra red\Client' while the infra red ports are lined up.

To connect using TCP/IP, the other player chooses '2-Player\TCP/IP\Server' after which the other player selects '2-Player\TCP/IP\Client' and enters the server's IP-address. Note: If you use a dial-up connection, you can get the device's IP-address by checking the 'Use terminal after connecting' in the dial-up connection's advanced settings. When the terminal window shows up enter your login name and password. After that you will be shown a text 'IP address is: x.x.x.x'. The other player then uses that address to contact you.

If there is a CanTris server running somewhere, you can use it to search for other players. First you have to configure server parameters by selecting 'Options\Configuration...'. Enter the server's IP-address and port number, a nickname you would like to present yourself with and your username/password. Username can be anything, as long as it is unique. Password can also be anything. If someone else is already using that username, CanTris will say that you have a wrong password. After that you can choose '2-Player\Portal\Connect...' to access the server and retrieve a list of other players waiting for an opponent. If there aren't any players waiting you can select the '2-Player\Portal\Register' to add your nickname to the server and wait for other player to contact you (Note: You can play single player game while waiting. You can also switch to some other application. When someone wants to play with you, a messagebox is shown.). If you want stop waiting, select the '2-Player\Portal\Deregister' to remove yourself from the list.

When connected to the other player the number of scrambled lines and the starting level settings are copied from the server to the client. After that both players can change these settings whenever they wish. You begin a new game as you do in the single player mode.

To send a short message (max. 80 characters) to the other player, select '2-Player\Send msg'.

To disconnect from the other player, select '2-Player\Disconnect'.

 

2-player mode rules

Two player mode rules are the same as in the single player mode except for one thing. You can cause crap lines to appear to the other player's playfield by removing three or more lines at the same time. If you remove three lines at the same time, one crap line will be added to the other player's playfield. If you remove four lines at the same time, two crap lines will be added to the other player's playfield. Hint: Be as fast as possible to drown the other player in crap!

The 2-player mode employs a simple ranking system. When you lose, your ranking will raise, and when you win, your ranking will decrease. Rankings are between 1 and 100, 1 being the best ranking and 100 the worst. Rankings are calculated using the following formula:

Winner_new_ranking = Winner_old_ranking - (ê^(Winner_old_ranking-1)/50)-1)

Loser_new_ranking = Loser_old_ranking + (ê^(Winner_old_ranking-1)/50)-1),

where ê is the mathematical constant ~ 2.718281828. So when you lose to a person with significantly better ranking, your ranking will not be affected that much. But when you win a person with significantly better ranking, your ranking will decrease quite nicely (and the loser's ranking will increase by the same amount).

 

Running the CanTris server

The CanTris server is very simple Java console application that maintains a list of users searching for an opponent and a global Hi-score list. If you want players to access it from the Internet you need to make sure that you run it on a computer that can be accessed from outside. 

You start the sever with: 'java -jar CanTrisServer.jar'. You need to make sure that JRE is included in the path.

The port used by the server by default is 1030. You can change the port by supplying it as a command line parameter. For example: 'java -jar CanTrisServer.jar 2300' would start the server using port number 2300.

The CanTris server stores the global Hi-score list in a file called 'hiscores.dat'. Ranking list is stored in a file called 'rankings.dat'. The server also creates HTML-pages for the Hi-scores and rankings in files 'hiscores.html' and 'rankings.html'. All these files reside in the directory where the server application is in.

 

Contact information

Visit the CanTris home page for latest version and latest news at http://sivut.koti.soon.fi/sodacan.

For questions, bug reports, comments ...

Mikko Kankainen
email : mikko.kankainen@vegatechnologies.fi