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?
 
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 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?
 
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.
 
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?
 
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...
 
thanks

as for the connection, how does the client and server connect? via IP?
 
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.
 
root said:
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.
 
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).
 
Back
Top Bottom