Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1076091 Posts in 44162 Topics- by 36128 Members - Latest Member: relaxguy

December 30, 2014, 10:18:50 AM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Networking Server-Client MMO - Tech choice?
Pages: [1]
Print
Author Topic: Networking Server-Client MMO - Tech choice?  (Read 1037 times)
jotapeh
Level 10
*****



View Profile WWW Email
« on: June 07, 2011, 06:43:38 PM »

I'm looking at coding up a server for an MMO in the near future. I'm not terribly experienced with networking coding, although I fiddled with a few MUDs when I was much younger and coded a simple virtual world server in REALBasic around the same time.

My client would be Flash-based, so as I understand it this requires a TCP/IP based communication (I am not really familiar with UDP anyway.)

I know basic C, C++ and Java - but only to the extent that I know their syntax, basic data types and general good coding practices. I've become much more of a pure AS3 programmer in recent history and sad to say my 'real' programming chops have dwindled.

OK, enough backstory. Given the above I'm looking to figure out which language would most easily enable me to create a server which:

- Holds all the world data at all times, simulating everything
- Can communicate with x players simultaneously, where x is some unknown number attached to the relative (un)popularity of the game
- Would be fairly easy to code and recompile on whatever platform I may have available to act as a server (ie., one day it may be running on Mac OS and the next on Win or Linux.)
- Does not require a GUI of any sort, all interaction with the server on its local machine can be command-line.

Given the above I am tempted to go with Java as it is most similar to AS3. But really I'm clueless as to networking with any of the 3, and whether or not it is easily ported.. Can anyone give me some helpful pointers?
Logged

knight
Level 3
***

aka dude4k


View Profile
« Reply #1 on: June 07, 2011, 06:50:15 PM »

This looks like a job for....
PlayerIO!
Edit:
Their sever doesn't run on Mac but they'll host it for you so it wouldn't need to.
Logged
Deidril
Level 0
*


View Profile
« Reply #2 on: June 08, 2011, 07:39:13 AM »

Hello jotapeh

To have ran a MUD (Multi User Dungeon, or online text rpg) for 15 years and worked 6 years in a company doing online games, here is my advice :

You don't need to bother with a server deployed over several hardwares or even several threads for something under 200 connected players.

Some muds run very well on a single thread with 100+ players. Mine worked fine back in 2000 with 50 active connections. With modern hardware, this limit would be multiplied, should muds could attract thousand players.

Consider also than MMO surveys show that only 10% of an active player base is playing at normal time. It means you wont have to bother until you have like a player base of 1000 or 2000 active players.

My advice is to make a simple server without to worry about supporting thousands of players until you get at least in the alpha/beta and you get indeed a community of thousands of players.

You can check one of the many open source MUD engine to get a basic working server network layer. You would find eventually links to source codes at the http://www.mudconnector.com site.

Modern dedicated linux server can be rented at 30$ a month. You will be able to do more things by yourself than what playerio offer, like email for your players and hosting your website and your forum.

However if you need one day a better server solution, consider than the money generated by 2000 active customers could allow you to hire a competent network programmer to make the work. At this point you could have to refactor your code so it works over a distributed architecture.

Now, if you want to save time to proceed quickly to the point you implement your gameplay, you can indeed buy a technical solution. Don't forget that no company selling middleware or hosting solutions is immune to a bankrupt. One day, the company hosting your game can close and you will have to redo everything somewhere else. The worse thing could be to see your game closed without the possibility to get a back up.

For online games i suggest strongly to host your games on your own server where you can organize back ups so you can rebuild another server on any lambda linux solution in a couple of day with a loss or 1 day of datas.

For langage, i would suggest indeed java or C++ for the barebone skeleton of your server and, if you feel comfortable with it, a scripting langage for the gameplay. Many affordable MMO solutions use this idea. Personally i go for pure C++ Smiley Consider than the network layer and the message dispatcher must be the most quickly. That's why i would go for C++.

Again i suggest to look at the mudconnector site and inside the various MUD open source engines. You will find here several implementations of a network layer, a message dispatcher or a command-line interpreter, session managers and message-to-X players solutions.

Also, most of the MUD engines are C ANSI/C++ standard/java and compile under linux as well on visual C++.




« Last Edit: June 08, 2011, 08:06:32 AM by Deidril » Logged
jotapeh
Level 10
*****



View Profile WWW Email
« Reply #3 on: June 08, 2011, 09:08:35 AM »

This looks like a job for....
PlayerIO!

I had always thought this was Unity only. Interesting! I'm definitely going to look into this further.

*ridiculous amounts of good information*

Whoa. Awesome. You raise a really good point regarding hosting solutions. I made a game utilizing Colin Moock's UNION framework a year or two ago when it was in beta, and it broke at some point and never ran again. It would be nice to write some code without the need for another host or a blackbox type service.

I'm thinking Java is the way to go, then, at least for now. It seems to have a very straightforward sockets API and that's all I really need. The rest I'm good with Smiley
Logged

_Tommo_
Level 8
***


frn frn frn


View Profile WWW
« Reply #4 on: June 08, 2011, 10:12:05 AM »

I'm thinking Java is the way to go, then, at least for now. It seems to have a very straightforward sockets API and that's all I really need. The rest I'm good with Smiley

Btw, Poco C++ has a Socket department that looks more than inspired to Java, and I find it pretty neat.

While most factors can be dealt with later, as Deidril points out, the language is something you can't change later, so Java could become a monster to optimize for lots of connections, should you have success.
But on the other and using C++ and not getting anything done is plain stupid, so the choice is up to you Smiley
Logged

Nix
Level 10
*****



View Profile
« Reply #5 on: June 08, 2011, 10:24:10 AM »

Erlang might be worth a look
Logged
TobiasW
Level 8
***


This can only end brilliantly!


View Profile WWW Email
« Reply #6 on: June 08, 2011, 10:38:21 AM »

This looks like a job for....
PlayerIO!

I had always thought this was Unity only. Interesting! I'm definitely going to look into this further.
Actually, the Unity thing came (much) later. Oh, and I second this!

I'm not sure how good it works out for an MMO (especially because rooms, which they use for direct communication / broadcasts of information, are if I remember it correctly limited to 48 users), but you might want to look into it: It's very actively developed, has nice pricing options and responsive support. The documentation is quite readable, and one of the most important things for me: Using the library just feels good. I have yet to come over anything that seems not intuitive. Smiley

(I might be a bit of a Player.IO fanboy.)
Logged

dcarrigg
Level 0
***

Software Neurosurgeon


View Profile WWW Email
« Reply #7 on: June 08, 2011, 12:14:02 PM »

How many players are you thinking of supporting?

Most large MMOs use distributed server solutions, and the only one I'm aware of that has a cheap license is BigWorld.

-Dave
Logged

Check it out! www.retroaffect.com
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic