[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
Go Back  Xtreme Visual Basic Talk > > > [VB6 and API] - learning mutliplayer games


Reply
 
Thread Tools Display Modes
  #1  
Old 09-29-2010, 03:33 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default [VB6 and API] - learning mutliplayer games


can any one teach me how make multiplayer games?
(i know a very simple game for begining...
in these case we have a button in form. and i want that button be clicked by player order and see their names too...)
thanks
Reply With Quote
  #2  
Old 10-07-2010, 01:52 PM
ZaCkOX's Avatar
ZaCkOX ZaCkOX is offline
Contributor
 
Join Date: May 2006
Location: CA
Posts: 645
Default Winsock Control

I would start with the winsock control, and make a multiclient chat program. Then once you understand that, you can move from there and make a game inside the program.
__________________
ZaCkO ... Who is your attitude?
Reply With Quote
  #3  
Old 10-07-2010, 03:14 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by ZaCkOX View Post
I would start with the winsock control, and make a multiclient chat program. Then once you understand that, you can move from there and make a game inside the program.
(i never work with internet programming)
ok.. but can you teatch me how do that?
thanks
Reply With Quote
  #4  
Old 10-08-2010, 02:07 AM
ZaCkOX's Avatar
ZaCkOX ZaCkOX is offline
Contributor
 
Join Date: May 2006
Location: CA
Posts: 645
Default Again, Lookup Winsock Control

Winsock control tutorials can be found at multiple web sites including here, and videos on youtube. You'll want to study the data send and data arrival. I'll have to look through my laptop for my examples, but that's another time. Get yourself started :P
__________________
ZaCkO ... Who is your attitude?
Reply With Quote
  #5  
Old 10-08-2010, 06:44 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by ZaCkOX View Post
Winsock control tutorials can be found at multiple web sites including here, and videos on youtube. You'll want to study the data send and data arrival. I'll have to look through my laptop for my examples, but that's another time. Get yourself started :P
can you help me find 1 toturial here?
thanks
Reply With Quote
  #6  
Old 10-08-2010, 12:32 PM
ZaCkOX's Avatar
ZaCkOX ZaCkOX is offline
Contributor
 
Join Date: May 2006
Location: CA
Posts: 645
Default Well can't find my examples...

But it's not hard to do. When I have some time I'll make one up, other than that, your on your own for now sorry. I don't have time to look through the site.
__________________
ZaCkO ... Who is your attitude?
Reply With Quote
  #7  
Old 10-11-2010, 01:21 PM
Cerian Knight's Avatar
Cerian Knight[VB6 and API] - learning mutliplayer games Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,199
Default

Here is a simple Winsock tutorial to get you started: http://vb.microbolt.com/Tutorials/TC...5/Default.aspx

Keep in mind that multi-player does not necessarily mean multi-computer. For turn based games, players could easily take turns using the same keyboard or controller. Winsock is nice either way, because each user could be running the same application (but different instance) on different PCs or on different monitors connected to the same PC... Winsock does not care if the ports used are local or remote.
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').
Reply With Quote
  #8  
Old 10-11-2010, 01:48 PM
Cerian Knight's Avatar
Cerian Knight[VB6 and API] - learning mutliplayer games Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,199
Default

Also, here is a link to a simple Winsock client thread: WinSock client
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').
Reply With Quote
  #9  
Old 10-27-2010, 04:07 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

i Cerian Knight. how are you my friend?
i need understand 3 terms, that stills confuse to me:
-client?
-server?
-Port?
thanks
Reply With Quote
  #10  
Old 10-27-2010, 08:12 PM
Qua's Avatar
Qua[VB6 and API] - learning mutliplayer games Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Quote:
Originally Posted by Cambalinho_83 View Post
i Cerian Knight. how are you my friend?
i need understand 3 terms, that stills confuse to me:
-client?
-server?
-Port?
thanks
If you're interesting in getting started with network programming within games (i.e. multi player games) then I suggest you read at least the first few chapters of of Beej's Guide to Network Programming. The first few chapters will cover fundamental networking terms such as sockets, servers, clients, IPs and so forth.

Once you've been introduced to the fundamentals you can start putting your knowledge to use. The WinSock library is an excellent starting point if you're using VB6.

Start out leaving out the game part. Instead start by making a simple server and client programs that are able to connect to each other. Once you know how to connect two applications, you can start sending data between the two. When you have mastered these two abilities you're ready to program your first simple game. I suggest Tic-Tac-Toe.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #11  
Old 10-28-2010, 09:46 AM
Cerian Knight's Avatar
Cerian Knight[VB6 and API] - learning mutliplayer games Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,199
Default

I agree with Qua. Just a quick reference:

Client: Program/PC that makes a request.
Server: Program/PC that fulfills a request.
Port: TCP or UDP channel on the IP address (e.g., Internet = 80, most SMTP e-mail = 25).
Peer to Peer: Both PCs have Client and Server abilities (used for games when processing load must be balanced between players and a dedicated server is not practical).
TCP: Full Handshaking, used when communication integrity must be verified between the client and server.
UDP: No Handshaking, ssed when communication integrity between client and server is not required and/or communications speed is most important.
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').
Reply With Quote
  #12  
Old 10-28-2010, 04:52 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

thanks too both... yes i need an introdution. i'm a beginner in connections.
INFO: i build my own tica-tac-toe game. the pc plays aleatory not by thinking, but i can change that
Reply With Quote
  #13  
Old 10-29-2010, 09:58 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

ok i build my own chat (client - sever)(with video help). but i can't see the text in both forms
can anyone tell me what isn't right?
(at least for i learn more)
thanks
Attached Files
File Type: zip Client Server.zip (3.9 KB, 12 views)
Reply With Quote
  #14  
Old 10-29-2010, 10:21 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

i found the bug. and now i understand how can i build my multiplayer games(only for 2 players).
my problem was here:
Code:
If InStr(1, data, "MGS", vbTextCompare) = True Then
        data = Replace(data, "MSG", "")
        txtMainText.Text = txtMainText.Text & vbCrLf & data
    End If
i delete the "if" command and works fine
can anyone tell me how can i put more than 1 clients?
do i need show the form before connect it?
Code:
Private Sub Form_Load()
    frmServer.Show
    txtMainText.Text = Empty
End Sub
Reply With Quote
  #15  
Old 10-29-2010, 10:53 AM
Flyguy's Avatar
Flyguy[VB6 and API] - learning mutliplayer games Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,165
Default

Quote:
Code:
If InStr(1, data, "MGS", vbTextCompare) = True Then
        data = Replace(data, "MSG", "")
Spelling mistake?!
Reply With Quote
  #16  
Old 10-29-2010, 10:59 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by Flyguy View Post
Spelling mistake?!
???? i'm confuse. what you mean?
Reply With Quote
  #17  
Old 10-29-2010, 11:17 AM
Flyguy's Avatar
Flyguy[VB6 and API] - learning mutliplayer games Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,165
Default

You are checking for MGS to replace MSG
Reply With Quote
  #18  
Old 10-29-2010, 11:20 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by Flyguy View Post
You are checking for MGS to replace MSG
lool thanks for that view.
ok... my program works fine. but i see 2 problems:
1 - i have the server and client form's. how can i put it in just 1 form?
2 - how can i build with muiti-users chat?
thanks
Reply With Quote
  #19  
Old 10-31-2010, 04:21 AM
ZaCkOX's Avatar
ZaCkOX ZaCkOX is offline
Contributor
 
Join Date: May 2006
Location: CA
Posts: 645
Default Use a public variable

My friend, I have some available time this weekend to help you.

I'm working on a winsock tutorial, might be able to post tomorrow. I already put some hours into it and couldn't finish tonight.

But use a public variable to check for server or client. So when first loading the screen, ask the user, do they want to be a server or a client.

For sending data to multiple clients I'll post my tutorial soon as it is done. The hardest aspect is using the winsock control arrays correctly.
__________________
ZaCkO ... Who is your attitude?
Reply With Quote
  #20  
Old 10-31-2010, 05:06 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by ZaCkOX View Post
My friend, I have some available time this weekend to help you.

I'm working on a winsock tutorial, might be able to post tomorrow. I already put some hours into it and couldn't finish tonight.

But use a public variable to check for server or client. So when first loading the screen, ask the user, do they want to be a server or a client.

For sending data to multiple clients I'll post my tutorial soon as it is done. The hardest aspect is using the winsock control arrays correctly.
thanks my friend
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games [VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
 
[VB6 and API] - learning mutliplayer games
[VB6 and API] - learning mutliplayer games
 
-->