India Launches Moon Mission

This is nifty:  Indian Moon Mission Launched.  Glad to see that somebody is doing something productive for the human race.  This news surprised me because I can’t remember hearing about any other space flights to the moon since, you know, the 1970s.  Wikipedia, however, says that five other lunar missions have been launched since the end of the space race — in 1990 (Japan), 1994 (NASA), 1998 (NASA), 2003 (ESA) and 2007 (China).

MMO Prototype Progress

Here’s the progress I made on my MMO engine this weekend:

I should probably figure out how to do a screencast or something; it’s more impressive when it’s moving. :)

The Cynical Election Roundup

By the way, I’m purposefully avoiding writing and especially reading further about the presidential election.  Thankfully I already have all the information I need to make a decision, because if I didn’t, I definitely wouldn’t be getting anything useful from television, radio or the blogosphere.  I feel badly for anyone actually trying to decide how to vote right now.

I’m still refreshing the Virginia blogosphere once or twice a day, but only to make sure that my aggregator is still running.  It’s impossible to read more than a line or two without a substantial increase in blood pressure.  Other than that, I only watch Comedy Central and NBC Nightly News to see if anything major is happening (besides the ubiquitous ”wild ride on the stock market,” that is).  So yeah, like, good luck with the last-minute mud-slinging, voter fraud and intimidation, or whatever.

Moving C++/CLI Properties Out Of Headers

A while back I railed against C++/CLI for its nonsensical inability to separate property implementations from the header file.  Well, it turns out you can do it – it’s just not widely reported.  Almost every example of a C++/CLI property shows it implemented in the header file.  But thankfully I stumbled upon an article about this very subject:  Splitting Properties Between Header And Implementation Files In C++/CLI.

Old Class.h:

    7 public ref class Effect

    8 {

    9 private:

   10    Route^ componentChain;


   12 public:

   13    property Route^ ComponentChain

   14    {

   15       Route^ get(void) { return this->componentChain; }

   16    }

   17 };

New Class.h:

    7 public ref class Effect

    8 {

    9 private:

   10    Route^ componentChain;


   12 public:

   13    property Route^ ComponentChain

   14    {

   15       Route^ get(void);

   16    }

   17 };

New Class.cpp:

   24 Route^ Effect::ComponentChain::get(void)

   25 {

   26    return this->componentChain;

   27 }

The key is the Class::Property::get and Class::Property::set syntax that I’d not seen documented anywhere before.  Hopefully now that there are two articles about this, it will move up higher in Google searches.

Evaluating MMO Engines

Before I embark too far on the insane idea of writing my own MMO engine, I thought it would be instructive to peek at some open source engines out there (gathered from the first few pages of a Google search).

At this point I am mainly interested in the specifics of their network implementation, because that is really the foundation on which everything else is built.  For reference, my design so far is leaning toward UDP sockets with variable-length packed binary structures, conceptually similar to the Quake network protocol if I remember right.  The idea is to maximize CPU efficiency (by avoiding expensive serialization and parsing routines) and minimize bandwidth requirements (by avoiding bloated serialization and parsing routines).

Black-Crystal.  (C#.)  No code releases that I can find, which is too bad, because I would have loved to see their .NET implementation.

Genecys.  (C, CVS Repository.)  The source code is not very easy to read and not very well commented, but I gather (from server/network.c and server/ninterface.c) that the design uses simple text commands over TCP streams.  This is precisely what I don’t want to use, because I don’t think it will scale very well.

OpenMMOG.  No code releases that I can find.

PlaneShift.  (C++, SVN Repository.)  This is an actual MMO that you can play, which makes it a compelling test case.  After perusing the source repository, it looks to be using UDP sockets (see common/net/netbase.cpp) and message structures similar to my design.  I am validated!  (Although, honestly, it’s not so much mine as it is John Carmack’s idea from the 1990s.)

Ryzom (NeL).  (C++, SVN Repository).  I can’t tell what it’s doing because the repository gives me internal server errors (“Rails application failed to start properly” — figures :).  Based soley on the filenames in the source code, there appears to be UDP and TCP code.  I’m very interested in seeing what it does because it purports to be able to update hundreds of entities in an area with modest bandwidth usage.  I have a number of ideas of my own in that department, and I’m curious if they are similar.

Torque MMO Kit.  (Python, Repository).  (I am not positive, but I think this is actually descended from the original Tribes game engine.)  This appears to be one of the most mature codebases around, but I’m not a Python guy, so much of this is foreign to me.  I can’t find any specific network layer — I think it’s probably embedded in whatever application parses the .cs files, but there’s no source code for that.  In any case, an entire implementation of an MMO game is there, so it’s a good reference to have handy.  It would be interesting to try Minions of Mirth to see how well the engine works.

vbGORE.  (VB6, Downloads.)  Yeah, I know, it’s written in VB6, but I downloaded it anyway.  It actually looks surprisingly mature.  Digging into the GOREsock\GameClient\GOREsock.ctl code reveals they’re using TCP byte streams.  I can’t make much sense of the rest of the codebase, but there might be something useful in there somewhere.  I’m not going to install VB6 again to look at it in depth, though.

WorldForge.  (C++, Downloads.)  WorldForge appears to be well-known, but I can’t find any real games based upon it.  It’s broken into a number of distinct libraries — the network library is called “Atlas,” and it appears to be a highly generalized API, which usually means scope creep from trying to be everything to everybody.  It looks like it’s using a TCP stream and serialized objects, encoded as XML or “packed” (see the Atlas::Codecs namespace).  Unfortunately, the code looks like it’s getting close to the “big ball of mud” stage of entropy. :)

