Game Development Community

dev|Pro Game Development Curriculum

Zen Worlds MMO Middleware - Design Sneak Peak

by Tony Richards · 03/24/2009 (11:45 am) · 10 comments

Lightweight but Industrial Strength


The foundation libraries being used for Zen Worlds are currently being used in mobile and embedded devices, so the core frameworks are extremely lightweight, but the same frameworks and libraries scale to handle thousands of clients utilizing less than a few megabytes of memory and less than 10% of one CPU core.

It's thread safe and multi-core ready, scaling nearly linearly as you add more CPU cores. The more CPU cores you have on your server the faster it performs and the less percentage of your overall CPU horsepower is devoted to networking. Less CPU and memory utilization means more simultaneous clients.

Service Oriented Architecture


Using SOA is a key design decision for anyone wanting to create something that is scalable.

By separating your game components into individual services that handle a single section of your game, you're free to dynamically restructure your physical and logical architecture. This allows automatic load balancing and failover, and provides for easier to maintain code.

For an MMO RPG as an example, you would separate your game components into individual services that each handle one task: Login, NPC Dialogs, Pathfinding, Characters, Trade / Auction, etc.

Data Grid


By organizing all of your data into a data grid, you get significantly higher performance than if your services were directly accessing a database.

The data grid can be organized such that all of the data for a particular subject area or service is located in the same process as the services requiring the highest bandwidth access to the data.

Subsets of the data can be split across multiple nodes, or even redundant nodes so as to provide for hot-standby of your data.

Writes are persisted through a transaction log and then to the database, or directly to your database depending on your needs, and then replicated to other nodes or game clients via a "publish / subscribe" mechanism and cached on the client side.

What's the advantage of this mechanism and the caching? No more DataBlocks! Your game zones, game zone data, meshes, textures and other assets are distributed via a publish / subscribe mechanism, making it so that updates can be pushed to clients immediately, which is fantastic for development and testing and moved over to your production system when you're ready to go gold.

The equivalent of Torque's "data blocks" are cached in a client local database and encrypted containers, making it so that they're only downloaded once, and only downloaded on demand according to your game rules.

Game Engine Agnostic


By creating middleware that doesn't target any specific game engine, developers can choose the game engine client that best suits the needs for their games, yet still benefit from the features provided by Zen Worlds.

We accomplish this feature through the use of frameworks and generic interfaces that abstract the implementation and ties everything together.

All you need is a bit of skill with C++ to integrate the middleware with your game and voila, your game scales to vastly huge numbers, capable of supporting millions of players and thousands of simultaneous players per zone.

Application Server


The heart of the framework is a C++ application server, much like JBoss, WebSphere, and many others that are available in Java and Python.

We chose to write a completely custom application server for performance and integration reasons. Since it's all pure ISO C++, it's cross platform, runs on Linux, Mac OS X and Windows, and easily integrates with your C++ code.

It also integrates with a scripting framework that makes it very easy for you to integrate your own scripting language or use an off the shelf language such as Lua or Python.

Frameworks and Plugins


Every core component is written as a plugin, making it very easy for you to integrate new pieces into your game clients and zone servers.

Just as GG did with TGEA 1.8.x for Audio (FMOD and OpenAL), we've taken this a step further and provide generic frameworks with plugins for physics, databases, A* pathfinding, community services, login / authentication services, etc.

With everything kept in separate compilation units, you only use what you need and don't even bother compiling that which you don't.

Licensing


