<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>T=Machine &#187; system architecture</title>
	<atom:link href="http://t-machine.org/index.php/category/system-architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://t-machine.org</link>
	<description>Internet Gaming, Computer Games, Technology, MMO, and Web 2.0</description>
	<lastBuildDate>Sun, 05 Sep 2010 18:24:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Speaker Evaluations &#8211; GDC Austin 2009</title>
		<link>http://t-machine.org/index.php/2009/11/21/speaker-evaluations-gdc-austin-2009/</link>
		<comments>http://t-machine.org/index.php/2009/11/21/speaker-evaluations-gdc-austin-2009/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 21:59:18 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[massively multiplayer]]></category>
		<category><![CDATA[network programming]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://t-machine.org/?p=738</guid>
		<description><![CDATA[Conferences don&#8217;t make these public. But they should. So &#8230; here are the evaluations (from the audience) for our panel session at AGDC 09. Judge for yourself whether you want to attend any future sessions featuring us again (Adam Martin, Bill Dalton, Rick Lambright, Joe Ludwig, Marty Poulin). Head Count: 74; Evaluations: 32 (43% response [...]]]></description>
			<content:encoded><![CDATA[<p>Conferences don&#8217;t make these public.</p>
<p>But they should.</p>
<p>So &#8230; here are the evaluations (from the audience) for <a href="http://t-machine.org/index.php/2009/09/20/agdc-2009-killing-the-sacred-cows-of-mmo-technology/" >our panel session at AGDC 09</a>.</p>
<p>Judge for yourself whether you want to attend any future sessions featuring us again (Adam Martin, Bill Dalton, Rick Lambright, Joe Ludwig, Marty Poulin).</p>
<h4>Head Count: 74; Evaluations: 32 (43% response rate)</h4>
<ul>
<li>Overall rating of the presentation &#8211; 88% (AVG: 86%)
<li>How relevant was the topic to you? &#8211; 86% (AVG: 84%)
<li>How well did this class meet your expectations? &#8211; 94% (AVG: 84%)
<li>Would you recommend this session to a colleague? &#8211; 90% (AVG: 84%)
<li>Evaluate the speakers&#8217; ability to communicate &#8211; 94% (AVG: 86%)
<li>If there were visual aids (slides) how were they? &#8211; 74% (AVG: 60%)
</ul>
<p>All of those are above average, and I&#8217;m glad that a particularly high number would recommend the session to their colleagues.</p>
<p>It seems that we did particularly well on fulfilling the remit (very high number for &#8220;met expectations&#8221;), and that our speakers had an awesome ability to communicate (almost 10% higher than average for the other speakers at the conference).</p>
<h4>Audience Comments</h4>
<ol>
<li>The most entertaining session I attended, but didn&#8217;t sacrifice information value.
<li>Interesting format, I wouldn&#8217;t mind seeing more of this, but it is time consuming
<li>Good stuff
<li>Slow, confused start lost valuable time for Q&#038;A
<li>Should have done middleware
<li>Only 3 topics covered. Expected others
</ol>
<p>Comment 4 &#8211; yeah, something I&#8217;m unhappy about too, (it wasn&#8217;t our fault, it was the people running the conference), but there was nothing for it but to grin and carry on. Someone screwed-up the radio microphones, and we lost a lot of time at the start waiting for them to fix it. There was nothing we could do &#8211; they had connected the mics from a different room to *our* speakers. We didn&#8217;t find out until the person in the other room started talking, and it all came out through our speakers :(.</p>
<p>Comment 6 &#8211; we covered 4 topics (oops, audience can&#8217;t count :P). We all wanted to do more, but at GDC conferences, the organizers only give us 1-hour slots. With 4 speakers + moderator, I think that was pretty good, especially considering the time we lost at the start.</p>
<p>Perhaps someone will clone this format for a future conference (seems a good idea), and try to get a 2-hour slot for it?</p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2009/11/21/speaker-evaluations-gdc-austin-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New page &#8211; MMOG Development Links</title>
		<link>http://t-machine.org/index.php/2008/04/24/new-page-mmog-development-links/</link>
		<comments>http://t-machine.org/index.php/2008/04/24/new-page-mmog-development-links/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 16:56:39 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[computer games]]></category>
		<category><![CDATA[massively multiplayer]]></category>
		<category><![CDATA[mmog links]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://t-machine.org/?p=167</guid>
		<description><![CDATA[With some WordPress-Fu, I&#8217;ve added a page that&#8217;s a category and auto-includes links with custom meta-information. Or, in other words, there&#8217;s now a page where I can effortlessly post all my various bookmarked links to do with MMO development &#8211; and add my own commentary to each link &#8211; which you can&#8217;t ordinarily do. Which [...]]]></description>
			<content:encoded><![CDATA[<p>With some WordPress-Fu, I&#8217;ve added a page that&#8217;s a category and auto-includes links with custom meta-information.</p>
<p>Or, in other words, there&#8217;s now a page where I can effortlessly post all my various bookmarked links to do with MMO development &#8211; and add my own commentary to each link &#8211; which you can&#8217;t ordinarily do. Which is why it&#8217;s taken me some time to get around to it (previous efforts to do this without customizing WordPress, or using plugins only, failed).</p>
<p>The (practically empty) page in all it&#8217;s (non-)glory can be found here:</p>
<blockquote><p>
<a href="http://t-machine.org/index.php/category/mmog-dev/" >http://t-machine.org/index.php/category/mmog-dev/</a>
</p></blockquote>
<p>Over the coming weeks, I&#8217;ll be posting much more stuff to it. I hope.</p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2008/04/24/new-page-mmog-development-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entity Systems are the Future of MMOs Part 4</title>
		<link>http://t-machine.org/index.php/2008/03/13/entity-systems-are-the-future-of-mmos-part-4/</link>
		<comments>http://t-machine.org/index.php/2008/03/13/entity-systems-are-the-future-of-mmos-part-4/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 23:00:20 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[computer games]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[games design]]></category>
		<category><![CDATA[massively multiplayer]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://t-machine.org/index.php/2008/03/13/entity-systems-are-the-future-of-mmos-part-5/</guid>
		<description><![CDATA[Massively Multiplayer Entity Systems: Introduction So, what&#8217;s the connection between ES and MMO, that I&#8217;ve so tantalisingly been dangling in the title of the last three posts? (start here if you haven&#8217;t read them yet). The short answer is: it&#8217;s all about data. And data is a lot harder than most people think, whenever you [...]]]></description>
			<content:encoded><![CDATA[<h4>Massively Multiplayer Entity Systems: Introduction</h4>
<p>So, what&#8217;s the connection between ES and MMO, that I&#8217;ve so tantalisingly been dangling in the title of the last three posts? (<a href="http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/" >start here if you haven&#8217;t read them yet</a>).</p>
<p>The short answer is: it&#8217;s all about data. And data is a lot harder than most people think, whenever you have to deal with an entire system (like an MMO) instead of just one consumer of a system (like the game-client, which is the only part of an MMO that traditional games have).</p>
<p>Obviously, we need to look at it in a lot more detail than that. First, some background&#8230;<br />
<span id="more-134"></span></p>
<h4>Massively Multiplayer Game Development 101</h4>
<p>There&#8217;s a few key things you need to be aware of in MMO development. Many professional game developers know some or all of these already, but seeing as I&#8217;ve even met MMO developers who didn&#8217;t know them all, and much of what I&#8217;m going to say later on won&#8217;t make sense without it, I&#8217;m going to do a quick recap. Bear with me; I&#8217;ll have to do some gross generalization to keep this short (so it won&#8217;t be 100% true or accurate).</p>
<h4>1. The vast majority of the cost of MMO development is content</h4>
<p>Content is:<br />
 &#8211; quests (missions, storylines, scripted events)<br />
 &#8211; 3D areas (meshes, textures and logic for: zones, dungeons, towns, landscapes)<br />
 &#8211; loot (item graphics, drop rates, item stats, item abilities)</p>
<p>Content is NOT:<br />
 &#8211; Fancy 3D graphics<br />
 &#8211; Physics engines<br />
 &#8211; AI<br />
 &#8211; Core game rules</p>
<p>&#8230;which tend to make up the bulk of non-MMO games.</p>
<p>As Raph Koster (amongst others, but IIRC Raph was one of the first to come up with a clear concise description) pointed out close to 10 years ago, the rate at which players consume content vastly excedes the rate at which developers generate it &#8211; you have perhaps 50 people working purely on content generation on a modern MMO, and you have perhaps 500,000 people consuming it. The problem is, those 500,000 use Thottbot, so they *share* their discoveries, and consume at a rate proportional to the square of their number, whereas it&#8217;s generally produced at a rate more directly proportional to the number of developers.</p>
<p>There are many ways to work around this issue, but most of them end up producing or managing vast amounts of content (they just get more cunning in exactly how that content is generated).</p>
<h4>2. The vast majority of the development of an MMO takes place AFTER launch</h4>
<p>The ten-year-old MMO&#8217;s have been releasing expansions and content updates every 6 to 18 months; modern MMO&#8217;s release new content every 3 to 12 months. &#8220;New content&#8221; in this context generally means entirely new 3D areas with entirely new quests and entirely new items, not to mention entirely new special abilities and new plotlines. i.e. complete &#8220;miniature MMOs&#8221;.<br />
The only bits you don&#8217;t need to keep rewriting are the technology, although nearly all MMOs have done minor updates throughout their lifetime, usually when a new expansion pack is released as a retail boxed product (if you buy and install the expansion, not only do you get the bonus content, but all the &#8220;old&#8221; content becomes higher resolution / more pretty / added sparkly bits). Although &#8230; I long wished there was more updating of tech, and three major MMOs are currently doing huge updates: Ultima Online (1997) <a href="http://www.uoherald.com/kingdomreborn/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.uoherald.com/kingdomreborn/');">recently massively renovated their 10-year old graphics as Kingdom Reborn</a>, Eve Online (2001) just completed their &#8220;shininess and detailed spaceships with added humanoids&#8221; update known as <a href="http://www.eve-online.com/trinity/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.eve-online.com/trinity/');">Trinity</a>, and Anarchy Online (2001) recently previewed <a href="http://www.mmorpg.com/gamelist.cfm?GAMEID=10&#038;SETVIEW=features&#038;LOADFEATURE=1718&#038;bhcp=1" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.mmorpg.com/gamelist.cfm?GAMEID=10&#038;SETVIEW=features&#038;LOADFEATURE=1718&#038;bhcp=1');">massive sweeping changes to their very poor detail and draw distance client</a> (they say &#8220;the current engine was designed before there really were GPUs to utilize&#8221; but that is blatantly false as the GeForce had been on sale for almost 2 years when they launched, and the TNT,Voodoo, et al for years before that. Yes, I was bitter that when it launched the most recent hardware it supported was 5 years old :)). All represent major changes to the look and feel of the games &#8211; it&#8217;s hard to overestimate the visual impact of these. Runescape did their mega update (&#8220;Runescape 2&#8243;) a couple of years ago.</p>
<p>However &#8230; all are bringing games that were NOT cutting edge at launch up to a standard that is still well short of what is cutting edge now. This is important to understand: graphical quality is (according to what the successful MMO&#8217;s deploy) definitely not the main selling point for these games, unlike almost all other successful games you can possibly buy.</p>
<p>So &#8230; what is that &#8220;development&#8221; that takes place after launch? It&#8217;s content, not engine. And even when it&#8217;s engine (better graphics, better physics) it&#8217;s always a minimal improvement by the standards of standalone PC and console titles of the time.</p>
<p>For reference, many MMO&#8217;s after launch end up with LARGER development teams than they had in the 3-5 years of development leading up to the launch. All that extra content requires a lot of people (not to mention keeping all the old content working, updating it where it conflicts with new content, etc).</p>
<p>On top of all that, though, there is the issue of customer support. When you launch a traditional game, that&#8217;s it. Done. Over the last 15 years there&#8217;s been a trend towards launching occasional &#8220;patches&#8221; and even minor content updates &#8211; but mostly bugfixes &#8211; which, incidentally, I suspect has been largely driven by publishers learning from the MMOs: releasing a content patch for an old game is a good way to get extra marketing / publicity and increase some sales. Bethesda&#8217;s TES4/Oblivion even went as far as to <a href="http://en.wikipedia.org/wiki/The_Elder_Scrolls_IV:_Knights_of_the_Nine" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/The_Elder_Scrolls_IV:_Knights_of_the_Nine');">charge for the patches</a>.</p>
<p>MMO&#8217;s require a lot more work than that: since MMO&#8217;s are all monetized off continuous play (i.e. the more each player plays, the more money the publisher makes), either through monthly subscriptions or through in-game commerce, it is imperative to keep all the players playing as long as possible. If a player plays your MMO for 12 months instead of 6, you&#8217;ll make twice as much profit; if they play your console title for 12 months instead of 6, you&#8217;ll make no more money and will probably cannibalize your sales of the sequel.</p>
<p>So. Total lifetime development cost is a lot more important, financially, to an MMO than the pre-launch development cost.</p>
<h4>3. The way the core logic works now is not how it will work forever</h4>
<p>Sooner or later, you <a href="http://www.urbandictionary.com/define.php?term=nerf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.urbandictionary.com/define.php?term=nerf');">nerf</a>.</p>
<p>Usually because you(r players) discover a disproportionately powerful game tactic in PvP that you didn&#8217;t think of which is unbalancing and ruining the game, and so you &#8220;have&#8221; to fix it.</p>
<p>Sooner or later, you choose to break every absolute rule of your game logic, because a new expansion wants to slightly redefine and &#8220;freshen&#8221; the core game.</p>
<p>And that means you have to be able to break every rule you ever hardcoded into the game-logic. Worse, it means you have to be able to handle the fallout (all the bugs that the change introduces, plus all the invisible bugs that were originally there but had no noticeable effect and now suddenly have visible effect, the new security holes, etc).</p>
<p>Since the ongoing development of the game (post launch) is greater than the initial development in scope and cost, over the lifetime of the game it is more important to make it easy to change the core logic &#8211; and to react to side effects of that change &#8211; than to be able to make the core logic easily in the first place.</p>
<h4>4. Even a moderately successful MMO generates gigabytes of data every 24 hours</h4>
<p>The progress of every player of the MMO has to be uniquely independently tracked, so that the game can remember for each player which quests they&#8217;ve completed, which equipment they have, etc. With 100,000 players, that data racks up quickly. A lot of it can be thrown away every day (for instance, you don&#8217;t generally need the history of how many hitpoints you had at the end of every day), but a lot of it has to be kept forever (whether you completed a given quest, and for some quests how exactly you completed it).</p>
<p>However, the trend at the moment is towards keeping ALL this data, in the form of historical records of your personal game experience &#8211; e.g. the automatic &#8220;blog&#8221; that is created whilst you play Vanguard, which e.g. updates every time you level up, or kill a monster, or die, etc.</p>
<p>This latter kind of data alone is generated at the rate of around 30Gb every 24 hours.</p>
<p>And any of that data that gets used in-game (e.g. even if just referenced in a conversation with an NPC) has to be programmatically accessible.</p>
<p>Ultimately, MMOs have to store, retrieve, and update vast databases. There is a huge decades-old industry that specializes in providing software to manage databases of this size and larger, but <a href="http://t-machine.org/index.php/2008/02/21/gdc08-sql-considered-harmful/" >MMO developers don&#8217;t like SQL and Relational programming</a>. This is a real problem &#8211; relational databases can handle the load, but relational programming is fundamentally incompatible with Object-Oriented programming. The net effect is that programmers who have to write their data to disk find it boring, difficult, and irritating to do &#8211; and that leads to mistakes and greatly increased bugs, as well as reduced functionality (because no-one wants to write or add to the code to add the new features more than they absolutely have to).</p>
<h4>MMO Development Priorities</h4>
<p>The net effect of these aspects of MMO development is that the long term profitability of an MMO can be greatly affected by a bunch of simple issues:</p>
<ul>
<li>How much effort is required to change the data used to describe an in-game item</li>
<li>How much effort is required to add (or remove) new (old) types of in-game item</li>
<li>How re-usable is the content</li>
<li>How easy it is in practice (i.e. how much coding is needed) to re-use re-usable content</li>
<li>How much specialist knowledge of the game code, overall game design, and details of the game systems is needed to modify the content and logic (can new team members be effective as the team who originally wrote the game pre-launch?)</li>
<li>How exportable is the data generated by playing the game (progress, achievements, player-history, etc)</li>
<li>How analysable is the game-data generated by playing (to make decisions about what to change, and check that game improvements have improed things)</li>
<li>How modifiable the core-content is</li>
<li>How easy it is to change individual rules and check the side-effects of the changes</li>
<li>How many of all the above changes can be done WITHOUT requiring a programmer (can designers change code themselves? can artists?)</li>
<li>How much can third-party specialist systems be utilised for server-side service provision</li>
</ul>
<p>Leading to a few rules of thumb that are often adopted by commercial MMOs:</p>
<ol>
<li>Use commercial databases for all persistent data-storage</li>
<li>Use Relational Databases and allow arbitrary general data requests</li>
<li>Implement as much as possible of the game-logic as raw data rather than as compiled data (and preferably as data rather than source code)</li>
<li>Use standard but simple to learn scripting languages where data isn&#8217;t expressive enough</li>
<li>Do lots and lots of testing during development</li>
<li>Do even more testing post-launch EVERY SINGLE TIME you consider changing ANYTHING on the live servers</li>
</ol>
<p>Some of those aren&#8217;t very effective (too vague), others are horrifically expensive (it takes a lot of people to &#8220;test EVERYTHING&#8221; every time you make a change to a live game). None of them are great for performance in and of themselves (although they can be made highly performant, that requires extra work), and none of them are &#8220;programmer friendly&#8221; &#8211; in fact, they&#8217;re all deliberately programmer UNfriendly, being in there for the benefit of non-programmers.</p>
<p>NB: this is in no way a comprehensive or exhaustive list; I&#8217;m trying to give merely a flavour of the thing here for people who aren&#8217;t familiar with typical MMO dev processes. I don&#8217;t know any real MMO that faces only those challenges and uses only those rules of thumb, but they are indicative of what is used, and very very roughly explain why those things are used.</p>
<p>And so on to Entity Systems, and how they can affect the typical MMO development process by helping with problems or making the current solutions more programmer-friendly&#8230; (which is going to be Part 5. This is getting long enough already).</p>
<p>NEXT: <a href="http://t-machine.org/index.php/2009/10/26/entity-systems-are-the-future-of-mmos-part-5/>Part 5</a></p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2008/03/13/entity-systems-are-the-future-of-mmos-part-4/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Central Tech: Essential strategy, or complete waste of time?</title>
		<link>http://t-machine.org/index.php/2008/02/27/central-tech-essential-strategy-or-complete-waste-of-time/</link>
		<comments>http://t-machine.org/index.php/2008/02/27/central-tech-essential-strategy-or-complete-waste-of-time/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 17:17:36 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[games industry]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://t-machine.org/index.php/2008/02/27/central-tech-essential-strategy-or-complete-waste-of-time/</guid>
		<description><![CDATA[I work at a company where managing and directing a subset of the global core-tech is part of my day-to-day job, and I&#8217;ve been trying to find good, positive ways forwards. After a year in this role, I&#8217;m looking back and wondering whether it&#8217;s working for us, and where it&#8217;s been good and where it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I work at a company where managing and directing a subset of the global core-tech is part of my day-to-day job, and I&#8217;ve been trying to find good, positive ways forwards. After a year in this role, I&#8217;m looking back and wondering whether it&#8217;s working for us, and where it&#8217;s been good and where it&#8217;s been bad. I don&#8217;t know what the perfect solutions are, so I&#8217;m just going to document the issues I&#8217;ve been wrestling with, and my current thoughts on what causes them, and my current ideas on what can be done to fix or avoid them. Personally, although I&#8217;m confident there is at least some role for some form of central technology in many games companies, I&#8217;m not sure yet what that role is.</p>
<h4>Definition</h4>
<p>Interestingly, there are no clear definitions on Google/Wikipedia for either &#8220;central technology&#8221; or &#8220;core technology&#8221; (the two main names I&#8217;ve heard used throughout the games industry). I see that as a warning that this is pretty under-explored territory I&#8217;m heading in. Cool.</p>
<p>The vague definition is: &#8220;sharing technology between multiple game-project teams and taking any new technology created during a game project and re-using it afterwards for other projects&#8221;.</p>
<p>There appear to be two major concepts wrapped up in the central-tech teams that I&#8217;ve seen. Some teams have only one of these, some have both. Usually, there are substantial examples of both, mixed within the same team. Often, the team has one focus in particular, but people outside the team in the rest of the company pick one or the other to *believe* the team has as their focus, depending upon what they personally most want out of the team. When this is divergent from the team&#8217;s own internal focus, things are off to bad start already.</p>
<p>Centralised technology (control, direction, authority, mandating):<br />
 &#8211; control: deciding what technology to create for &#8220;general use&#8221; by game-project teams<br />
 &#8211; direction: researching and reporting to the teams what tech is needed over the coming years by all game teams (yes, including telling teams themselves what they need)<br />
 &#8211; authority: deciding all general and long-term technology choices for ALL game teams, and making decisions on what tech teams are allowed to create and use<br />
 &#8211; mandating: forcing game-teams to use the centralised technology</p>
<p>Shared technology (re-use of common code, standing on shoulders of others, increased stability, decreased startup costs)<br />
 &#8211; re-use: finding code that gets written the same way on successive projects, and turning it into a library then never re-writing it again<br />
 &#8211; standing on shoulders: getting a domain expert to write difficult code once, turning it into a library, so that people who don&#8217;t understand enough of the tech to write it themselves can leverage it into future games without having to learn it themselves<br />
 &#8211; stability: using code in multiple successive projects so that eventually, after a few projects, it is extremely heavily tested and bug-fixed, much more so than any code written and used for the first time in a given project<br />
 &#8211; decreased startup: reduce the amount of time after a project goes into production that it takes to get the &#8220;first playable&#8221; version of the game running, because a lot of &#8220;typically useful&#8221; code already exists; unlike &#8220;re-use&#8221;, this is NOT necessarily code you will keep in the long-term &#8211; it&#8217;s just a leg-up to get you started quickly</p>
<h4>Problems (real or perceived)</h4>
<p>In some cases, Central Technology / Core Technology teams have been growing on game development companies like mould on a piece of bread in recent years &#8211; gradually expanding their remits (and team sizes) until they end up affecting (usually negatively, despite the best of intentions!) every part of game development. I&#8217;ve had lots of experiences with centralised tech depts, although all of them in the games industry &#8211; interestingly, I never saw any software company even consider doing this when I worked in mainstream IT (across various industries), only games companies. And it seems a relatively recent phenomenon, too &#8211; at least at the scale that we see nowadays.</p>
<p>Typical problems cited by game-teams and third-parties affected by coretech (NB: these may not be fair!):<br />
 &#8211; a bunch of non-game programmers inventing arbitrary (undirected by user) solutions for potential (not verified because no concrete use-case) problems for not-yet-existent (haven&#8217;t started production yet) projects<br />
 &#8211; forced upon game-teams who have to twist and force their game into the inflexible (already built, without knowing the game-teams requirements because the game-team wasn&#8217;t around at the time) mould of the now-built core-tech (ask any EA employee about centralised technology initiatives&#8230;)<br />
 &#8211; generates pointless tools that are always in search of a problem to solve</p>
<p>Ultimately, the more bitter and cynical end of the spectrum of those who&#8217;ve experienced coretech come up with something that veers towards one of:<br />
 &#8211; it&#8217;s an excuse to spend infinite amounts of money forever without clear benefit and no oversight or restraints on feature set or spending<br />
 &#8211; it&#8217;s an excuse to take freedom and power away from game-teams and centralise it under an authority who has no reason to care if the game ships on time or with most appropriate feature-set</p>
<p>I suspect those two ultimate, generic criticisms map to the two typical definitions &#8211; the former to &#8220;shared tech&#8221; and the latter to &#8220;centralised tech&#8221;, although I&#8217;ve not looked at that in detail.</p>
<p>Most (not all!) of the experiences I&#8217;ve personally had in games companies have been failures, some narrowly (managing to achieve good things, but failing at what they were originally setup for), some spectacularly (failing to provide anything good at all, and even dragging down one or more game-projects with them). Some flailed about and killed projects in their wailing death-throes, others gorged on the corpses of the projects they&#8217;d killed and rose again from the bones of what was left, like some undead creature (which is a worrying precedent: <a href="http://www.youtube.com/watch?v=dA7Qubkp-IM" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.youtube.com/watch?v=dA7Qubkp-IM');">&#8220;how do you kill that which has no life?&#8221;</a>). It&#8217;s fair to say my experiences have been mostly bad ones :) &#8230; BUT: until it was called &#8220;central tech&#8221; or &#8220;core tech&#8221; the *same kind of initiatives* (re-using code, centralising decision-making, making powerful proprietary libraries) seemed to work well, generally, in teams that I was in or working with. The failure cases seem (at least in my small amount of experience) to be a relatively modern problem.</p>
<h4>What&#8217;s the point?</h4>
<p>Speaking to people throughout the company where I currently work, and working with some of our pre-existing core-tech teams, I&#8217;ve found myself more and more asking a simple question: &#8220;why do we have Core Tech?&#8221; The answers have been illuminating&#8230;</p>
<p>&#8220;to write everything-including-the-kitchen sink, then on each game project only use the bits you need&#8221;<br />
&#8220;recycle code from an existing project&#8221;<br />
&#8220;I don&#8217;t know&#8221;<br />
&#8220;write code that can be used and re-used in multiple projects&#8221;<br />
&#8220;share the really cool and difficult stuff that one team did with other teams so they can benefit from its brilliance&#8221;</p>
<p>This has made me realise / remember a couple of things:<br />
 &#8211; non-programmers, and many inexperienced programmers, grossly underestimate the ratio in development time/cost between &#8220;making code that solves one problem&#8221; and &#8220;making a generic solution to a whole class of problems of which the current problem is just one example&#8221;. The first explanation described above is usually prohibitively expensive by *a large factor, maybe even an order of magnitude*, but many people seem unaware of this<br />
 &#8211; CT is sufficiently ill-defined and *poorly marketed internally* at most games companies that many internal dev staff genuinely don&#8217;t know why it exists or what purpose it&#8217;s supposed to be solving, let alone have the opportunity to rate the success or failure at that purpose<br />
 &#8211; many people notice that game development often involves re-solving or re-performing similar tasks, and wish for a perfect world in which you only ever have to do one &#8220;kind&#8221; of solution once, and then you get to re-use it forever after. That is largely true in mainstream IT, but sadly this seems to be far from the truth with games development. Personally, I suspect that the day the technology becomes derivative is the same day you realise your game itself is derivative, and has lost most of it&#8217;s fun.</p>
<p>I also wonder: if we don&#8217;t have CT, are you saying we wouldn&#8217;t re-use code? As a programmer, do you avoid finding code from old teams and finding ways to use it in your current project? Isn&#8217;t this a *basic part* of your job, part of what we pay you to do?</p>
<p>Is CT something that gives game-programmers an excuse to be less diligent than they would otherwise willingly be, thereby setting the scene for them to later complain that it&#8217;s &#8220;not as good as if I&#8217;d written it myself&#8221; (which is one of the cruelest things I&#8217;ve seen game-teams do to their CT teams, even if it&#8217;s true).</p>
<h4>Other side of the coin: why is central tech hard?</h4>
<p>Project teams steal the best hires<br />
 &#8211; Project teams, especially Producers and Leads, have a hugely difficult problem (ship a game on time, and make it &#8220;fun&#8221;, so it sells well) and a huge amount of personal buy-in (if it fails, they have no second chance: their sole responsibility is that one project), and a huge amount of measurability of success (how many sales does the game make?). They have a vested interest in finding the best of the best people, and they have &#8211; ultimately &#8211; large budgets to recruit them with. If someone really good at developing code for games is in central tech, they usually get stolen for a game-team sooner or later. Central tech departments have too little visibility (how do you measure the brilliance or crapness of your coretech? there&#8217;s no sales figures!), no concrete deadlines (they randomly invent them, or borrow a game-project&#8217;s deadlines, but they really don&#8217;t sink-or-swim on that project-deadline like the game-team itself does!), and usually restricted budgets (if not, well, that&#8217;s when the unlimited-spending-without-reason problem kicks in&#8230;). They also are rarely as cool as working on a &#8220;real game&#8221;: most people joined the industry to Make Games, not to Write Random Code For Someone-else&#8217;s Game. CT finds it hard to retain the best people&#8230;</p>
<p>Writing code a second time is generally a lot cheaper than modularising the original version<br />
 &#8211; &#8230;I&#8217;m hoping this is self-obvious. But sadly it means that it is ALWAYS easier for any individual game-team to re-write *from scratch* the code they wrote for their last game than it is for CT to make the generic version that they&#8217;re usually asked for. Game-teams then get pissed that the CT team seems incompetent compared to them (they notice that the time they have to wait for CT to do something is MORE than it would take them to do it themselves).</p>
<p>CT is always setup as an &#8220;ongoing&#8221; task: there is no defined beginning or end to what they do. Games companies (developers and publishers) are very specifically geared towards &#8220;project-based&#8221; tasks.<br />
 &#8211; From the funding, to the project management, to the staff rewards schemes, everything about the games-industry is setup for project-by-project operation. We know (sort-of) how to make project-based development work (reasonably) well. We don&#8217;t really have ANY experience in non-project work &#8211; certainly anyone who&#8217;s only ever worked in the games industry (who are strongly self-selected by current standard recruitment procedures) will have no experience of non-project development. Is it any surprise we often screw it up? Moreover, is it any surprise that we have such difficulty making the non-project CT team be respected and understood by the purely project-based game-teams?</p>
<h4>Ideas</h4>
<p>I&#8217;ve been kicking around some ideas on new directions to pursue. These may not be that great, but at the moment I don&#8217;t have to make any decisions, I just have to provide options, so I&#8217;m interested in any suggestions or alternatives&#8230;</p>
<h5>Think of CT as a human resource, not a code repository.</h5>
<p>This is one thing I&#8217;ve been trying: what *I* needed most urgently out of CT was the *expertise* component, and actually I didn&#8217;t really care about the code re-use etc. I knew I would, but I had a more pressing problem of two projects that lacked the necessary expertise in Network Programming to make an MMO. So &#8230; I created a tiny team dedicated to doing the network code for any game, and explicitly NOT to writing reusable network technology (NB: many years ago I ran a failed network middleware company, so I had a healthy apprecaition of how difficult and time-consuming it is to write generic network systems; I knew we simply did not have the time to write that stuff when we had projects already in full production that needed network code NOW).</p>
<p>Because of that, we can&#8217;t share the technology they create. Not yet, anyway. But we *can* share the expertise of the people in the team. They have to do a fair amount of international travel (bummer). So far, it seems to be working OK, but &#8230; it&#8217;s too small a sample and it&#8217;s been running too short a time (do you have any idea how hard it is to recruit really good network coders? :( ) to make any firm measurements of the success or failure of the approach.</p>
<h5>Architect all your CT initiatives on a project-basis, not a service basis</h5>
<p>I&#8217;ve seen a couple of examples of this, usually where senior people were frustrated by the progress of CT but needed some new example of the kind of stuff it was providing &#8211; so they went and started their own new pet-project to provide that, but outside the remit of the CT group. I&#8217;ve seen examples of this that were positive, and examples that were negative. Politically, it&#8217;s likely to cause a shitstorm as far as I can see, no matter how you sell it (unless this is blessed by CT itself, and none of the examples I&#8217;ve seen were their idea, although IIRC one of them did get CT&#8217;s agreement &#8211; they just knew they didn&#8217;t have BOTH the expertise AND the budget to provide it, so were happy to not have to take responsibility for it).</p>
<p>Certainly, it&#8217;s been the fastest way to get real significant progress on anything major: by doing it as a project, and going through the &#8220;standard&#8221; greenlight &#8211; pre-production &#8211; greenlight2 &#8211; production &#8211; ship cycle that all games companies are accustomed to for their games, large amounts of money have been secured quickly, and the projects have got going quickly.</p>
<h5>Embed CT teams into the game-teams</h5>
<p>The idea with this one is to overcome both the antipathy between game-teams and CT (by making them part of the same team), and also to ensure &#8220;automagically&#8221; that the CT team-members are working stuff that is guaranteed directly applicable to a real game &#8211; because they&#8217;re reporting to the Producer of a given game-team all the time.</p>
<p>If it works out well, this could solve all the problems. Although I&#8217;m not yet sure I understand how &#8211; in the long term &#8211; this is any different from having no CT at all. As noted earlier, this is closest to how I remember things working well before the idea of CT gained widespread popularity. OTOH, I&#8217;m not sure if that same situation will even work nowadays &#8211; the industry has changed a lot since then.</p>
<h4>History of CT</h4>
<p>I&#8217;m not sure about this, but my vague memory is that CT grew in popularity and &#8211; more importantly &#8211; commonness (i.e. how many companies were doing it) in parallel with the axing of internal game-engine teams and the move towards licensing external game-engines.</p>
<p>I have suspicions that a lot of the confusion of &#8220;what do we have central technology for?&#8221; comes from this, two-fold:<br />
 &#8211; a) those companies that didn&#8217;t entirely get rid of their engine teams had people left a bit stranded, who ended up being folded into CT, and then tended to carry on working much as they had inside the engine team, despite the different overall task of the dept (and this happened partly because of the lack of clear direction from management about what the new team was for anyway)<br />
 &#8211; b) many of the companies that dispensed with their substantial proprietary engines they&#8217;d been using for years then jumped to Unreal et al found that actually the licensable engines weren&#8217;t as good as they&#8217;d been lead to (or had lead themselves to) believe: they couldn&#8217;t go back to having an engine team, but they needed a way to reduce the huge budgets they were spending on just basic modification and fixing of the external tech, that weren&#8217;t easily justifiable on the game-budget (because they weren&#8217;t forseen, and were adding NOTHING to the game&#8217;s end feature list), so they ended up creating a CT team to hide / provide the budget to do that kind of work</p>
<p>I could be completely and utterly wrong here &#8211; this is just some ideas that have been kicking around in my head recently.</p>
<p>EDIT: I&#8217;d also like to point to this <a href="http://scientificninja.com/advice/write-games-not-engines" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://scientificninja.com/advice/write-games-not-engines');">good post about game-engines, and why you shouldn&#8217;t build them</a> (not necessarily a &#8220;never do it&#8221; argument, but an explanation of why you might want not to).</p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2008/02/27/central-tech-essential-strategy-or-complete-waste-of-time/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Game data accessibility and XML feeds</title>
		<link>http://t-machine.org/index.php/2008/01/22/game-data-accessibility-and-xml-feeds/</link>
		<comments>http://t-machine.org/index.php/2008/01/22/game-data-accessibility-and-xml-feeds/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 15:45:31 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[computer games]]></category>
		<category><![CDATA[system architecture]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2008/01/22/game-data-accessibility-and-xml-feeds/</guid>
		<description><![CDATA[Sometimes, it&#8217;s the little things you do that get noticed Last year I would have ranted about how retarded it is that game data is either entirely inaccessible to the web, or only accessible to an “official” website. &#8230;This year, however, is all about the positive. Rather than rant about no one providing such a [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, it&#8217;s <a href="http://mythicalblog.com/index.php/blogging/an-un-rant-about-game-data-accessibility/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://mythicalblog.com/index.php/blogging/an-un-rant-about-game-data-accessibility/');">the little things you do that get noticed</a></p>
<blockquote><p>
Last year I would have ranted about how retarded it is that game data is either entirely inaccessible to the web, or only accessible to an “official” website. &#8230;This year, however, is all about the positive. Rather than rant about no one providing such a feed, this is an un-rant about someone providing such a feed.</p>
<p>Dungeon Runners!</p>
<p>I found this via a news post about character sheets being viewable online at 3rd-party sites, making the assumption this meant an XML feed was available, and then digging through the forums until I found the post with a link.</p>
<p>This is really cool, I should tell you, just in case you don’t get that.</p></blockquote>
<p>Receptions like this help keep us motivated to keep doing more of them :).</p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2008/01/22/game-data-accessibility-and-xml-feeds/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Entity Systems are the future of MMOG development &#8211; part 3</title>
		<link>http://t-machine.org/index.php/2007/12/22/entity-systems-are-the-future-of-mmog-development-part-3/</link>
		<comments>http://t-machine.org/index.php/2007/12/22/entity-systems-are-the-future-of-mmog-development-part-3/#comments</comments>
		<pubDate>Sat, 22 Dec 2007 19:22:25 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[games design]]></category>
		<category><![CDATA[massively multiplayer]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/12/22/entity-systems-are-the-future-of-mmog-development-part-3/</guid>
		<description><![CDATA[Also known as: Nobody expects the Spanish Inquisition! (because I&#8217;m now deviating from the original schedule I outlined in Part 1; what the heck, it was only a rough agenda anyway&#8230;) Questions, questions&#8230; First of all, there&#8217;s a bunch of good questions that have been raised in response to the first two posts: what data [...]]]></description>
			<content:encoded><![CDATA[<p>Also known as: Nobody expects the Spanish Inquisition!</p>
<p>(because I&#8217;m now deviating from the original schedule I outlined in <a href="http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/" >Part 1</a>; what the heck, it was only a rough agenda anyway&#8230;)</p>
<h4>Questions, questions&#8230;</h4>
<p>First of all, there&#8217;s a bunch of good questions that have been raised in response to the first two posts:</p>
<ul>
<li>what data and methods are stored in the OOP implementation of an entity?</li>
<li>where does the data &#8220;live&#8221;?</li>
<li>how do you do object initialization?</li>
<li>what does the ES bring that cannot be accomplished with an AOP framework?</li>
<li>what&#8217;s the link between entity systems and SQL/Relational Databases? (OK, so that one&#8217;s my own question from last time)</li>
<li>what, exactly, is an entity?</li>
</ul>
<p>Let&#8217;s start with that last one first.</p>
<p><span id="more-83"></span></p>
<h4>What, exactly, is an entity?</h4>
<p>Obviously, I&#8217;ve already covered this from the conceptual perspective in the last post, where I defined them as:</p>
<blockquote><p>For every discernible thing in your game-world, you have one Entity. Entities have no data and no methods</p></blockquote>
<p>Great. But a couple of people were wondering what ACTUALLY is it, when you start implementing the thing? Is it a class? Is it an array of data? Is it a list of Components?</p>
<p>The last statement is particularly important: actually, entities have NO data and NO methods &#8211; an entity is not a stub for a class, it is not a struct of data, and &#8211; ideally &#8211; it&#8217;s not a list of Components. An entity is really just a name. Last post I also wrote that entities &#8220;do little more than to tag every gameobject as a separate item&#8221; &#8211; and that&#8217;s the key thing here, an entity is just a unique label for an in-game object.</p>
<p>I was a bit non-specific, because I didn&#8217;t want to say empirically that an entity cannot or should not be a list of components &#8211; sure, you CAN implement it that way &#8211; because many people do implement entities like that, and who&#8217;s to say what&#8217;s right or wrong here?</p>
<p>Although&#8230;I actually think that *is* the wrong way, and think that by the time you get to the last of these Entity Systems posts, you&#8217;ll probably agree with me ;). The problem is, the right way is usually too slow, so you&#8217;ll probably end up *to some extent* implementing entities as lists anyway, but if you do so as a performance optimization (e.g. by hiding that detail from the rest of the system) rather than as a logical implementation, it&#8217;ll cause fewer problems with your code in the long term.</p>
<p>So, to answer the question directly:</p>
<blockquote><p>What is an entity?</p>
<p>An Entity is a number (a globally unique number)</p></blockquote>
<p>Remembering, of course, that a String &#8211; or any other kind of unique label &#8211; is merely a fancy kind of number, not just in terms of how computers implement them, but in terms of how Mathematicians think of them. People tend to think that strings have extra features, for instance you can encode trees within strings easily (&#8220;root.node1.leaf&#8221;, for instance &#8211; as used in most OOP languages derived from C to navigate the namespace of classes, methods, etc) &#8211; although of course you can encode things like that in numbers, too, for instance &#8220;123045607&#8243; (using 0 to stand for the dot&#8230; i.e. &#8220;123.456.7&#8243;). But &#8230; you *really* don&#8217;t want to do this!</p>
<blockquote><p>Gotcha number 1: only OOP programmers want to give entities hierarchical names. It can tunr out a pretty dumb idea, if you think about it: it&#8217;s usually an implicit refusal to let go of those OOP ways we&#8217;re so used to thinking in, when those OOP ways are exactly what caused most of the problems we&#8217;re trying to fix by using ES&#8217;s.</p></blockquote>
<p>So, don&#8217;t be tempted into hierarchical encoding, and definitely don&#8217;t do ANY encoding in the entity names &#8211; there&#8217;s a much BETTER place to do metadata for entities (trust me).</p>
<p>And I&#8217;ll be calling the implementation of an entity a GUID from now on (&#8220;Globally Unique IDentifier&#8221;).</p>
<h4>What data and methods are stored in the OOP implementation of an entity?</h4>
<p>The answer for the previous question makes this one easy to answer: none. The entity is merely a label, and whilst you DO want to store and manipulate some metadata around that label (e.g. it&#8217;s kind of handy to have a list of all the entity names you&#8217;ve currently got in memory, and be able to rename them without breaking everything), you should be thinking of them as nothing more or less than a GUID (String. Number. Whatever!).</p>
<h4>Where does the data &#8220;live&#8221;?</h4>
<p>The first time I made an ES, I implemented the individual Entities as classes, and although I didn&#8217;t put any methods in those classes (that would just be bog-standard OOP!), I did put the data into them. It didn&#8217;t occur to me that I&#8217;d need to worry about where the data was living, so I just stuck it somewhere natural &#8211; in the Entity.</p>
<p>Of course, I&#8217;d made a cardinal error, because whatever feels &#8220;natural&#8221; to an OOP programmer is usually &#8220;completely wrong&#8221; in ES programming.</p>
<p>Anyway, the last time I did an ES I was a lot wiser, and so we put the data inside the Components. All of it. </p>
<blockquote><p>Gotcha 2: ALL the data goes into the Components. ALL of it. Think you can take some &#8220;really common&#8221; data, e.g. the x/y/z co-ords of the in-game object, and put it into the Entity itself? Nope. Don&#8217;t go there. As soon as you start migrating data into the Entity, you&#8217;ve lost. BY DEFINITION the only valid place for the data is inside the Component
</p></blockquote>
<p>How does that work?</p>
<p>Well, you need to start thinking about your Components a bit more carefully here. I previously said that:</p>
<blockquote><p>A Component labels the Entity as possessing this particular aspect</p></blockquote>
<p>So, again, a Component is merely another &#8220;label&#8221;, just like the Entity itself. Right? Wrong. This is my fault &#8211; in the last post, I was trying to Keep It Simple for you, and glossed over quite a few things; because the very first ES I made, I treated the components as mere labels, that description came out most easily as &#8220;the simple version&#8221; of what they are. In more detail:</p>
<blockquote><p>A Component is the chunk of stuff that provides a particular aspect to any Entity</p></blockquote>
<p>&#8230;where &#8220;provides&#8221; means &#8220;does all the things that are necesssary to make this work&#8221;. Which means that all your Components certainly *could* be implemented as standard OOP objects. To define an Entity, you just provide a name (GUID) and a list of Component classes that it needs, and to instantiate that Entity, you just instantiate one object from each class (and then you need to somehow attach those in-memory objects to your GUID, probably by implementing the Entity as an empty class that just contains a GUID and a list-of-component-instances (which I said to avoid, but we&#8217;ll come back to that later)).</p>
<p>But, as you may have noticed by now, I&#8217;m vigourously against using OOP anywhere inside an ES implementation. This isn&#8217;t some strange dislike of OOP itself, it&#8217;s just that in my experience with ES development it&#8217;s all too easy for experienced OOP programmers to keep trying to sneak some OOP back in where it&#8217;s inappropriate, and it&#8217;s all too easy to delude yourself into thinking this is a Good Idea. And, worse, from the teams I&#8217;ve worked on in the past, it has consistently seemed that the better you are at OOP programming, the harder this is to resist&#8230;</p>
<p>You COULD implement your Components as OOP objects. But, really, if you go back to the definition of a &#8220;System&#8221; from the last post, you&#8217;ll see that the methods for acting upon Components should all live inside the Systems, not the Components. In fact, re-reading that last post, I notice that I explicitly described Systems as doing exactly this: &#8220;a System essentially provides the method-implementation for Components&#8221;.</p>
<p>One tiny exception to this rule: getters and setters are really useful. If you&#8217;re implementing your ES within an OOP language, you might allow yourself to implement Components as objects just to get the benefits of get/set and e.g. multiple different versions of each get/set that do basic type conversion, or integrity checking on data, etc. Be warned, though, that if you do you MUST implement them as flyweight objects (go <a href="http://www.google.com/search?q=flyweight+pattern" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.google.com/search?q=flyweight+pattern');">google the Flyweight Pattern</a> if you don&#8217;t know it) or else you&#8217;ll lose lots of the memory-management and efficiency advantages of a full ES.</p>
<blockquote><p>Where does the data &#8220;live&#8221;?</p>
<p>Each Component is merely a classification label (e.g. &#8220;Renderable&#8221;) and a struct/array/list/whatever of the data relating to it&#8217;s purpose; all data lives in Components; ALL data.</p></blockquote>
<h4>How do you do gameobject initialization?</h4>
<p>Here&#8217;s a fun one &#8211; I haven&#8217;t mentioned ANYTHING about object/entity intialization. It was really only from trying to use entity systems that I finally realized just how bizarre OOP is when it comes to initialization: you have some &#8220;magic methods&#8221; (constructor, destructor, finalizer, etc) that have nothing to do with the main description of OOP, but instead are part of a meta-programming that allows you to get your OOP system up and running, and to keep it running, and then to tear it all down again at the end. Until then, I&#8217;d not noticed how out-of-place those methods are&#8230;</p>
<p>Hats-off to the OOP folks: they integrated their meta-programming so neatly into OOP that in most languages it&#8217;s unnoticeable. But I&#8217;ve not yet seen the same trick done for an ES &#8211; so, get used to the fact that initialization is going to be a bit &#8230; &#8220;different&#8221; &#8230;</p>
<p>There&#8217;s really a bunch of issues here:</p>
<ul>
<li>what&#8217;s the technical term for an entity&#8217;s archetype?</li>
<li>how do you define the archetypes for your entities?</li>
<li>how do you instantiate multiple new entities from a single archetype?</li>
<li>how do you STORE in-memory entities so that they can be re-instantiated later on?</li>
</ul>
<h4>What&#8217;s the technical term for an entity&#8217;s archetype?</h4>
<p>There doesn&#8217;t seem to be one. Really. There&#8217;s a couple floating around, influenced by people&#8217;s own backgrounds but I&#8217;ve heard quite a few used interchangeably. </p>
<p>My favourites are:</p>
<ul>
<li>template</li>
<li>model</li>
<li>assemblage</li>
</ul>
<p>(I actually picked the last one from a thesaurus &#8211; looking for equivalents of &#8220;class&#8221; ;)).</p>
<p>The problem with both &#8220;template&#8221; and &#8220;model&#8221; is that they&#8217;re both very frequently used generic terms in programming. Entity is pretty good as a term, because it&#8217;s hardly used for anything else (and the main obvious competitor is now widely called a &#8220;gameobject&#8221; by game programmers). I&#8217;ve used both, in the past. Interchangeably. (cackle!)</p>
<p>So. &#8220;Assemblage&#8221;, anyone?</p>
<blockquote><p>how do you define the archetypes for your entities?<br />
how do you instantiate multiple new entities from a single archetype?<br />
how do you STORE in-memory entities so that they can be re-instantiated later on?</p>
<p>Big topics. Really big. Too big to go into here (ah. Now I know what the next post is going to be about&#8230;).
</p></blockquote>
<h4>What does the ES bring that cannot be accomplished with an AOP framework?</h4>
<p>The simple, facetious, answer is: almost everything.</p>
<p>AOP (Aspect-Oriented Programming) doesn&#8217;t really help much to solve the problems that an Entity System solves (although it does solve similar ones that ALSO tend to be present when the ES-related ones are present), and doesn&#8217;t provide the new features that you get from an ES (e.g. the improved memory/data-performance).</p>
<p>An ES takes a system where there are many things going on that are all independent, which OOP tangles up together, and pulls them apart and lets them live on their own. It also highly efficiently manages simple interoperation between those disparate aspects of the program, and allows them to be disconnected, reconnected, at will.</p>
<p>AOP takes a system where there are things going on that are fundamentally DEPENDENT, which OOP tangles up together, and allows them to be reasoned about &#8220;separately, but together&#8221; &#8211; you can view the code for logging independent of the code which is being logged, but you have to still reason about them at the same time, you cannot merely ignore one or the other. By definition, different aspects (vested as Components) of an Entity are INdependent, and this whole &#8220;together&#8221; thing is an irrelevance.</p>
<p>However &#8230; AOP certainly helps if you have implemented with OOP something you ideally should have done with an ES, and you want to add new features to it, because the tangled OOP system is going to be a pain to modify without breaking stuff accidentally, and AOP will help you more precisely focus the impact of your changes. But it&#8217;s a poor replacement for just implementing the ES you wanted in the first place.</p>
<p>There is also a fairly large area of crossover between &#8220;some things you can do with entity systems&#8221; and &#8220;some things you can do with aspect oriented programming&#8221;, mainly because they are both fundamentally data-driven at the function-despatch level (which I&#8217;ll come back to later). However, they each use this data-drivenness in very different ways &#8211; AOP uses it to react to, and wrap itself around, the code of the program, whereas an ES uses it to react to the data of the program.</p>
<p>Using both together could be really exciting &#8211; but I&#8217;ve not been brave enough to try that yet myself.</p>
<h4>What&#8217;s the link between entity systems and SQL/Relational Databases?</h4>
<p>You might have guessed this by now &#8211; it&#8217;s been the theme of most of the answers above, starting from the very beginning of this post.</p>
<p>Mathematically-speaking, an Entity is a database Key, just as you&#8217;d see in any RDBMS.</p>
<p>Likewise, from a purely abstracted point of view, the &#8220;set of component-instances that comprise Entity #7742&#8243; is, literally, a database Query.</p>
<p>THIS is why I said at the start that, ideally, you do NOT want to store your component-instances as a list inside a struct/class representation of each Entity. Fundamentally, that set is NOT defined as a list (a list is a static thing, it&#8217;s members don&#8217;t change without you changing them), it&#8217;s defined as a query (whose members are always changing, whether you want them to or not), and using one where really you wanted the other tends to cause problems in the long term.</p>
<p>Obviously, you can use Lists as a simple form of query (that query being &#8220;what things are currently in this list&#8221;), but that&#8217;s a rather poor and inflexible kind of query. Life is much more interesting if you embrace the dynamicity of the query, and fetch the components (and, hence, the VALUES of the data&#8230;) by running a query every time you want one or more of them.</p>
<p>This is a fairly star-gazing view of how to make games: the game is just one giant database, running dynamic queries all the time. Current performance, even of fast RDBMS&#8217;s, is just way too slow to be running thousands of queries per frame on a home PC.</p>
<p>However, these articles are about ES&#8217;s for massively multiplayer online game development, not just standard game development, and that changes two things in particular:</p>
<p>1. Most of the game is NOT running on home PC&#8217;s, it&#8217;s running on arbitrarily beefy server-farms that are already running bajillions of QL queries (nearly always SQL these days, but any of MS SQL Server, Oracle, or MySQL).</p>
<p>2. The data is much much more important than rendering speed; we have almost no problem making incredibly beautiful 3D rendered landscapes, but managing the data to make those landscapes act and react as if they were real (i.e. world-logic, game-logic, etc) is something we still find rather hard</p>
<h4>A new thought for the day&#8230;</h4>
<p>Think what you can do with an ES if you deploy it on an MMO server farm, and go the full monty by making all your entity/component aggregations stored merely as SQL queries. Here&#8217;s some to start you off&#8230;</p>
<p>1. No more pain from &#8220;Relational vs OOP&#8221;</p>
<p>One of the slowest parts of MMO server performance is translating OOP objects into RDBMS tables so that the database can save them, and then translating them back again when the game needs to read them. This also wastes large amounts of programmer time on boring, annoying, tricky to maintain code to handle the serialization processes.</p>
<p>2. Massive increase in parallelization for free</p>
<p>If you make all processing data-driven, and you have no data-structures that have to remain synchronized, then it becomes a lot easier to &#8220;just add more CPU&#8217;s&#8221; to increase runtime performance&#8230;</p>
<p>3. Where else could you use SELECT instead of data structures?</p>
<p>When each System has to do it&#8217;s processing, it&#8217;s probably going to iterate over &#8220;all Entities that have my Component&#8221;. Is that something you can store easily in a standard data-structure? Or is it better off as a QL query? And what else can you achieve if you start doing your processing this way? (hint: there&#8217;s some nice benefits for the low-level network programming here&#8230;)</p>
<p>NEXT: <a href="http://t-machine.org/index.php/2008/03/13/entity-systems-are-the-future-of-mmos-part-4/" >Part 4</a></p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2007/12/22/entity-systems-are-the-future-of-mmog-development-part-3/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Entity Systems are the future of MMOG development &#8211; Part 2</title>
		<link>http://t-machine.org/index.php/2007/11/11/entity-systems-are-the-future-of-mmog-development-part-2/</link>
		<comments>http://t-machine.org/index.php/2007/11/11/entity-systems-are-the-future-of-mmog-development-part-2/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 14:29:07 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[games design]]></category>
		<category><![CDATA[massively multiplayer]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/11/11/entity-systems-are-the-future-of-mmog-development-part-2/</guid>
		<description><![CDATA[Part 2 &#8211; What is an Entity System? (Part 1 is here) Sadly, there&#8217;s some disagreement about what exactly an Entity System (ES) is. For some people, it&#8217;s the same as a Component System (CS) and even Component-Oriented Programming (COP). For others, it means something substantially different. To keep things clear, I&#8217;m only going to [...]]]></description>
			<content:encoded><![CDATA[<h4>Part 2 &#8211; What is an Entity System?</h4>
<p>(<a href="/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/">Part 1 is here</a>)</p>
<p>Sadly, there&#8217;s some disagreement about what exactly an Entity System (ES) is. For some people, it&#8217;s the same as a Component System (CS) and even Component-Oriented Programming (COP). For others, it means something substantially different. To keep things clear, I&#8217;m only going to talk about Entity Systems, which IMHO are a particular subset of COP. Personally, I think Component System is probably a more accurate name given the term COP, but then COP is improperly named and is so confusing that I find if you call these things Component Systems they miss the point entirely. The best would be Aspect Systems, but then AOP has already taken ownership of the Aspect word.</p>
<p>An entity system is simply a part of your program that uses a particular way of breaking up the logic and variables of your program into source code.</p>
<p>For the most part, it does this using the Component Oriented Programming paradigm instead of the OOP paradigm &#8211; but there&#8217;s subtleties that we&#8217;ll go into later.</p>
<p><span id="more-74"></span></p>
<p>We refer to an entity &#8220;system&#8221; instead of entity &#8220;programming&#8221; because ES&#8217;s are usually found embedded in a larger, OOP, program. They are used to solve a subset of problems that OOP is poor at dealing with.</p>
<p>So, it is generally a replacement for Object Oriented Programming. The two are mutually exclusive: you have to choose one or the other (although any complex program may have multiple levels of abstraction, and you could mix and match OOP and COP/ES at different layers, any given layer is going to be one or the other (or, of course, any other alternative way of structuring your program).</p>
<p>Common misconception #1 &#8211; Entity Systems are part of OOP<br />
Common misconception #2 &#8211; Entity == Class, Component == Object</p>
<p>Where OOP has Classes and Objects, an ES has Entities and Components &#8211; but it is very important to note that an Entity is NOT equivalent to a class, and a Component is NOT equivalent to an Object, although superficially they seem to share some characteristics. If you think of Entities/Component&#8217;s in OOP terms, you will never understand the ES, and you will screw up any attempt to program with it.</p>
<p>The whole point of ES&#8217;s using a different programming *paradigm* is that this means there CAN NEVER BE a direct equivalent between Classes and anything, or between Objects and anything &#8211; if there were, it would actually be the same paradigm, and just be a variant of OOP. It&#8217;s not. It&#8217;s fundamentally different and incompatible.</p>
<h4>What&#8217;s an Entity?</h4>
<p>An Entity System is so named because Entities are the fundamental conceptual building block of your system, with each entity representing a different concrete in-game object. For every discernible &#8220;thing&#8221; in your game-world, you have one Entity. Entities have no data and no methods.</p>
<p>In terms of number of instances at runtime, they are like Objects from OOP (if you have 100 identical tanks, you have 100 Entities, not 1).</p>
<p>However, in terms of behaviour, they are like classes (Entities indirectly define all the behaviour of the in-game object &#8211; we&#8217;ll see how in a second).</p>
<p>So, entities on their own are pretty much entirely useless &#8211; they are coarse-grained, and they serve to do little more than to tag every coarse gameobject as a separate item. This is where Components come in.</p>
<h4>What&#8217;s a Component?</h4>
<p>Every in-game item has multiple facets, or aspects, that explain what it is and how it interacts with the world. A bicycle, for instance, is:</p>
<ul>
<li>Made of metal</li>
<li>Can be used by a human</li>
<li>A means of transportation</li>
<li>Something that can be bought and sold</li>
<li>A popular birthday present</li>
<li>Man-made</li>
</ul>
<p>At this point, please note: OOP does not have this concept of multiple aspects; it hard-codes all the aspects into one glob, and declares that the set of behaviours and values of data to be the single-aspected Class of an Object. C++&#8217;s Multiple inheritance and Java&#8217;s Interfaces can get you a small part of the way towards the aspects of an ES, but they quickly collapse under the strain in fundamental ways that cannot be fixed within OOP.</p>
<p>The way that an Entity for an item represents the different aspects of the item is to have one Component for each aspect. The Component does one really important thing:</p>
<ul>
<li>Labels the Entity as possessing this particular aspect</li>
</ul>
<p>It may do several other things, depending upon your implementation and the design of your ES. However, with an ES, this is the most important, because this is the basis of all method execution and processing.</p>
<h4>What&#8217;s a System? (or subsystem)</h4>
<p>An ES goes further than OOP in how it splits up the universe of code and data. In OOP, you make everything into Objects. With an ES, you have two different things that you split code and data into: the first is &#8220;Entity + Components&#8221;, and the second is &#8220;Systems&#8221;.</p>
<p>This is the source of a lot of the value of an ES. OOP is very good at implementing the part of any program that has lots of data floating around and lots of methods floating around which need to be executed only on a small, instanced, subset of the data in the program. OOP is very poor at implementing the &#8220;global&#8221; parts of a program, which have to operate &#8220;on everything&#8221;, or have to be invoked &#8220;from everywhere&#8221;. An Es solves this by explicitly dealing with all the global stuff using Systems, which are outside the realm of Entity/Component.</p>
<p>Each System runs continuously  (as though each System had it&#8217;s own private thread) and performs global actions on every Entity that possesses a Component of the same aspect as that System.</p>
<p>There is a one to one relationship between Systems and AVAILABLE aspects (i.e. types of Component). A System essentially provides the method-implementation for Components of a given aspect, but it does it back-to-front compared to OOP. OOP style would be for each Component to have zero or more methods, that some external thing has to invoke at some point. ES style is for each Component to have no methods but instead for the continuously running system to run it&#8217;s own internal methods against different Components one at a time.</p>
<p>Typical Systems in a game would be: Rendering System, Animation System, Input System, etc.</p>
<p>The Rendering system wakes up every 16 milliseconds, renders every Entity that has the Renderable Component, and then goes back to sleep.</p>
<p>The Animation system constantly looks out for anything that would trigger a new animation, or cause an existing animation to change (e.g. player changes direction mid-step), and updates the data of each affected Entity (of course, only those that actually have the Animatable Component, i.e. are animations).</p>
<p>The Input system polls the gamepad, mouse, etc, and changes the state of whichever Entities with the Inputable Component are currently marked as being controlled by the player.</p>
<p>In tradtional OOP, if you have 100 units on a battlefield, and each is represented by an object, then you theoretically have 100 copies of each method that can be invoked on a unit. In practice, most OOP languages use runtime and compiler optimizations to share those methods behind the scenes and avoid wasting memory &#8211; although scripting languages for instance often don&#8217;t do any sharing, allowing all the methods to be independently changed on each and every instance.</p>
<p>By contrast, in an ES, if you have 100 units on a battlefield, each represented by an Entity, then you have zero copies of each method that can be invoked on a unit &#8211; because Entities do not contain methods. Nor do Components contain methods. Instead, you have an external system for each aspect, and that external system contains all the methods that can be invoked on any Entity that possess the Component that marks it as being compatible with this system.</p>
<h4>That&#8217;s not an Entity System!</h4>
<p>Well &#8230; at least, that&#8217;s what *most* people I&#8217;ve worked with consider to be an Entity System. But even within a single project, I&#8217;ve found multiple different ideas of what an ES is, some of which are compatible, others of which are incompatible. Here are some of the other ideas I&#8217;ve come across that people thought were ES&#8217;s.</p>
<p>Alternative definitions of entity systems:</p>
<p>1. An ES provides a different model of class-inheritance to OOP, especially w.r.t inheritance of fields. For any given entity-class you declare which aspects that class possesses, and the actual class is looked-up at runtime by piecing together all the different aspects.</p>
<p>2. The same as 1., but taken literally for methods as well as fields, i.e. this provides an interesting way to mix-n-match inheritance of functions/methods. So long as methods are attached to the fields upon which they operate, and/or a &#8220;pre-requisite&#8221; system is implemented such that &#8220;having aspect X automatically causes you to also have aspect Y&#8221;, then this works quite smoothly. NB: this is implementing &#8220;modular objects&#8221;: the &#8220;aspects&#8221; are complete objects from the standard theory of OOP.</p>
<p>3. A variant on 1. or 2. where the aspect data is pre-compiled into a large number of OOP classes at compile time, so that at runtime you are just running &#8220;normal&#8221; classes, without any lookup cost of the dynamic &#8220;I&#8217;ve got an entity E which claims to have aspect X; just hold on a sec while I build a function table to find out what the heck to do now someone just tried to invoke function Z&#8230;&#8221;</p>
<p>4. A way of compiling standard OOP classes into runtime-data (note: disassociating them from their OOP-ness) specifically so that you can treat them as streamed data instead of chunked binary + data. The main value of this is to play nicely with hardware that has tiny tiny amounts of memory available in the code cache and/or very very slow access to fetch extra code, but has vast bandwidth to stream SEQUENTIAL data through the CPU. PlayStation consoles especially like this approach, as opposed to the typical PC approaches. Note that in this case, the idea is that the game-programmers and game-designers are UNAWARE that there&#8217;s an entity system &#8211; it&#8217;s a runtime/compile time performance optimization, not a design-feature.</p>
<p>5. A system design that revolves around excessive use of the Observer pattern, but does so using standard OOP techniques. I mention this because it&#8217;s a common (ab)use of the concepts of ES&#8217;s, but lacks much of the advantages. For what it&#8217;s worth &#8230; that&#8217;s the situation I was in when I first discovered ES&#8217;s. So, personally, I really don&#8217;t count these as ES&#8217;s. These are not an ES, but an: &#8220;OMG, I need an ES!&#8221;, but many people persist in thinking (and claiming) they&#8217;re a true ES.</p>
<p>NB: IMHO this is one of those &#8220;you really shouldn&#8217;t do this&#8221; classes of Entity System usage. Why? Because you end up just creating MASSIVE OOP classes with tonnes of independent implemented Observer methods tacked onto them. That&#8217;s fine as a general approach, it buys you something whilst remaining ENTIRELY OOP, but it also loses most of what ES&#8217;s have to offer, especially in the realm of flexibility and compound inheritance.</p>
<h4>Who cares about ES&#8217;s and why? (where did they invent these from?)</h4>
<p>1. Coders who are used to writing a graphics/rendering engine and trying to keep it isolated / separate from the rest of the computer game. They learnt that they can write the entire graphics engine using only PARTIAL information (a couple of aspects &#8211; no more than 2 or 3) of every OOP object that exists in the game-universe. They need to use: Renderable (do I have to paint it to the screen every frame? [it will have all the methods necessary to do that painting generically]), Updateable (does it potentially change in response to one or more game-loop-ticks? [animations are a great example of this - their internal state changes independently of how many times they're rendered]), </p>
<p>2. Multi-threaded coders who are looking at the concept of aspects per se (i.e. Renderable as opposed to Updateable) to allow for coarse-grained multi-threading: you are allowed one thread per aspect, and this is guaranteed safe simply because the aspects are &#8211; by definition! &#8211; independent from one another. Since a typical ES will have a dozen or more aspects, you&#8217;ve just bought yourself reasonably effective performance scaling of up to 12 separate CPU cores, for free.</p>
<p>Also &#8230; going to the next level of difficulty and performance improvement, they&#8217;re looking for the largest possible individual (literally: things that &#8220;cannot be divided&#8221;) things that can be made the atomic level of multi-threading. The default position is that only manually-hard-coded atomic operations count, and OOP objects certainly are full of all sorts of multi-threading individual pieces so are far too coarse, but maybe components within entities are small enough to be the unit of atomicity.</p>
<p>3. Game designers who want to enable &#8220;everything to become anything&#8221;.</p>
<p>Do Cameras shoot people?</p>
<p>Do Bullets accept input from the player?</p>
<p>No?</p>
<p>Well &#8230; have you played Unreal Tournament? If you have but didn&#8217;t answer yes to the earlier questions then you need to find someone to show you a Redeemer being used in Alternate Fire mode (hint: you get to manually &#8220;fly by wire&#8221; the rocket from a first-person view inside the warhead itself).</p>
<p>ES&#8217;s allow everything and anything to be used as anything and everything, interchangeably, with no re-coding. That&#8217;s the beauty for designers &#8211; all the artifical constraints on design that were previously enforced by coders having to, you know, place SOME constraints just to write their own damn code and have it be reasonably performant and bug-free are suddenly lifted.</p>
<p>It&#8217;s true &#8211; you really CAN have strongly-typed safe code and yet have total freedom to pass any object to any method; at least, you can with Entity Systems.</p>
<p>4. Coders who go a bit overboard with the Observer pattern.</p>
<p>If you&#8217;re unsure about this one, and have used Observers a lot, ask yourself this: have you ever had that problem with Observers where you found that &#8220;just one base class isn&#8217;t enough&#8221;? i.e. one base class that implemented a handful of different Observers worked great, but as your system / game / application expanded you found you needed more variety in that base class, you needed multiple different versions, and you needed *every possible combination* of those different versions, because base-classes cannot/will not &#8220;stack&#8221; nicely on top of each other.</p>
<h4>Thought for the day</h4>
<p>Programming *well* with Entity Systems is very close to programming with a Relational Database. It would not be unreasonable to call ES&#8217;s a form of &#8220;Relation Oriented Programming&#8221;.</p>
<p>This needs a followup post, but you might want to think about that :) both in terms of how the above statement could be true (hint: think about what most of the code you write for each System is going to look like, and what exactly it is doing), and also in terms of what the knock-on effects of this are if it is true.</p>
<p>Bear in mind that no-one&#8217;s yet managed to do OOP fast with Relations; the excessively high conversion cost between RDBMS and OOP &#8211; both at coding-time and at runtime &#8211; is still one of the biggest single development problems with writing an MMO.</p>
<p>NEXT: <a href="http://t-machine.org/index.php/2007/12/22/entity-systems-are-the-future-of-mmog-development-part-3/" >Part 3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2007/11/11/entity-systems-are-the-future-of-mmog-development-part-2/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>Some Myths of Writing Networked Multiplayer Games</title>
		<link>http://t-machine.org/index.php/2007/10/21/some-myths-of-writing-networked-multiplayer-games/</link>
		<comments>http://t-machine.org/index.php/2007/10/21/some-myths-of-writing-networked-multiplayer-games/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 12:46:28 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[computer games]]></category>
		<category><![CDATA[massively multiplayer]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/10/21/some-myths-of-writing-networked-multiplayer-games/</guid>
		<description><![CDATA[Networked games use the internet, and the difficulties of making these games evolve on Internet Time, which means that the articles people wrote as recently as a year ago on how to make a networked or multiplayer game are already out of date. Most of the literature is more than 5 years old, and some [...]]]></description>
			<content:encoded><![CDATA[<p>Networked games use the internet, and the difficulties of making these games evolve on Internet Time, which means that the articles people wrote as recently as a year ago on how to make a networked or multiplayer game are already out of date. Most of the literature is more than 5 years old, and some as much as 10 years old &#8211; hopelessly out of date in the modern world of internet and online gaming.</p>
<p>Anyway, to get you thinking (I&#8217;m not providing definite answers here, but just some stuff to make you think about more carefully about how you&#8217;re doing your networking), here are some common rules that perhaps no longer apply the way they used to:</p>
<p><span id="more-62"></span></p>
<p>I&#8217;ve been interviewing candidates recently for Network Programmer roles at NCsoft, one of the world&#8217;s largest developers of online games, so we look for the best people (and are usually quite good at spotting them). As an experiment, among the normal interview questions I ask, I started asking some ultra simple questions which have famous &#8220;correct&#8221; answers that are no longer true. Interestingly, this showed a great many applicants were still parroting answers that either they read from their undergraduate course-notes or in old books, or that they discovered themselves 5 years ago but apparently hadn&#8217;t done any real programming in the last few years, because they hadn&#8217;t noticed how things have already changed.</p>
<p>What does this mean? Well, for a start, some extremely powerful techniques in network development which people could actually use today are probably being ignored by many developers because &#8220;received wisdom&#8221; suggests they simply cannot work. It also means I&#8217;m going to have start thinking up some new interview questions, of course, because now everyone coming for interview is going to Google this page and change their answers accordingly&#8230;</p>
<h4>Myth #1: Client bandwidth is the bottleneck</h4>
<p>I moved house at the start of this year. I tried to get a cheap, relatively fast, internet connection. 1 Mbit would be fine, I wasn&#8217;t going to use it much at home (I already had mobile internet).</p>
<p>The slowest anyone was willing to sell me was 8 Mbits, and the fastest 24 Mbits. Overkill? Well &#8230; those DVD&#8217;s everyone&#8217;s downloading these days are pretty good at soaking up all the bandwidth you can throw at them, I guess&#8230;</p>
<p>Of course, I could pay more, and get less bandwidth (there&#8217;s a few sharks out there), but that&#8217;s just stupid.</p>
<p>And yet &#8230; most multiplayer games from the late 90&#8242;s through to the mid 2000&#8242;s were carefully optimized to get their maximum bandwidth usage per client down to around 1-2 KB/s, i.e. 8-16 Kbits. Or, to put it another way, around 1/3000th of the bandwidth I was offered for the grand sum of £24 a month.</p>
<h4>Myth #2: The network is orders of magnitude &#8220;slower&#8221; than the rest of the computer: the server itself will never be the bottleneck</h4>
<p>Another one that crops up often as a rule of thumb &#8211; you&#8217;ll be lucky to be getting 100 messages a second from your network connection, whilst your PC&#8217;s processor runs at 1 Ghz, which means that in the same period of time it can process 10 billion individual commands. Ten billion. That&#8217;s quite a lot more than one hundred.</p>
<p>Of course, over the LAN you&#8217;ll get a lot more than a hundred messages, but even with a decent fast hub and 100 Mbit ethernet you&#8217;ll probably max out at somewhere around ten thousand or so per second. That&#8217;s more than a billion times fewer (&#8220;slower&#8221;) than your CPU.</p>
<p>Now at this point you&#8217;ll have spotted the deliberate mistake there, and be saying &#8220;but no-one uses hubs these days, switches are now so cheap you can&#8217;t buy them,&#8221; (clever you) &#8221; and we&#8217;ve got gigabit ethernet as standard on all the motherboards &#8211; you probably can&#8217;t even BUY a 100 Mbit network card any more!&#8221;. Right. So &#8230; the network can handle theoretically ten times as much traffic (wow!) and in practice probably more like twenty times as much now we&#8217;ve got rid of those shoddy hubs. Although, then again &#8230; nowadays it&#8217;s not the crapness of Ethernet that makes it struggle to hit its rated speeds, it&#8217;s usually the fact that your network card is &#8220;too&#8221; cheap, and you can&#8217;t buy a decent one because there&#8217;s no market left for them (oh, how ironic!).</p>
<p>Still, we&#8217;ve definitely got an order of magnitude more bandwidth, and improvements to the OS IP stacks mean we&#8217;ve probably got a fairly good improvement in latencies and the handling of vast numbers of packets on the wire. But we were talking about a factor of 1 million difference, so even a few orders of magnitude is still a total irrelevance.</p>
<p>Hmm. Seems I&#8217;m arguing that the network really IS a lot &#8220;slower&#8221; than you computer. Except &#8230; the suspicious amongst you, Dear Reader, will have noticed the quotes I keep putting around the word slower. Yeah. There&#8217;s a reason for that.</p>
<p>When you&#8217;re writing games people always talk about the number of messages they want to send per second, and ask if it&#8217;s reasonable. And in any online game, you&#8217;re never going to care about total bandwidth because you&#8217;re only sending tiny amounts of information about (c.f. the previous point about games getting down to a few kilobytes of traffic per second). But that&#8217;s the problem: mixing the two concepts of latency and bandwidth into one rating of &#8220;speed&#8221;.</p>
<p>When it comes to the server, the &#8220;total&#8221; latency it&#8217;s experiencing does NOT increase or decrease when you increase or decrease the number of connected clients (well, it does, a very very small amount), but the total bandwidth it&#8217;s experiencing DOES increase &#8211; linearly, in fact. And if we&#8217;ve taken any advantage of Myth #1 up above, and started letting our players transfer stuff like streaming movies of themselves to each other in-game, then potentially every new client is going to add their total ISP-provided bandwidth to the mix.</p>
<p>For a while now there has been something of a problem here with bandwidth usage per client, which is just the raw cost of the ISP bandwidth bill for your server. e.g. back in 2002 even with just 10,000 players the typical small MMOG could be paying as much as a six-figure sum on annual bandwidth bills. But costs have come down, especially if you buy in bulk, so that&#8217;s not such a big problem now.</p>
<p>The problem nowadays is not &#8220;how much can the internet handle?&#8221;, and not always &#8220;how much will it cost you to get that much internet traffic?&#8221;, but sometimes just &#8220;can your server cope, physically, with the volume of data you&#8217;re trying to pump in and out of it every second?&#8221;.</p>
<p>1,000 players each saturating their 24Mbit home broadband connections?</p>
<p>That&#8217;s 3 gigabytes (bytes, not bits) of data. Every second.</p>
<p>Phew. Well&#8230;that means we&#8217;ll need to stick 6 x 4-way gigabit ethernet cards in the server. That&#8217;s probably OK, they only cost a few hundred dollars each these days.</p>
<p>But &#8230; um &#8230; how much bandwidth is there INSIDE the server? Have you looked at the bandwidth of modern RAM these days? Peaks out at around 10 GB/s &#8211; enough that the sheer volume of your network traffic is seriously interfering with the PC&#8217;s ability just to function as a processing system. But what about the peripheral bus, which is going to be between you and the CPU/RAM &#8211; a nice fast PCIe x16 slot manages a mere 4 GB/s, only just enough merely to do the basic data-transfer (and this assumes the computer isn&#8217;t doing anything else except transferring data &#8211; obviously we want it to do actual processing too!).</p>
<h4>Myth #3: Server Clusters should use TCP internally</h4>
<p>Pretty much all multiplayer games these days do some clustering on the server side, and it&#8217;s a strange world of it&#8217;s own.</p>
<p>(do you think that because you&#8217;re not doing an MMO you don&#8217;t care about clusters? Well, tell me: exactly HOW is your multiplayer racing game (or FPS) going to allow people to start new games, hmm? A lobby-server, perhaps? Maybe even a login-server, that stores stats for each individual player? Maybe those need to talk to each other, and to the game-server itself?)</p>
<p>Although I hate it when people (usually forum posters ;)) insist that games should all use UDP &#8220;because it&#8217;s faster&#8221; or some such rubbish (define &#8220;faster&#8221;, please&#8230;), the opposite seems to be true with server clusters. Time and again people go with TCP, apparently without considering whether UDP might be better for them. (see? I said &#8220;might be&#8221; there. You won&#8217;t find any gross sweeping generalizations here! Um. Ahem.)</p>
<p>It&#8217;s easy to see why people go for TCP: you want the thing that most simplifies your server architecture, because, Damn it!, it&#8217;s hard enough making the bloody thing work in the first place &#8211; you have more than your fair share of headaches to deal with already, what with Race conditions, Object-Persistence, Transactional integrity, Security holes, etc.</p>
<p>Actually, I suspect it&#8217;s as much because cluster-focussed middleware is usually TCP based (think of all the little network tools and OS features that go together to make up your cluster, and how many of them are TCP based as opposed to UDP? How many of them give you a choice what to use as the stream provider?) and that developers just go with the flow.</p>
<p>A lot of the UDP vs TCP debate evaporates inside a server cluster. In particular, there&#8217;s no routers, no DSL modems, no switches all doing weird and horrible things to your traffic (TCP header compression? UDP delayed by higher QoS traffic? etc). So it&#8217;s a bit simpler.</p>
<p>But, most obviously, *there&#8217;s no such thing as packet loss*. So &#8230; UDP is suddenly a &#8220;reliable protocol&#8221; (whoa!). But, also, TCP is suddenly a &#8220;no artificial delays on received packets due to out-of-order reception&#8221; (double-Whoa!). Then again, that means that UDP is ALSO going to receive packets in-order.</p>
<p>(NB: that&#8217;s not really true, unless your routers and switches and OS&#8217;s behave themselves. But &#8230; with the cluster, you get to buy those bits yourself, so you have &#8211; in theory &#8211; the option to MAKE it true)</p>
<p>So &#8230; what&#8217;s wrong with TCP? Well, the one bit that&#8217;s really wrong with it is this:</p>
<table border="1">
<tr>
<td></td>
<td bgcolor="#ffff00">UDP</td>
<td bgcolor="#ffff00">TCP</td>
</tr>
<tr>
<td>Lossy network (internet)</td>
<td> no special support, sucks badly</td>
<td>works great, designed especially for this environment</td>
</tr>
<tr>
<td>&#8230;extra code you need to write?</td>
<td>lots</td>
<td>none</td>
</tr>
<tr>
<td></td>
<td bgcolor="#ffff00">UDP</td>
<td bgcolor="#ffff00">TCP</td>
</tr>
<tr>
<td>Private LAN (cluster)</td>
<td>Just Works &#8482;</td>
<td>Just Works &#8482;</td>
</tr>
<tr>
<td>&#8230;extra code you need to write?</td>
<td>none</td>
<td>none</td>
</tr>
</table>
<p>i.e. UDP does &#8220;nothing special&#8221;, it just sends data, but TCP has loads of &#8220;extra stuff&#8221; that&#8217;s going on behind the scenes, including a 22-state FSM (Finite State Machine), that&#8217;s just sitting there hogging up resources and adding extra delay onto things like opening and closing connections. That&#8217;s all wasted effort &#8211; You Ain&#8217;t Gonna Need It (so don&#8217;t use it).</p>
<p>Sadly, poor old TCP suffers from the exact same problem it always suffers from in games development &#8211; nothing is optional. Which means you HAVE to use all that stuff, even though it&#8217;s doing you no benefit.</p>
<p>So, TCP is simply &#8220;at least as or more expensive&#8221; for clusters (uses more resource) than UDP, without really helping. And in a lot of cases, that causes problems as you scale up your number of clients, or number of simultaneous matches.</p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2007/10/21/some-myths-of-writing-networked-multiplayer-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Source code is the best form of documentation (not)</title>
		<link>http://t-machine.org/index.php/2007/09/14/source-code-is-the-best-form-of-documentation-not/</link>
		<comments>http://t-machine.org/index.php/2007/09/14/source-code-is-the-best-form-of-documentation-not/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 03:04:21 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[agile]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/14/source-code-is-the-best-form-of-documentation-not/</guid>
		<description><![CDATA[No, it&#8217;s not, it&#8217;s really not. In fact, source code is probably the worst form of documentation, it fails in most of the roles that documentation is actually required to fulfil (see bottom of this post for a shortlist). But something else is&#8230; Because &#8230; when you think about it, there is a kernel of [...]]]></description>
			<content:encoded><![CDATA[<p>No, it&#8217;s not, it&#8217;s really not. In fact, source code is probably the worst form of documentation, it fails in most of the roles that documentation is actually required to fulfil (see bottom of this post for a shortlist).</p>
<p>But something else is&#8230;<br />
<span id="more-42"></span><br />
Because &#8230; when you think about it, there is a kernel of truth in the claim. It is based around the concept that source code is the ULTIMATE arbiter of &#8220;what the system actually does, in reality&#8221;. Unlike comments, and written documents, and diagrams, source code by definition can never get out of date, no matter how time-poor, ill-trained, lazy, or even just unfortunate your programming team is.</p>
<h4>(im)Perfection</h4>
<p>Advocates of &#8220;code is the best documentation&#8221; tend to point to the fact that in reality there is no such thing as the perfect human programmer who never makes a mistake, and so manual comments are automatically doomed to failure. Worse, any given piece of software spends more of its lifetime in an altered/updated state than it does in its original virgin &#8220;as-it-was-originally-typed-in&#8221; state. Therefore, on any non trivial project, the non-source-code forms of documentation are guaranteed, mathematically, to become more and more out of date at an equal or greater rate than you can fix through periodic (or even continuous) manual updating of them.</p>
<p>Source code is NOT the perfect documentation &#8230; but unit tests are. Just as source is &#8211; by definition &#8211; always up to date, and manual comments are effectively guaranteed over time to become less and less up to date, unit tests always remain up to date *or they fail*, since they in no way rely upon or pay any attention to the source, and instead are tightly bound to the *usages* of the source.</p>
<p>(an aside: if you use unit tests, but don&#8217;t run Continuous Integration (CI) or a similar build process that automatically runs all unit tests on the order of once a day, and reports in big flashing emails when any fail, then it&#8217;s time for you to re-read the manual. I add this only because there are people who don&#8217;t do this, and they could legitimately point holes in the above, but you guys &#8211; you need to realise you&#8217;re in a small minority of people who are &#8220;missing the point&#8221; :P)</p>
<h4>What does this buy you?</h4>
<p>(subtext: Why did I bother writing this blog post anyway? ;))</p>
<p>Because it has one very very important knock-on effect: if you have no documentation for your system and you&#8217;ve decided you really need some (and, let&#8217;s face it, the war over whether documentation was &#8220;actually needed&#8221; was won a long long time ago), then I have a piece of advice:</p>
<blockquote><p>Don&#8217;t write any documentation; write unit tests instead.</p></blockquote>
<p>This is more important than merely arguing that unit tests are &#8220;better&#8221; documentation (personally, I think they aren&#8217;t &#8211; they are only perfect in a provable sense, not in a &#8220;actually solve all the problems that documentation is needed for&#8221; sense) &#8211; this is really about the practical realities of your situation.</p>
<p>If you already have the system, and you have no documentation, you will never have the time to write it.</p>
<p>(this is something of a truism that is commonly accepted for reasons of sheer practicality)</p>
<p>But &#8230; you will have the time to write unit tests. And it&#8217;ll be a heck of a lot cheaper and easier to write docs. To write even your first sentence of your first document, you need full knowledge of the ENTIRE system. To finish writing the docs you need absolute knowledge of the system. That means you have to do 100% of the work (reading the source) at any given level of abstraction in order to do even 1% of the documentation.</p>
<p>But &#8211; by definition &#8211; you can start writing unit tests the moment you&#8217;ve even just tried running the application once. Unit tests require extremely limited extremely partial information &#8211; the less knowledge you have about the SYSTEM when writing tests for the UNITs, the better. In the long run, you can write unit tests to cover the key 25% of your system functionality with only doing as little as perhaps 5% of the work (reading the source).</p>
<p>So, in the real world: &#8220;when the system already exists, don&#8217;t write documentation &#8211; write unit tests&#8221;</p>
<p>Final thought: yes, this works in the real world &#8230; but what about for really LARGE and COMPLEX systems? Are tests the best form of documentation for them too?</p>
<h4>Epilogue: what are the roles of documentation?</h4>
<p>Just to give a flavour, they include:</p>
<ul>
<li>educating the user on the abstract concepts that are enshrined in the application<br />
defining the problems that the binary code is attempting to solve</li>
<li>telling the user where to &#8220;start&#8221; with trying to use the binary code, whether as library or app</li>
<li>defining a contract of what the code will / will not do that is isolated against future updates of the source (source only says what it does now, in this (possibly bugged!) version; documentation tells you what it will CONTINUE to do in future versions, even if bugfixes change the current behaviour))</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2007/09/14/source-code-is-the-best-form-of-documentation-not/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Thousands of Clients per Server (Game Programming Gems 4)</title>
		<link>http://t-machine.org/index.php/2007/09/12/thousands-of-clients-per-server-game-programming-gems-4/</link>
		<comments>http://t-machine.org/index.php/2007/09/12/thousands-of-clients-per-server-game-programming-gems-4/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 20:17:13 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[computer games]]></category>
		<category><![CDATA[mmog links]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/12/thousands-of-clients-per-server-game-programming-gems-4/</guid>
		<description><![CDATA[&#8230;was my section in the fourth GPG book from Charles River Media. And, sadly, although I tried to put some resources up on the web, a series of unfortunate events led to that all disappearing. But now &#8230; they&#8217;re back! (and I&#8217;ll be adding more followup stuff in the coming weeks/months) If you&#8217;re interested in [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230;was my section in the fourth GPG book from Charles River Media. And, sadly, although I tried to put some resources up on the web, a series of unfortunate events led to that all disappearing.</p>
<p>But now &#8230; they&#8217;re back! (and I&#8217;ll be adding more followup stuff in the coming weeks/months)<br />
<span id="more-40"></span></p>
<p>If you&#8217;re interested in the article itself, there&#8217;s a <a href="http://www.pegasoft.ca/minutes/march_2006.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.pegasoft.ca/minutes/march_2006.html');">pretty good writeup here</a> (scroll halfway down to find it) that covers the main core points (although understandably leaves out several sections, and doesn&#8217;t include any of the diagrams from the book &#8211; if it were much longer they might get into trouble over copyright issues ;)).</p>
<p>These are the most useful IMHO links from the references in my chapter. If you want the full text, you&#8217;ll have to buy the book (you can get it fairly cheaply these days &#8211; and you get more than 60 other gems as well, so it&#8217;s probably well worth it), but these refs themselves are pretty good reading.</p>
<table>
<tr>
<th>GPG4 ref</th>
<th>Title</th>
</tr>
<tr>
<td>
[Bansil01]</td>
<td><a href="http://www.cs.cmu.edu/~nikhil/papers/starvation/srpt.starvation.ps" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.cs.cmu.edu/~nikhil/papers/starvation/srpt.starvation.ps');">&#8220;Analysis of SRPT Scheduling: Investigating Unfairness&#8221;</a>
</td>
</tr>
<tr>
<td>
[EiffelSoftware03]</td>
<td><a href="http://archive.eiffel.com/doc/manuals/technology/contract/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://archive.eiffel.com/doc/manuals/technology/contract/');">&#8220;An introduction to Design by Contract&#8221;</a>
</td>
</tr>
<tr>
<td>
[FCF02]</td>
<td><a href="http://www2002.org/CDROM/poster/110/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www2002.org/CDROM/poster/110/');">&#8220;Fastest Connection First: A New Scheduling Policy for Web Servers&#8221;</a>
</td>
</tr>
<tr>
<td>
[Gooch02]</td>
<td><a href="http://www.cs.ucsb.edu/labs/oocsb/papers/TRCS98-31.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.cs.ucsb.edu/labs/oocsb/papers/TRCS98-31.pdf');">&#8220;I/O Event Handling under linux&#8221;</a>
</td>
</tr>
<tr>
<td>
[Josephs03]</td>
<td><a href="http://www.scism.sbu.ac.uk/ccsv/josephmb/CS-L2-OS/oss/week9.html#Scheduling%20Algorithms" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.scism.sbu.ac.uk/ccsv/josephmb/CS-L2-OS/oss/week9.html#Scheduling%20Algorithms');">&#8220;Scheduling Algorithms&#8221;</a>
</td>
</tr>
<tr>
<td>
[Kegel03]</td>
<td><a href="http://www.kegel.com/c10k.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.kegel.com/c10k.html');">&#8220;The C10K Problem&#8221;</a>
</td>
</tr>
<tr>
<td>
[Mellon03]</td>
<td><a href="http://www.gdconf.com/archives/2003/Mellon_Larry-AutomatedTesting.ppt" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.gdconf.com/archives/2003/Mellon_Larry-AutomatedTesting.ppt');">&#8220;Automated Testing of Massively Multiplayer Games&#8221;</a>
</td>
</tr>
<tr>
<td>
[Welsh03]</td>
<td><a href="http://www.eecs.harvard.edu/~mdw/proj/seda/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.eecs.harvard.edu/~mdw/proj/seda/');">&#8220;SEDA: An Architecture for Highly Concurrent Server Applications&#8221;	</a>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2007/09/12/thousands-of-clients-per-server-game-programming-gems-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Austin GDC talk: Caching for Web 2.0</title>
		<link>http://t-machine.org/index.php/2007/09/10/austin-gdc-talk-caching-for-web-20/</link>
		<comments>http://t-machine.org/index.php/2007/09/10/austin-gdc-talk-caching-for-web-20/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 04:23:59 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[games design]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[system architecture]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/10/austin-gdc-talk-caching-for-web-20/</guid>
		<description><![CDATA[UPDATE: short, complete, 42-slide version now available from the CMP website &#8211; https://www.cmpevents.com/sessions/GD/S5762i1.ppt &#8230;but if you want the 144-slide version (!), see below. No extra content. EDIT: use this link instead, link below is 404ing: http://www.slidefinder.net/C/Caching_Web_2_0/465867 Caching for Web 2.0 &#8211; How and Why &#8211; NB: these slides are the actual ones I used at [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE: short, complete, 42-slide version now available from the CMP website &#8211; <a href="https://www.cmpevents.com/sessions/GD/S5762i1.ppt" onclick="javascript:pageTracker._trackPageview('/outbound/article/https://www.cmpevents.com/sessions/GD/S5762i1.ppt');">https://www.cmpevents.com/sessions/GD/S5762i1.ppt</a></p>
<p>&#8230;but if you want the 144-slide version (!), see below. No extra content.</p>
<p><span id="more-33"></span><br />
EDIT: use this link instead, link below is 404ing: <a href="http://www.slidefinder.net/C/Caching_Web_2_0/465867" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.slidefinder.net/C/Caching_Web_2_0/465867');">http://www.slidefinder.net/C/Caching_Web_2_0/465867</a></p>
<p><a href='http://tmachine1.dh.bytemark.co.uk/blog/wp-content/uploads/2007/09/caching-for-web-20-v1.ppt' title='Caching for Web 2.0 - How and Why'>Caching for Web 2.0 &#8211; How and Why</a> &#8211; NB: these slides are the actual ones I used at the talk, which won&#8217;t make so much sense as the &#8220;official&#8221; ones available from the AGDC website, which I sanitized a bit to be easier to read. Unless you were actually at the talk, I recommend you grab the ones from the AGDC website.</p>
<p>My talk on Caching for Web 2.0 went pretty well, after some nightmare setup issues (big thanks to the A/V guys at the Austin convention center!). Note to CMP and AGDC organizers: whilst it&#8217;s great being offered not one, not two, but SIX different 15-pin VGA cables to plug your laptop into the projector, many modern laptops are DVI only. It would be nice to have, you know, just ONE DVI cable too? (and make sure its simple DVI, not the one with extra pins, or it simply won&#8217;t work).</p>
<p>Anyway, the best part was how often I&#8217;d be speaking to people during the rest of the conference and they&#8217;d say they&#8217;d spoken to other people who&#8217;d told them how great the talk was :). Of course, I forgot to ask people to fill out the feedback forms, so it&#8217;s going to be hit and miss whether I get a good rating or not :(.</p>
<p>We also had a really good informal / birds-of-a-feather / roundtable meetup on the Wednesday evening about Web 2.0 and Games &#8211; but more on that later, once I get the photos off my camera.</p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2007/09/10/austin-gdc-talk-caching-for-web-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entity Systems are the future of MMOG development &#8211; Part 1</title>
		<link>http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/</link>
		<comments>http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/#comments</comments>
		<pubDate>Mon, 03 Sep 2007 19:38:14 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[computer games]]></category>
		<category><![CDATA[games design]]></category>
		<category><![CDATA[massively multiplayer]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[system architecture]]></category>

		<guid isPermaLink="false">http://tmachine1.dh.bytemark.co.uk/blog/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/</guid>
		<description><![CDATA[A few years ago, entity systems (or component systems) were a hot topic. In particular, Scott Bilas gave a great GDC talk on using them in the development of Dungeon Siege. The main advantages to entity systems were: No programmer required for designers to modify game logic Circumvents the &#8220;impossible&#8221; problem of hard-coding all entity [...]]]></description>
			<content:encoded><![CDATA[<p>A few years ago, entity systems (or component systems) were a hot topic. In particular, <a href="http://www.drizzle.com/~scottb/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.drizzle.com/~scottb/');">Scott Bilas</a> gave <a href="http://www.drizzle.com/~scottb/gdc/game-objects.ppt" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.drizzle.com/~scottb/gdc/game-objects.ppt');">a great GDC talk</a> on using them in the development of Dungeon Siege. The main advantages to entity systems were:</p>
<ul>
<li>No programmer required for designers to modify game logic</li>
<li>Circumvents the &#8220;impossible&#8221; problem of hard-coding all entity relationships at start of project</li>
<li>Allows for easy implementation of game-design ideas that cross-cut traditional OOP objects</li>
<li>Much faster compile/test/debug cycles</li>
<li>Much more agile way to develop code</li>
</ul>
<p><span id="more-30"></span></p>
<p>I first started using entity systems in anger back in 2001-2003, when I was working on MMOG server middleware. We were targetting the few most painful problems in MMOG development, one of which was the difficulty of constantly changing your game logic after launch, which led us to entity systems. I learnt then that entity systems were an almost perfect solution to massively speeding up the development time for most MMOG&#8217;s, and for also allowing almost unrestrained re-writing of fundamental game features post-launch with very little effort.</p>
<p>That last issue is critical to the success of an MMOG: once an MMOG is launched successfully, its long term success or failure depends more upon the ability of the dev team to evolve that game into a better game month after month than upon anything else.</p>
<p>I learned a lot from that first run-in with them, more about the things that go wrong and what makes developing with entity systems particularly hard than about the things that went right. We also discovered that performance could easily become a major issue &#8211; although they are very flexible and dynamic, the lack of pre-compiled lookups and optimizations can make runtime performance disappointingly (unacceptably) poor. Why? Mainly because of the amount of indirection and checks needed to run even a single method call (but I&#8217;ll go into detail on that problem, and how to fix it, a bit later).</p>
<p>I moved on, and didn&#8217;t think about them again, until last year. In 2006 I joined the Operation Flashpoint 2 team as the lead network programmer, where we trying to make an MMO-FPS on an unprecedented scale, and I discovered that the programming team was considering an entity-system to drive the whole game. The attractions for the OFP2 team were different &#8211; mainly around the improvements to memory management they could get from it, and the stream-oriented coding (which is essential for PS3 development) &#8211; but it turned out to be something of a silver bullet for the &#8220;MM&#8221; and &#8220;O&#8221; parts of the MMOFPS. As the network programmer, discovering that an entity system was going to be the interconnect for all other subsystems was a huge relief: the entity system meant I could implement the complex latency hiding and prediction techniques with minimal interference with the coding of all the rest of the game systems. When you&#8217;ve got 20+ programmers on a team, you really don&#8217;t want to be placing yourself in a position where you&#8217;re going to have to redesign code for all of them just to make it &#8220;network friendly&#8221;.</p>
<p>whilst I was working on OFP2, I got in touch with Scott, and exchanged ideas on what the future might hold for entity systems, including additional uses for them, and on how to share this knowledge more widely. He encouraged me to start a blog (and, actually, a year later that was one of the main reasons I even started this blog, <a href="http://tmachine1.dh.bytemark.co.uk/blog/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://tmachine1.dh.bytemark.co.uk/blog/');">T=Machine</a>), so I figured now was a good time to start (finally) writing about those entities :).</p>
<p>And to blame Scott for the existence of this blog&#8230;</p>
<p>Since then, I&#8217;ve been thinking a lot off and on about entity systems and their appropriateness for use in MMOG development (again!). Only this time around &#8211; thanks to OFP2 and some of the issues it threw up &#8211; I had a much better idea how to use them to increase performance rather than reduce it, and had come across some other major problems that they conveniently solve. Most obviously, they work wonders for PS3 development. Knowing how PS3&#8242;s fundamental architecture works, I can&#8217;t immediately see how you&#8217;d want to use anything other than a full entity system for game development. There&#8217;s so much horsepower in that beast that you can certainly write games many different ways, but it&#8217;s particularly well-suited to this approach.</p>
<p>As it stands, I&#8217;m beginning to think that next-generation MMOG&#8217;s are going to be practically impossible to develop unless based heavily around a core entity-system. &#8220;practically&#8221; being the key word &#8211; unless you&#8217;re willing to spend $100 million for your development&#8230;</p>
<p>&#8220;Anything is possible&#8221;, of course, so there&#8217;ll be many exceptions to that &#8211; but I think any team that doesn&#8217;t go this route is going to suffer a lot because of it.</p>
<p>I think most people would agree. But &#8230; recent discussions on game-industry mailing lists &#8211; and the experiences I had within games companies with programmers who were much better at programming than I was &#8211; made me realise that there&#8217;s a lot of ignorance over these systems, and many people aren&#8217;t getting anywhere near the full potential of them. So, if you&#8217;re interested, read on&#8230;</p>
<p>I&#8217;ll do this in a series of posts (it&#8217;s going to take some time to write it all up!), but it&#8217;ll go something approximately like this:</p>
<ul>
<li><a href="http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/" >Part 1 &#8211; intro (you&#8217;re reading it)</a></li>
<li><a href="http://t-machine.org/index.php/2007/11/11/entity-systems-are-the-future-of-mmog-development-part-2/" >Part 2 &#8211; what is an entity system</a></li>
<li><a href="http://t-machine.org/index.php/2007/12/22/entity-systems-are-the-future-of-mmog-development-part-3/" >Part 3 &#8211; more on what is, and isn&#8217;t, an entity system</a></li>
<li><a href="http://t-machine.org/index.php/2008/03/13/entity-systems-are-the-future-of-mmos-part-4/" >Part 4 &#8211; Introduction to MMO Development Practices</a></li>
<li><a href="http://t-machine.org/index.php/2009/10/26/entity-systems-are-the-future-of-mmos-part-5/" >Part 5 &#8211; initialization, storage, and data</a></li>
<li>serialization, de-serialization, and distributed state management</li>
</ul>
<p>ADDENDUM:</p>
<ul>
<li><a href="http://t-machine.org/index.php/2010/05/09/entity-system-1-javaandroid/" >Entity System on Android phones &#8211; a concrete example using Java</a></li>
</ul>
<p>EDIT, December 2007 &#8211; You may also want to take a look at <a href="http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/');">Mick West&#8217;s introduction to entity systems for game development</a>, it&#8217;s a shorter read than my posts, but narrower in scope.</p>
<p>NB: as I post the other parts, I&#8217;ll update the list above to link to them.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6323489610521656";
/* 468x60, created 10/12/08 */
google_ad_slot = "2776044738";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>
