PDA

View Full Version : Play chess over the Internet



cwnelatury
3rd June 2009, 05:58
Hi All

I am creating a chess program that can be played over the internet...
So far I have the chess program that can be played on one computer...

I don't know much about qt networking...

So anyway..I want to make it so that two people can download the program and connect to each other over the internet and play...

I was wondering if someone could point me in the right direction and how to get started ....I know this is not a specific question...


Thanks

aamer4yu
3rd June 2009, 06:12
Over Internet it might be tricky... over LAN it might be easy..
First about LAN. You will need to provide communication between Side A and Side B. Use sockets for that. Refer QTcpSocket , QTcpServer. You can send the moves made by player A to side B and show it on the screen at side B, and vice versa.

Second about internet.. You cant directly communicate over internet if IP address is not global. and in home user cases, they are rarely global. You need a server to communicate between two clients.

Hope you get some idea :)