KTS_HOWTO:Tetris server.

As most of the people sometimes, I like to show off myself. The thing that makes me proud mostly is KpyM Telnet Server, and I'm glad to see that more and more people use it. I think that one great example of what KTS can do is the KTS based Tetris server. What I mean by Tetris server is a dedicated telnet server that starts Tetris game upon connection without asking for username or password. (An occasionally working example can be seen here , note that it's my home pc and it's not always online).

Here is a step by step guide of creating Tetris server.

1) Install KTS on your computer. If you want to use KTS as telnet server too, than you need to create a dedicated KTS Tetris copy. Click here to see how to run multiple KTS instances on the same machine.

2) Get a tetris game that runs in console. I use a tetris clone called NYET, you can get it from here. Extract/install the Tetris game somewhere on your disk, create a batch file that will start it and place it in KTS\scripts directory. In my case, I created the following file "scripts\tetris.bat":
rem -- change the disk to g:
rem -- go to tetris directory
cd g:\tetrisrem -- start the game

3) Now we have to configure KTS to start automatically the tetris.bat file. Change the [KTerm]:shell_command parameter to %COMSPEC% /C "scripts\tetris.bat". The /C switch tells the command interpreter to close when the scripts\tetris.bat has terminated. This "should" prevent users to fall back in command shell in case the game crashes or something.

4) You can test now your Tetris server by starting "telnet localhost". If you want to create a public telnet server that does not ask for username and password proceed to next point. If you want to use it personally, you are done.

5) To get rid of the user/pass prompt and to login automatically you have to use the [KTerm]:default_user and [KTerm]:default_pass parameters. I recommend you creating a restricted account; let’s say it is 'tetris' with password 'The best game ever'. Now fill the parameters [KTerm]:default_user = tetris and [KTerm]:default_pass = The best game ever. This will automatically log you in upon connection as user 'tetris'. Now run "telnet localhost" and start playing.

Wednesday, February 08, 2006

© 2002 - 2008 Kroum Grigorov
This page is powered by Blogger. Isn't yours?