Building MMO Virtual Worlds (part 2)

» Scaling the Virtual World

One of the challenges in creating large multi-user virtual worlds is creating a scaleable server side infrastructure which allows the system to keep up with the increasing traffic and popularity of the application. These projects usually start relatively small, offering free memberships to users so they can evaluate it and decide if they want to become registered members. In this phase the number of concurrent users hitting the application typically ranges from a few hundreds to a few thousands, so the investment in hardware resources is not particularly onerous: a couple of high-specced machines would handle the load without problems.

As soon as the word is spread and banner campaigns are launched, more and more users will sign up for both free and paid memberships and we may find out that the current hardware setup is lacking horse-power.

There are various options for building a scaleable backend, we're going to illustrate a couple of them highlighting the pros and cons of each solution:

Clustering:

"A computer cluster is a group of tightly coupled computers that work together closely so that in many respects they can be viewed as though they are a single computer. The components of a cluster are commonly, but not always, connected to each other through fast local area networks. Clusters are usually deployed to improve performance and/or availability over that provided by a single computer, while typically being much more cost-effective than single computers of comparable speed or availability." (from Wikipedia)

SmartFoxServer offers different options for running your applications on multiple servers:

Parallel instances:

An alternative to increase the scaleability of the socket server is to run multiple parallel instances. By splitting the virtual world into regions we can make each instance handle one portion of the world and share the common data in the clustered database server, which will be available to all regions.

Using this technique, the load balancing is delegated to the client application: the client will either automatically choose the right server based on the current traffic, or present a list of servers to the user allowing him to choose the destination.
( You can read more about performance and scalability in this f.a.q. )

The following diagram illustrates the final server architecture of our fictitious VirtuaPark project:

Server Architecture

 

» Securing the Virtual World

We've seen that MMOGs are pretty complex applications based on various server technologies, and for each of them we could write an entire book that delves into specific security concerns. Since this article is centered around the SmartFoxServer technology we will take a look at some common sense techniques and best practices to reduce the amount of hacking to the minimum possible.

 

» Development tips and tools

Now that we have analyzed the client/server architecture, scalability and security concerns, we should finally be able to put our hands on the keyboard and jump right into coding...

Even if the temptation is strong we should hold on for a moment and discuss a few more aspects of the development that we haven't mentioned so far. VirtuaPark will probably be a great success if we clearly have in mind what we want to achieve, and if we have set a number of realistic goals in terms of money, time and resource investments.

The following is a list of important aspects that should be taken into account before starting to develop our virtual world:

 

» SmartFoxServer based MMOGs

Club Penguin

Galaxseeds

SmartFoxServer powers some of the most creative and funny Flash-based communities and MMOGs around the web. You can check our Showcase Section and learn more about each project.

We'd like to mention Disney's Club Penguin (probably one the largest MMO ever created with Flash technology) which has become very popular in many countries all over the world. The community offers a highly interactive environment with hundreds of customizable items and furniture, engaging games, events and quests.

Galaxseeds is another great examples of an MMO with a unique science-fiction theme, games and tons of features.

Build-A-Bearvill is an great children oriented MMO with educational quests and adventures.

Gogofrog is an interesting experiment in social networking and MMOs that uses a real 3D engine optimized for Flash. The community allows users to create and customize their own "unlimited" spaces and share photos, music, documents...

YoVille is a colorful virtual world which integrates with Facebook and has more 150,000 daily active users.

 

» Conclusions

This article just scratches the surface of one of the most exciting and complex type of multimedia software development, we hope it will serve as an appetizer for further investigation and learning. As usual feedback is always welcome. You can leave your comments in our SmartFoxServer forum.

 


« Back to part 1 of the article