New Collection vs. Collection.Clear

Quick, which one of the following implementations is faster to use in a time-critical section of code:

Implementation 1:

   25 for( int i = 0; i <</SPAN> iterations; i++ )

   26 {

   27     List<</SPAN>int> myList = new List<</SPAN>int>();

   28     for( int j = 0; j <</SPAN> 1000; j++ ) myList.Add( j );

   29 }

Implementation 2:

   34 List<</SPAN>int> myList = new List<</SPAN>int>();

   35 for( int i = 0; i <</SPAN> iterations; i++ )

   36 {

   37     myList.Clear();

   38     for( int j = 0; j <</SPAN> 1000; j++ ) myList.Add( j );

   39 }

Answer:  The second one, by about 33%.

    1 using System;

    2 using System.Collections.Generic;

    3 using System.Diagnostics;

    4 using System.Text;


    6 namespace CollectionSpeedTest

    7 {

    8     class Program

    9     {

   10         static void Main( string[] args )

   11         {

   12             long time1 = Stopwatch.GetTimestamp();

   13             Method1( 1000000 );

   14             long time2 = Stopwatch.GetTimestamp();

   15             Method2( 1000000 );

   16             long time3 = Stopwatch.GetTimestamp();


   18             Console.WriteLine( “Method1: {0}”, time2 time1 );

   19             Console.WriteLine( “Method2: {0}”, time3 time2 );

   20             Console.ReadLine();

   21         }


   23         public static void Method1( int iterations )

   24         {

   25             for( int i = 0; i <</SPAN> iterations; i++ )

   26             {

   27                 List<</SPAN>int> myList = new List<</SPAN>int>();

   28                 for( int j = 0; j <</SPAN> 1000; j++ ) myList.Add( j );

   29             }

   30         }


   32         public static void Method2( int iterations )

   33         {

   34             List<</SPAN>int> myList = new List<</SPAN>int>();

   35             for( int i = 0; i <</SPAN> iterations; i++ )

   36             {

   37                 myList.Clear();

   38                 for( int j = 0; j <</SPAN> 1000; j++ ) myList.Add( j );

   39             }

   40         }

   41     }

   42 }


Method1: 20962096146
Method2: 13987606779

Me vs. the MMO Engine

So I decided to write an MMO game engine*.

No, really.

Okay, I know, I know, this is the fifth or sixth time I’ve started a game engine project like this, and it will probably end up the same as all the others:  Nifty ideas, but without considerably more time and structure and funding — and, you know, an actual game idea — it will end up in source code purgatory, picked over for an occasional gem of an idea but otherwise left to rot.

Why an MMO and not something simple like, say, Space Invaders?  Well for one thing I’ve already written a couple of different 2D game engines (now residing in purgatory) so there isn’t a lot to explore there.  Beyond that, MMOs are more interesting to me because they have a much broader variety of technologies to explore.

As usual, I’m going to build most of the framework with .NET since that’s the quickest way for me to get a prototype up and running.  I’m not planning to use any third-party game engines (Not Invented Here!), but I do want to use a 3D rendering engine for the client (which just by itself represents a whole set of challenges).  And by the way, no, I still don’t have a game idea (well, that’s not entirely true, but certainly nothing more than a vague idea) — I’m only interested in the underlying technology at this point.  And if anyone is reading this that does have a game idea — no, I’m not interested in developing your game (unless there’s a decent salary attached, of course).  This is purely an intellectual exercise.

This should keep me busy until… well, until the next shiny bauble comes along to grab my attention.

* If you don’t understand the ramifications of that statement, it’s roughly equivalent to me saying, “so I decided to memorize the encyclopedia” or “so I decided to perform a heart transplant.”

EVE Online Impressions

