I need few explanation, how does all system work.
I am using Dev-C++ 184.108.40.206 IDE.
I made a game in C language using Allegro library. When you run a game, you got 2 windows. One window is Command Promt, in which asks for nicknames, and also, when somebody win in game, prints who is winner. The second window is window for playing. There is table with 15x15 boxes. The game is similar to Tic Tac Toe Game, but it is just bigger.
Game work properly on one computer. I want to make to play via internet.
My question is: How to do that? What do i need ? Library ?
Will i need a server, that is somewhere on the internet, and when i start game(client) it automatically connects to the server. When i click on box, program need to get information of the box (number, coordinates, which player clicked) and send it to server before drawing sprite (picture in box which i choose by clicking on it), so the server will then send information back to me, and also other players(clients) so then my client and other clients can draw sprite in box which I select. Can I also attach chat to the same server as I used for game? In my head, the server just need to wait for info and sends it back... Is that wrong ??
Can i also make chat in already existing cmd window. I think i need to separate i cmd and main window. I tried to put line in code, for input in cmd gets(Text); but then whole program waited for input. Can i make then chat in cmd, and if I win in the game, send that information to the server, and server then sends massage to all '** Player 1 is winner **. '
Maybe I am totally wrong, so that is why I asked here.
I need an really good explanation about whole thing and how does it work.
Also, if you have, post tutorials.
(sorry for bad English)