|
-
Sep 29th, 2000, 11:12 PM
#1
Thread Starter
Fanatic Member
What style of game is it? Graphical? Text based? :> I'm working on a VB based game that is multi-player capable. I've actually had upwards of 8-12 people on at a time in beta testing to fix bugs...
-
Oct 2nd, 2000, 04:36 PM
#2
Lively Member
It's a Card game like poker. My problem is I not very good at multiuser environment. Do you winsock or tcp/ip to enable multiuser? Do you have some code that I can look at?
-
Oct 2nd, 2000, 05:13 PM
#3
Thread Starter
Fanatic Member
Sorry, currently the code that I have been working on is rather hush hush though I can give you a few ideas.
If you're using forms, make a winsock control array and use control # 0 for the listen port.
Once that's set up, all you need to do is listen for a few events from the winsock control.
_ConnectionRequest
_DataArrival
_Close
_Connect
and
_Error.
You can use the _SendComplete and _SendProgress events as well (I'm still working on these 
Each person that logs into the game should be given their own Winsock control. So, if you set up an array, collection, or User Defined Type, you can keep track of the player, his/her WinSock Control index # and other information.
ConnectionRequest is someone attempting to log onto your computer. DataArrival is when data hits your socket control from the remote machine, Close is the event that's triggered when someone disconnects, and Connect is someone who's connection request been Accepted. Error is obviously the socket error.
If you need to know more, there are plenty of examples of using multiple sockets in the Articles here at VB World, and quite a few on Planet Source Code.
Email me if you'd like some more info on what I'm doing and I can send you a temporary address that you can telnet to to see what I'm up to
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|