MMorpg connection

Blitz3D Forums/Blitz3D Programming/MMorpg connection

panton(Posted 2007) [#1]
What connection type is the best for a mmorpg?

UDP or TCP?


Vertigo(Posted 2007) [#2]
TCP with directplay will use one thread per connection hince making multiple connections(enough to be considered massive) very slow. TCP does however prioritize packets and data handling error correction CRC type checking etc. UDP is blazing fast, but not secure, and you have to handle your own packet priority structure and error checking. I would highly suggest using a network library to handle this all for you. Might I suggest NOT making a MMORPG? These things are HUGE undertakings, and blitz has its shortcomings with a lot of things that make a mmo feasible.

-Scott


panton(Posted 2007) [#3]
i have found an UDP library. Shall i use this.


Vertigo(Posted 2007) [#4]
Here is what I would suggest. Draw all of this out on paper. Dont at all think about this as a game, rather just a communication network. Draw the Server and client nodes in the data structure, as well as what the packet message contains need to contain. Devise an entire system in theory and purely conceptual that will handle message queues delivery and data parsing. Do this for every type of message you will need aswell( atleast what you think you will need). Try to find ways to break the system, fill it full of what ifs and make some redundancy to gain default data instead of presenting either the server or the client a series of unpredictable MAV's. This is not an easy process, but is by far the most important in a multi-user network environment. Next build a chat client, and console like system to send and test these commands back and forth between the client and server. Test bandwidth usage, processing time all of this needs to be fine tuned to support what you are going to be feeding it. Next develop the entire server architecture and make commented sections on the reciprocating events on the client end. This will not be easy, nor fun, and will make you go insane at points... once you have all of that working. Develop your user system... then the world system, then anything else you want to add, the reverse engineer that client to work with the servers data types. Get a team of a few dozen people to create content, as well as you will need about $10,000 or so to purchase a decent server and rent a spot at a colocation, the left over money will pay for bandwidth for a year or so. Good luck.


panton(Posted 2007) [#5]
Lol my one and only question is:
what connection is better for a lot of clients :

tcp or udp


then u answer: TCP or UDP

or whatever :S :S!!!!


Vertigo(Posted 2007) [#6]
Forgive me... Just trying to help out here with some ideas for you. I have been developing an MMO for well over a year now. Most of it involved a dry erase board, and a note pad simply working out the math for things like the health regeneration and things like that. The things most people over look that take a great deal to implement and balance accurately. MMORPGS are not easy to make. Hince why I have yet to see one "finished"(not beta) indie mmorpg. I only made those additional comments because I noticed you posting in the beginners forum, then jumping to such a question as to what type of connection is better for my mmorpg. You have screen shots of your game showing client to server connectivity correct? So, what I gathered is that you were jumping head first into something that is going to end badly. Especially with the comment that you have a release date set. I was just trying to let you know the severity of what you are getting yourself into, and after having failed myself a few times at some similar tasks, I figured Id give you a starting point. Sorry for all the typing, I just dont want to see you waste your time mate.

Peace,
Scott


panton(Posted 2007) [#7]
.. omg...

Ok. Im creating a little online game
so what shall i use
tcp or udp
im not creating a mmorpg


Wayne(Posted 2007) [#8]
udp


andy_mc(Posted 2007) [#9]
just remember that udp is unreliable, so you can't count on all the messages getting through.


panton(Posted 2007) [#10]
Can I use both?


Vertigo(Posted 2007) [#11]
Depending on the level of traffic and how you designed the data structure(*coughs* see above) yes you can. Your first post stated you were making a MMORPG... atleast you were asking questions related to it... not to as you now state "a little online game"... so depending on the number of connections then sure just use tcp/ip.. if you will only having like 8 or so players connected in a peer type environment then Tcp would more than suffice. If youre doing a MMORPG with a central server and several hundred of connections you will not want to use tcp.

For "a little online game", then yes you could use both I suppose if you wanted to. Keep in mind you would be dealing with two completely separate connections at this point.

You can use the faster UDP for things that can afford packets to be lost, such as player positions etc. But for things that require 100% assurance that the message gets there in order you can use tcp. Id strongly suggest using a network library though. I believe there is BlitzPlay pro that uses blitz, aswell as external libraries such as Raknet and K-Net.

... omg ...


Wings(Posted 2007) [#12]
i am the creator of www.voidrpg.com

i am using TCP as iam a master on it.

Iv made tests and if you gona use TCP you must write a packet state driven engine.

there is some bad example of not how to code TCP ip in code archives.

i se forward to test your game out.