Most of this is free and open source software, using ZLib so there are no copy-left restrictions. (i.e. you can use it commercially and you don't have to redistribute your source code.)

Some of this will be distributed as closed source as an MMORPG starter kit. Although the pricing is still yet to be determined, it will definitely carry an "Indie friendly" price tag.

Status and Roadmap


Much of this is complete and downloadable. The C++ application server, the networking, the plugin system, and all of the plugins mentioned are currently being beta tested. The lastest version of the source code is available for downloading on Sourceforge.net.

We will begin closed beta testing of the MMO frameworks in the next two months.

If you are interested in helping with a community project that integrates this framework with TGEA 1.8 (and/or possibly T3D in the future), please let me know. We will only be integrating the free open source portions, so anything that results from this will be free for the community to use.

And now for the obligatory image:

Arcanoria is one of the games being used to beta test Zen Worlds. I really like this screenshot even though the lighting is off a bit because it shows off his dynamic skies and fully dynamic water. (yes, the waves actually move!)

www.indiezen.org/screenshots/Arcanoria/Arcanoria_preview.jpg

Zen Development Blogs:

Zen and the Art of Indie Game Development

About the author

I am the founder of IndieZen.org, a website dedicated to the Indie 2.0 Revolution where a number of Indie game development studios and individuals collaborate and share a suite of custom built open source game development tools and middleware.


#1
03/24/2009 (12:20 pm)
Looks like a promising start for a presistent world server technology
#2
03/24/2009 (12:51 pm)
I'd like to see a blog giving some detail on integrating the new T3D.

I had no intention of buying T3D for another year or two until I saw this blogpost on Zen Worlds. I'm reconsidering my decision and would love to see your example before the May shipdate of T3D.
#3
03/24/2009 (1:37 pm)
Since Zen Worlds is not specifically designed for use with T3D (i.e. it can integrate with all of the C++ game clients) I don't exactly see how it would effect your decision to purchase T3D, but I'm glad you're reconsidering.

I think T3D is looking to be a fantastic upgrade.

Sadly, none of the games using Zen Worlds (Arcanoria, AIR, Legynds and Fractured Universe) will be ready for a public beta before T3D ships, so I don't think we will be able to show you any games using Zen Worlds before then.

Some of this design that I outlined is still under development and will not be ready for beta testing until June.

And even then, since Zen Worlds is free and open source (i.e. unfunded), it's likely we will not be purchasing T3D licenses until several months after T3D has been released.

But, after we've purchased T3D and integrated it, we will definitely be posting blogs and/or free resources showing how we did it.
#4
03/24/2009 (6:24 pm)
Are you guys going to be primarily pushing Ogre as the core rendering engine? Either way it looks interesting and hopefully you guys have good luck moving forward.
#5
03/25/2009 (6:42 am)
I just stumbled across this tonight, unfortunately just before bed, and now that I've gone through all your blogs I have to say you have my complete interest. I'll definitely be going through the codebase with a little bit more detail tomorrow.

Reason for interest: I've been currently trying to wrap my head around TNL, and playing with a little roguelike lib named TCOD on the client end. While not working on that I kind of go through my little list of things to consider in the future, which of course are long term dream material that aren't solving my current problems. The list includes such things as "scalability", "database integration", "offloading AI processes to their own server cluster", "ruby as a scripting language", among other things.

Imagine my surprise while reading about your project here!

Out of my final bit of curiosity for the night, the current 0.5.0 codebase on sourceforge could in theory allow me to build and connect plugins as it stands? Or are the closed beta features a key part in any of this?
#6
03/25/2009 (8:19 am)
Tony, thanks for your comments. I've subscribed your RSS and will keep tabs on the progress. I look forward to it.

My interest in T3D is exactly to build virtual worlds, hence why ZW caught my eye. Maybe in the future someone will show an example of what is involved to merge the two.
#7
03/25/2009 (9:05 am)
@Joshua - Most game clients being created with the framework are using Ogre for rendering, primarily because it more closely suites the needs of the game developers using it, but that does not preclude using other rendering engines.... in fact, we're encouraging it.

My purpose of post this blog was mainly to peak the interest of people wanting to use Torque with Zen... specifically T3D's new rendering engine / scene graph as it's looking very promising.

I am very interested in taking the necessary steps for integrating Zen with T3D.

@Brian -

Quote:Out of my final bit of curiosity for the night, the current 0.5.0 codebase on sourceforge could in theory allow me to build and connect plugins as it stands?

Yes.

Quote:Or are the closed beta features a key part in any of this?

No. All of the frameworks and key plugins have been implemented and were part of the 0.5.0 beta release that is downloadable from SourceForge.

We're actively working on updating our examples and documentation and I think that is all that you might be lacking to do what you want, from my understanding of it.
#8
08/29/2010 (8:37 pm)
Hi, we are now one year after.
Could you plz update us on where you are in the dev framework?

Have you reach the point with High volume testing?
I mean this framework is intended to manage persistent world, what's the Max number of player you test on your current version?

I can be interested to plug it on t3d to create open world with many player (>256)


Thanks,
#9
08/30/2010 (2:51 am)
We dropped direct support for Torque over a year ago... and in the end, you're asking the wrong questions.

Content creation, versioning, and player / community relationship management are hugely more important than simple volume testing.
#10
09/01/2010 (6:15 pm)
Sorry to hear that, what was the pb that push you to decide dropping Torque?

I'm not sure to follow you on this : "and in the end, you're asking the wrong questions"

You were positioning your middleware for Open World manager or I miss something.
This middleware can be use to create mmo game, so my question was just to get the status of it and if you were able to stress your middleware to see its limits.

[quote]Content creation, versioning, and player / community relationship management are hugely more important than simple volume testing.[quote]
For sure, I never said the opposite. I was just looking for a status and I also looked at your website, and I had difficulty to get a status for Zen Worlds.
For the moment, I was mainly interested in the "worlds" entity management with shard computer. I will manage this in another way with T3D.

by the way, good luck for your final release (soon as your july post in Zen forum).