Before I wasted my money on WAR, I toyed with the idea of getting EVE Online instead.  The idea of a spaceship-based MMO is fascinating — it harkens back to the golden age of TradeWars on the local dialup BBS — and I’ve wanted to try it out for, well, years.  So now that WAR is gone, I went ahead and downloaded the 21-day EVE Online free trial through Steam and played with it over the 3-day weekend.


  • It’s very different from your typical MMORPG.
  • The graphics are way cool, and pretty fast even on my pitiful GeForce 7600.
  • It’s actually massive — all the players are all together on one server, like the good old days.
  • Skills train even while offline.
  • The market is very cool.


  • The learning curve is pretty steep for a game.  It’s not insurmountable, just don’t expect to jump right in and have any clue what to do.  Do not skip the tutorial and read the banter in the “rookie help” chat channel – there are actually quite a few helpful people in there (not to mention quite a few of the usual assortment of MMO dorks).
  • Downtime!  It takes sooooo long to navigate between planets and solar systems.  It’s like taking a WoW flight to go everywhere.  At first, it’s cool to look at the pretty graphics while your Autopilot warps you around, but after the first few jumps it gets pretty tiresome.
  • More downtime!  Fixed times to train skills, manufacture items and research technology means a whole lot of killing time while waiting for tasks to finish.
  • I started an alt to try a different character, tried to train a skill, and it told me I couldn’t because another character on my account was already training a skill!  (I left my other character training something that took over 24 hours so I could upgrade my ship.)  Only one character per account can train skills at a time?!?  That’s beyond ridiculous.  I’d like to think that’s just a limitation of the trial account but this forum thread confirms it’s not just me.
  • There’s a staggering number of overlapping windows to manage in the interface.
  • The font size is microscopic when you run at high resolutions, which is basically a requirement because of the aforementioned overlapping windows.

I’m not sure there’s enough interesting things to do in this game to keep me beyond the free trial (or even to the end of the free trial).  In fact, it seems like once you finish all the missions from your first Agent, there’s nothing to do except mining.  And mining in this game is about as tedious as you can get, at least at the newbie levels.  You have to warp out to an asteroid belt, find and motor over to an asteroid, zap it with your mining laser for what seems like hours even just to fill your tiny, tiny newbie cargo bay, then warp back to the station to move the ore to your “bank” before you can refine it.  It gets faster as you buy enhancements for your ship, but at no point does it become fun.  Agent missions are far more entertaining, but after the first series, the game doesn’t lead you to any more — you have to find them on your own, which is a rather daunting task.

Because of all the downtime, the only sensible way to play this game would be to setup a dedicated computer for it.  That way you can continue to work on your main computer, and only occasionally glance at the EVE screen to see if it’s finished whatever task you started.  (Right now, for example, I’m training skills in the background while I get caught up on blog posts.)  Otherwise, you’ll find yourself staring blankly at the screen as hours of your life disappear… sort of like watching cable news channels during the day.

P.S. Don’t be one of those dorks expecting EVE to be a precise scientific simulation of astrophysics.  Yes, you can warp through planets and no there’s no gravity.  I saw somebody even complaining about the lack of “blue shift.”  Sheesh.

WAR Report, Cultivation

One quick note on the WAR Cultivation skill:  I applaud the concept — it’s a very cool idea to be able to plant seeds and grow them into herbs and things.  Unfortunately the implementation in WAR is just awful.  It takes about 2 full minutes to grow a single plant.  Which would be fine if you could start it, then go about doing something else.  And in fact you can — but you can’t if you want to add water and nutrients, because you have to add those things by dragging them from your inventory to the cultivation window at specific times during the growth cycle.  So you can only drag over soil in the beginning, water in the middle, and nutrients at the end.  Which means you have to sit there doing nothing else but maintaining the cultivation window for 2 full minutes while a plant grows.  That gets old really fast.

All it would take is one simple change to make it better:  Allow the player to “pre-load” the soil, water, and nutrients by dragging them over any time before they are needed.  You’re welcome, Mythic designers.

WAR Report, Fizzled Out

Okay well I cancelled my WAR subscription and uninstalled it.  Mrs. Krehbiel was starting to get annoyed and it was way too much of an uninspiring game to try to defend it. :)  I should have stuck with my personal ban on EA games I guess.  It’s kind of a huge disappointment when a game released in 2008 is basically an exact clone of a game released way back in 2004.  You wouldn’t think it would be possible for there to be even less innovation in the gaming industry, but there you go.

To wrap things up, my witch hunter got to level 20 and bought a horse (which is basically the halfway point since there’s a level 40 cap), and the game did not become even a tiny bit more fun.  In fact it kept getting worse, because the higher your level gets, the faster you run out of quests and the more grinding you have to do.  And you can forget about gaining experience by going into scenarios:  Even if that was a fun thing to do, I wasn’t able to get into a scenario for days on a low population server.  I didn’t time it exactly, but I must have been in queues for well over an hour without any response.  By that point, I’d have to log out or switch characters to relieve the boredom.