PDA

Click to See Complete Forum and Search --> : NET GAMES PROGRAMMING


Mc Brain
May 31st, 2000, 03:12 AM
Hi everybody! I post this thread to see if someone could tell me how to edit my game to make it work within a net. I mean, I wrote a game (cards game) and works fine. But I would like my game to be played by 2 people each one in his/her computer. Now... here's the question: Is there any way to re-program my game to acheive this without rewriting the whole program. I really had no clue on how to do it, but the fact that I need the 2 computers to "read" the same variables seems no too easy to get. Am I wrong?

maxx
May 31st, 2000, 05:17 AM
If you just want to make it a 2 Players game, add a tcpServer to one game instance and a tcpClient to the other. I'd suggest, you do it with the winsock control, so you simply have to send the variables as Strings from Server to Client or vice versa.

If you plan to do a multiplayer game (I'd even suggest this for a two player game as well), you should set up a second project, a game server, which receives and sends data from all Clients.

Seek MSDN Knowledge Base for information on winsock programming.

Greetings, maxx

PsyVision
Jun 3rd, 2000, 02:06 AM
Can anyone give us some more info on this or links ??

Fox
Jun 3rd, 2000, 04:16 AM
There's a chat example on my website, It's not much work to make it sending variables through the net...

PsyVision
Jun 3rd, 2000, 04:13 PM
Thanks Fox, i will look now !!!

SteveCRM
Jun 6th, 2000, 08:49 AM
So with your chat program, you would be able to send player info such as coordinates? (Im trying to make my own)

Fox
Jun 6th, 2000, 04:58 PM
Yep. You just have to replace the [sending text] part with a[type + values] part, that means you send an identifier to tell the other side what you're going to send (position, script calls, ...) and the value which belongs to it.