Sherwood Alpha (SWD meets "Molehill")

August 5, 2011



As many of you know from comments on our Facebook fan page I have been working with Adobe's new Flash Stage 3D API with the intention of porting Sherwood Dungeon to this technology. Previously codenamed "Molehill" by Adobe, Stage 3D will be launched with Flash Version 11 in a few months. A beta version of the Flash 11 player can already be downloaded from the Adobe Incubator site.

Sherwood Dungeon took over six years to reach it's current form, so porting it into a different programming language with an entirely new 3D engine is daunting. As with the original, I'm planning to document my progress here along with various tests and unfinished versions of the game. This process will take a while, but with over a million monthly players in the current Shockwave 3D based version of the game, it's worked before.

I decided on a project code name of "Sherwood Alpha" because it's feels a lot like going back to the first days of Sherwood development. In 2004 there was a much smaller player community and I was still working on solving many of the technical problems of running a browser based fantasy MMO in Shockwave. The player community and our discussions reflected that early adopter stage of development. Over time that conversation evolved from technical issues to more of a game design focus, but it looks like with "Molehill" those days are back.

Flash "Molehill" vs Shockwave 3D

One thing I have learned is that Molehill is definitely not a silver bullet. In fact, I've actually found in real world situations right now in early tests Shockwave 3D is kicking the crap out of Flash Stage 3D in terms of performance and file size. The main reason for this is that Adobe deliberately limited the scope of Stage 3D API leaving much of the traditional "game engine" work to third party developers. This creates competition between engine developers, like Flare 3D, Away 3D and Alternativa3d, which is ultimately a good thing for the future of the technology. However, that being said, those engines are limited to the performance of Flash's byte code and AS3.

Adobe used "Tron" as Shockwave 3D's original code name way back in 1998 and it's kept up well over the years, despite being treated like Flash's older bastard step brother. Shockwave works a little differently than Flash and relys more heavily on plugins or "Xtras" that are coded in C++. The games themselves are coded in a slower than AS3 byte code based programming language called Lingo. That being said, Shockwave 3D is a much higher level API than Molehill. It includes many of the features expected of a game engine like Ageia physics, raycasting, progressive mesh LOD systems, bones animation and blending, etc. The big difference is that once Lingo tells these features what to do, they are running at complied C++ speeds, not in AS3 byte code speeds. So although Molehill may be quicker at pure 3D GPU rendering, Shockwave is still quicker at many of the other CPU bound features you need to run a complex 3D game. For the types of operations I use in Sherwood, at this point Shockwave 3D is still significantly faster.

The other major difference is in file size. Shockwave imports or embeds a 3D file format developed by Intel Architecture Labs called W3D. Adobe also owns a very similar format for Acrobat called X3D. These formats use an adjustable lossy compression format for 3D models and animation. Think of it as JPG compression but for 3D models. It works well. It early days for the Molehill engine developers and sexy features like normal mapping and fancy lighting modes are still the priority over boring things like 3D compression. There is an effort to support some of the standard 3D formats like OBJ and Collada but these are way to bloated and inefficient for embeding into a browser game. Particularly with animation heavy game character files, Shockwave's W3D is half the size of any of the formats I've seen with the new Flash game engines, including the proprietary engine formats. Right now the download size of Sherwood Dungeon would double under Flash. This point actually pisses me off because Adobe owns both W3D and X3D and it seems like such an obvious fit.

Now to be fair, Flash 11 is in beta, many of the 3D engines are in pre-release and I don't have the time invested yet to come up with a new bag of tricks to get around the performance bottlenecks that have come up. Ultimately the decision to move to Flash is a long term choice for our future. A 98% install base for Flash compared to Shockwave's 50% means many new players and potentially new platforms. Also the writing seems to be on the wall for the future of Shockwave. Why does Adobe really need two overlapping 3D browser technologies? Maybe it's not today, but at some point in the future some big-wig at Adobe is going to pull the plug on Shockwave. Flash Molehill will eventually fulfill all the hype around it as the game engines get more mature. Ultimately I think this is the right move for us and I'm having a lot of fun coding in AS3.

Sherwood Dungeon "Molehill" Stage 3D Test

MMORPG Dragon

Although this project has already been going since before the launch of the War Horse and Paladin, it's really only been recently that the Molehill 3D engines have been stable and feature complete enough to do more than just experiment. I have an early test of the Sherwood Castle environment running in Flash using the Flare 3D engine for you to see. Keep in mind this is just a test of the Molehill technology using 3D models from the Shockwave version. I'm experimenting with normal mapping, dynamic lighting, layered shaders and alpha sorting. I'm also testing to see if I can take a similar approach to world building, terrain generation and animation blending used in the Shockwave version of the game. There is no collision detection so you can walk through obstacles and there are some glitches that I expect to sort out over time and with later versions of the engine.

You first need to install the Flash 11 Player from the Adobe Labs Incubator Site:
http://labs.adobe.com/downloads/flashplayer11.html

The Sherwood Test URL is here:
http://www.SherwoodDungeon.com/SherwoodAlpha.html

Hope you like it. There's more to come in the near future. 

Gene Endrody
[email protected]