DPC Online Chess version 2.1 Programming: Theo Kandiliotis (ionikh@hol.gr) http://www.geocities.com/SiliconValley/Network/5045 Original Idea,Artwork,Guidance,Beta Testing: November (november@naxs.net) http://home.naxs.com/november/ What's new in version 2.1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The source code is included in the zip -The chat window bug that sometimes caused the text to show up in black, is fixed (I think...) . What's new in version 2.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Both the online game and chat now work through the TCP/IP protocol,which is faster and more reliable than UDP. -You cannot open the chat window before you connect to the other side now, read "Online Game" for details. -Fixed the you-can't-castle-out-of-check bug. What's new in version 1.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Minor bugfixes in the "Captured Pieces" window What's new in beta 2.2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Added the option to request a draw from the opponent -Added the option to show the squares that are threatened and the squares you can attack to What's new in beta 2.1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Checkmate detection -New sound effects -Chat window is customisable -The 2.0 bugs are gone Introduction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D.P.C. Online Chess is a program that allows you to play chess with a friend ,through the internet . The only requirement is that one of you knows the other person's IP address . Once you have established a connection , you can also chat in realtime and comment each other's moves during the game. You can also play on the same PC with someone,it's very easy because one of you can use the keyboard and the other can use the mouse. This program was built in Microsoft ® Visual Basic 6.0 Enterprise Edition during September/October 1998 . The source code is available for VB programmers (free of charge) from ionikh@hol.gr Online Game ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All the settings related with the online game are in the tab named Players/Internet , in the Options form. The first issue to consider when setting up an online game is if you will be server or client , in the connection that will follow . The white player is always the server and plays first in the game . If you choose to be the server , the other guy has to be the client . If you are the client , you need to type your opponents IP address in the text field RemoteIP . If you are the server,you don't need to know the client's IP address (you can leave the Remote IP field blank) since he will connect to you.In the two text fields next to the words Player#1 and Player#2 , you should put the names of you and your opponent .The names that you have typed for each player don't have to match the ones your opponent has typed , for the connection to be succesful . During the game however , the program will address both players with several messages and it's a good idea to type in the right names . Your settings will become active once you've clicked the button Apply on the lower left . In order for the online game to begin , the player that is server has to open the game board , by clicking Online Game in the toolbar or menu . Then the client can connect to the game by opening his game board , the pieces will be set up and the white player (server) will be asked to make his first move. The chat window will also pop up and from then on you may chat in realtime.Notice that you cannot chat with the other side if you haven't started an online game. I M P O R T A N T : The game will not start if the client opens the game board before the server does. This is because the TCP/IP connection protocol requires one of the two computers (the server) to "listen" for incoming connection requests ,which are made by the client.The client sends the connection request only once,therefore if the server is launched after the request is made,nothing happens. If the other side claims to have launched the server but the blue label on your game board window still says "waiting for server to reply..." then you should close the window and open it again (from the button "Online Game" in the toolbar or the menu).The reason for this is that the server was not "listening" when you opened your game board window,because it wasn't propertly launched by that time ,therefore your connection request was never authorized. Two Player Game ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the two player game the game board works like your normal everyday chessboard . Players take turns making their moves with either mouse or keyboard .When using the keyboard,the arrow keys replace the mouse movement ,the spacebar replaces the left mouse button and enter replaces the right mouse button.Notice that in order to be able to use the keyboard during the game,the chessboard window must be "in focus". If the keys do not respond,just click the titlebar of the chessboard window. Before starting a game you might want to change the names in the Players/Internet tab of the options form (it's not essential though) , so that it will be easy to know who each message is for . (during the game , several message boxes will pop up with various pieces of information) . Chat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to chat,an online game must be in progress.The chat window is made visible whenever the online game begins,by default.You can close it if you don't want to chat,and open it again anytime,as long as the online game is in progress.To open the chat window ,click the button in the toolbar or the menu. You can customize the look of the chat window from the "Chat" tab in the options form. Options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This program is fully customisable , several settings can be changed from the Options form that you can access by the toolbar or menu. The settings are categorized in four tabs: Interface Options ----------------- Square Colors: By clicking on the buttons "Color#1" and "Color#2" you can change the color of the squares on the chessboard. Highlighted Square Color: By clicking on this button you can change the color of the frame that will highlight the squares on the game board . Squares are highlighted to show you available moves when you click on a piece during the game. Show Rulers: Check this if you want rulers in the chessboard. These help to understand the moves from the moves list window (see "Playing The Game"). Show Thinking Time: Check this if you want the total thinking time of each player to show on the bottom of the chessboard. Squares Size: Alter this value to control the overall size of the chess board.This integer (possible values 20-60) is the length of a square's side in pixels.The size of the pieces,rulers and everything else on the game board window will change to fit your selection. Chess Set: This dropdown list contains various chess sets that you can choose from. Chess Board: This dropdown list contains various chess boards that you can choose from. Note that if you have selected anything other than "None" the settings for the color of the squares are inactive. GamePlay Options ---------------- Show Attacks/Jeopardies: If you click this ,the squares you can attack to will be highlighted with a green frame and the squares the opponent can attack will be highlighted with a red frame. Automatic Flip In Two Player Mode: Check this if you want the chessboard to flip vertically when each player makes his move in the two player game. Play Sound Effects: Check this if you want to hear a small sound when each player makes a move.This is quite useful in lengthy online games when you switch to different windows waiting for your opponent to make his move. Animation Speed: Alter this value to control the speed of the pieces sliding across the chess board . If you don't want them to slide at all, use the value 0 . Possible values are 0-5 Player/Internet Options ----------------------- This is where you set up the online game . Click on one of the two option buttons next to "Player#1" or "Player#2" to select which one you will be in the online game (Player#1 is always the server) . Player#1,Player#2: In these two fields , you may want to type the names of each player before starting either a two player game or an online game,although it's not obligatory. Remote IP: In here,type the IP address of the server you wish to connect to,only if you are the client.(See "Online Game" for more details on how to start an online game) Local IP: You can't type anything in this field , it's your current IP address. If you are hosting a game as the server,you can tell this to your opponent so that he types it in his "Remote IP" field,in order to connect to you as the client. Chat Options ------------ In this tab you can control the way the chat text displays. You can change the background color and configure the font settings ,seperately for your and the opponent's text. Your settings become active once you click the "Apply" button. Playing The Game ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Playing the game is realy simple . When it's your turn to play ,click on a square that contains one of your pieces if you're using the mouse ,or use the arrow keys to move the mouse cursor and hit the spacebar if you're playing with the keyboard. All the squares that you can move that piece to, will be highlighted , and you can click on one of them to complete the move. Right click on the game board (or hit enter if using keyboard) to open up a secondary menu that contains the following options: Captured Pieces: A window with the captured pieces of each player Moves List : A window with all the moves made so far by the two players. Flip Board : Click this to flip the board vertically. This function is inactive if you have checked "Automatic Flip In Two Player Mode" from the "Interface" tab in the options form. Resign: Click this to resign and end the game.When you resign the other player wins the game. Request Draw: Like in real chess,you have the option to suggest a draw to the other player... This secondary menu can also be accessed from the main menu once the game board window is open. Please send any feedback to ionikh@hol.gr Have Fun ! Theo Kandiliotis http://www.geocities.com/SiliconValley/Network/5045