Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 09-08-2006, 07:09 PM   #11
Baseband Member
 
Dnsgm's Avatar
 
Join Date: Jan 2006
Posts: 61
Default Re: how to make a MMORPG

how was your experiences with Unix sockets? As in how long did it take you to learn, how hard was it, or how efficient was it?

when you say 'Unix' sockets, I'm taking it as you can only use it under a Unix based server?
__________________

Dnsgm is offline   Reply With Quote
Old 09-09-2006, 05:20 PM   #12
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,001
Default Re: how to make a MMORPG

yes... Berkley sockets, (BSD Sockets), don't exist on windos, only on *nix systems, (unix, linux etc).

it's relativly easy to learn. for the most part you could google for an already existing program and edit it to your needs...
the learning curve will of course depend on ho much you already know about the programming language, (it'd be very odd to start programming BSD sockets on a unix system, in C, if you've only ever used windows before!

there are sockets in windows, (and you can include these as an MFC in a C application in windows, but (In My Opinion), they are a lot harder to use, and a lot less documentation and examples exist.
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 09-09-2006, 06:18 PM   #13
Baseband Member
 
Dnsgm's Avatar
 
Join Date: Jan 2006
Posts: 61
Default Re: how to make a MMORPG

I plan on setting the server as Linux, and i have a decent amount of knowledge in both VB and C++.

Is it even possible for me to manlipulate sockets with VB on a *nix OS?
Dnsgm is offline   Reply With Quote
Old 09-09-2006, 06:32 PM   #14
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,001
Default Re: how to make a MMORPG

it's possible to connect to a server using VB to make the client program and C to make the server program.

sockets are good like that, the libraries involved transform all the data to account for things like differences in arcitecture (both hardware and software differences).

you arn't really manipulating the socket... just sending and recieving data to/from it.
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 09-09-2006, 11:37 PM   #15
Baseband Member
 
Dnsgm's Avatar
 
Join Date: Jan 2006
Posts: 61
Default Re: how to make a MMORPG

so it's basically

if this:
open port ...

then listen for connection:
close port

if x = w:
send ...

so socket programming is just like the if-thens with socket functions?
Dnsgm is offline   Reply With Quote
Old 09-10-2006, 07:51 AM   #16
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,001
Default Re: how to make a MMORPG

pretty much yes...

basically a server will wait for a connection, when a client estabilishes a connection it will send some information.

For your MMORPG that will be something like a variable to specify what charector you are, and the action that you wish to take...

the server would already know where you are on the map, your name friends what equipment you have etc. and would respond to the command accordingly...

example.

client makes the connection and sends your account name + encrypted password for verification, + a command (list inventory).

the server recieves this string.
name=Dnsgm,password=xyz,command=listinventory

the server recieves this, looks up your account name and encrypted password against the information in the database, once it knows that the account is you, it sends something like this.

inventory=map5,bronzedagger1,lantern2

your client recieves that information and then displays some pictures...

or course you could make the game a little more complicated and extensible by having the server send a lot more complicated information...

eg,
inventory=shield1-protection=2-attack=0,sword4-protection=1-attack=5

etc...
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 09-10-2006, 08:58 PM   #17
Baseband Member
 
Dnsgm's Avatar
 
Join Date: Jan 2006
Posts: 61
Default Re: how to make a MMORPG

thanks

as for the connection, how does the client and server connect? via IP?
Dnsgm is offline   Reply With Quote
Old 09-11-2006, 04:47 AM   #18
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,001
Default Re: how to make a MMORPG

yes, either by IP or a named connention, (e.g. computerforums.org). it's up to you how you specify the connection...

it might be easier to make a few test projects in VB first connecting to different things, (like a whois server to test sending and recieving simple things),
or you could try making a VB tenlet client just to test setting up connections so that you know that part of the program works before you start writting your own server programs as well.
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 09-11-2006, 06:38 PM   #19
Fully Optimized
 
UK31337's Avatar
 
Join Date: Feb 2005
Posts: 2,776
Default Re: how to make a MMORPG

Quote:
Originally Posted by root
yes, either by IP or a named connention, (e.g. computerforums.org). it's up to you how you specify the connection...
Wouldn't you need to have a DNS call for that to work?

I've tried to make a chat program in VB6 for a school project a year back or so. It worked fine, actually, just it only transmitted text rather than actual binary data. Problem was the userlist of users in the room never worked properly.

I now believe this was because the program was single-threaded, and I'm not about to go and rip the guts out of an ancient program (which I'm not too sure I have anymore, TBH) to fix it. I'll try to learn up C# or VB2005 and try again.
__________________
Master of common sense. If you don't like it, stop reading.
UK31337 is offline   Reply With Quote
Old 09-12-2006, 06:04 AM   #20
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,001
Default Re: how to make a MMORPG

DNS lookups are transparant to the program.

I'm not sure exactly how your chat program worked, but it could be that if you were trying to see users ina room that you'd have to identify where the computers were, what room they were in and keep that in some kind of central address book of locations, (on a chant server).
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 09:28 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0