<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Byte Nibble: Joe's Random Musings</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/joehegarty/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/joehegarty/feed.xml</link>
    <description>Beware of the Byte Nibblin&amp;#039; Mice!</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:10:53 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Parallel Programming at Microsoft for .NET</title>
      <link>https://docs.microsoft.com/archive/blogs/joehegarty/parallel-programming-at-microsoft-for-net</link>
      <pubDate>Thu, 05 Nov 2009 15:12:00 GMT</pubDate>
      <dc:creator><![CDATA[Joe Hegarty1]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joehegarty/2009/11/05/parallel-programming-at-microsoft-for-net/</guid>
      <description><![CDATA[As I have made clear in my some of my previous posts I&rsquo;m very interested in concurrent and...]]></description>
      <content:encoded><![CDATA[<p>As I have made clear in my some of my previous posts I&rsquo;m very interested in <a href="http://en.wikipedia.org/wiki/Concurrent_computing" mce_href="http://en.wikipedia.org/wiki/Concurrent_computing">concurrent</a> and <a href="http://en.wikipedia.org/wiki/Parallel_programming" mce_href="http://en.wikipedia.org/wiki/Parallel_programming">parallel</a> programming. There are many problems in achieving good parallel code which I discussed in my post on Concurrency in the Games Industry. <p>Recently I have be scouring resources all over the internet and at work to see what technologies actually exist to help programmers write scalable parallel code for .NET. Over the last few years various teams at Microsoft have been working on technology for parallel code. I have picked three projects that really stood out and I thought I&rsquo;d share them. I&rsquo;ll keep the summaries brief as there are very good resources already in existence. You can find out more about the various teams and technologies for concurrent programming at Microsoft at <a href="http://msdn.microsoft.com/concurrency" mce_href="http://msdn.microsoft.com/concurrency">The Parallel Computing Developer Centre</a>.</p><p>If you&rsquo;re looking for Native Libraries I would strong advise looking at the Parallel Patterns Library, you can find out more information at the blog <a href="http://blogs.msdn.com/nativeconcurrency/" mce_href="http://blogs.msdn.com/nativeconcurrency/">Parallel Programming in Native Code</a>.</p><p><u><strong></strong></u>&nbsp;</p><p><u><strong>Task Parallel Library (TPL) and Parallel LINQ (PLINQ)</strong></u></p><p>Version 4.0 of the .NET Framework ships with several new pieces of technology, namely library improvements, to make parallel programming simpler. The two additions that have made me most excited are the Task Parallel Library (TPL) and Parallel LINQ (PLINQ). You can find out more about both libraries in the <a href="http://msdn.microsoft.com/en-us/library/dd460693(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd460693(VS.100).aspx">Parallel Programming in the .NET Framework</a> docs on MSDN.</p><p>I have been playing with both technologies ever since I first got hold of the .NET Framework 4. It makes writing parallel code ridiculously easy and straightforward. I was able to convert&nbsp;a C# test game server which made heavy use of threads to use the new Task system very quickly. Overall I gained an average 15% performance improvement, which is certainly impressive. I don&rsquo;t claim the server was particularly well written, but the simple task of making use of TPL and PLINQ made significant performance gains, time is always an issue for programmers and these libraries certainly help. <br>As I don&rsquo;t work with .NET in my job, I haven&rsquo;t had the chance to apply these technologies in a large real-world application but it certainly shows promise and once .NET 4.0 comes out of beta I will revisit the technology. </p><p><u><strong></strong></u></p><p><u><strong>F#</strong></u></p><p><em>&ldquo;<a href="http://msdn.microsoft.com/fsharp" mce_href="http://msdn.microsoft.com/fsharp">F#</a> is a functional programming language for the .NET Framework. It combines the succinct, expressive, and compositional style of functional programming with the runtime, libraries, interoperability, and object model of .NET.&rdquo;</em></p><p><a href="http://en.wikipedia.org/wiki/Functional_programming" mce_href="http://en.wikipedia.org/wiki/Functional_programming">Functional programming</a> is not something I have ever done in any great depth. Although F# is not designed specifically for concurrent programming, when I started my research several friends suggested that I look at functional languages for concurrent development. As I was looking for Microsoft technologies and I have heard so much about F# recently, it seemed like a good place to start. </p><p>After playing around with the <a href="http://go.microsoft.com/fwlink/?LinkId=151923" mce_href="http://go.microsoft.com/fwlink/?LinkId=151923">Visual Studio 2010 Beta</a> which includes F# and reading various tutorials and examples, I wrote a test game server based on&nbsp;my C# version. The code was certainly a lot more simplistic than an equivalent implementation in C# or C++. <br>Without any experience in functional programming the learning curve was definitely quite steep and I doubt I could implement a very large project in any great speed. Having discussed F# with a functional mad friend who is very excited about it, it definitely seems to offer some great advantages for functional programmers. Naturally the disadvantage of the F# technology is that programmers like me need to make a big investment to learn both the paradigm and the language. It&rsquo;s certainly something I hope to be able to do though!</p><p><u><strong></strong></u></p><p><u><strong>Axum</strong></u></p><p><em>&ldquo;<a href="http://msdn.microsoft.com/en-us/devlabs/dd795202.aspx" mce_href="http://msdn.microsoft.com/en-us/devlabs/dd795202.aspx">Axum</a> is a language that builds upon the architecture of the Web and principles of isolation, actors, and message-passing to increase application safety, responsiveness, scalability, and developer productivity.&rdquo;</em></p><p>Now for my personal favourite. Axum is an incubation project from the Parallel Computing Platform team, it&rsquo;s a new language derived from C# which is designed to offer an easy and productive programming model for parallel development.</p><p>I stumbled across Axum when searching around a few weeks ago. I downloaded it and after reading the <a href="http://download.microsoft.com/download/B/D/5/BD51FFB2-C777-43B0-AC24-BDE3C88E231F/Axum%20Programmers%20Guide.pdf" mce_href="http://download.microsoft.com/download/B/D/5/BD51FFB2-C777-43B0-AC24-BDE3C88E231F/Axum%20Programmers%20Guide.pdf">Axum Programmers Guide</a>, I gave it a try. Using my C# test game server as a base, I implemented it in Axum. </p><p>The paradigm felt a little strange at first and there was certainly a learning curve. I was able to pick up Axum far more rapidly than I did F#, as someone who is used to writing concurrent code in C# and C++ the code felt logical and I was able to very easily understand the flow of the application.</p><p>For me, Axum offers the perfect balance between F# with a very steep learning curve and TPL with a very shallow one. I will be following the progress of the project very closely and hope that the team continue to develop it to a fully supported product.</p><p><strong><u></u></strong></p><p><strong><u>Summary</u></strong></p><p>I should point out that it is possible to use a combination of the above options and they are not mutually exclusive, there are also numerous other technologies that you can investigate.</p><p>If you&rsquo;re looking to quickly parallelise an existing .NET application, TPL and PLINQ certainly looks like an attractive option. It&rsquo;s very quick to convert existing threading logic, ultimately very cheap to implement and offers some significant performance and scalability gains.</p><p>As I mentioned in my Axum section, if you&rsquo;re looking for a language which feels familiar but offers excellent concurrency functionality and has a reasonable learning curve, you should do some research and testing with Axum and you won&rsquo;t regret it.</p><p>F# certainly seems to be the option which allows&nbsp;you&nbsp;to clearly express what you want to happen and when. My problem with F# is that without any significant experience with functional programming, I found the learning curve very steep. I believe that most programmers have experience in similar languages to me, and that could be barrier to this option.</p><p>Ultimately the correct decision will be different for every project and the key is to do the correct research.</p><p>That&rsquo;s all folks.</p></p>
]]></content:encoded>
    </item>
    <item>
      <title>Network Architecture and Integration in Games</title>
      <link>https://docs.microsoft.com/archive/blogs/joehegarty/network-architecture-and-integration-in-games</link>
      <pubDate>Tue, 13 Oct 2009 13:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Joe Hegarty1]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joehegarty/2009/10/13/network-architecture-and-integration-in-games/</guid>
      <description><![CDATA[The Background Babble&nbsp;When I started this blog I promised myself I would post once a week, I...]]></description>
      <content:encoded><![CDATA[<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><u><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US">The Background Babble<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><p></p></span></u></b><p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US"><p>&nbsp;</p></span></p><p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US">When I started this blog I promised myself I would post once a week, I have already broken that promise after only two posts.<p></p></span></p><p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US">The last couple of weeks have been extremely busy for me; I tidied my apartment properly for the first time since I moved in, several new games have appeared on the market and I've been trying to keep up with the influx of awesome TV shows.<p></p></span></p><p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US"><p>&nbsp;</p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">In my last blog post I covered some of the good and bad things which have been introduced as games become more concurrent. I also stated that games are now expected to have online multiplayer as standard. The problem is, if you don&rsquo;t have anyone with network programming experience, it&rsquo;s often a minefield.<p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US">The last month or so has seen some problems which still exist with online games resurface in the form of server queues and simple unavailability in a couple of new titles.<br>Since I began my career in the world of game networking, I have worked with three networking systems which couldn&rsquo;t be more different from one another.<br></span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US">&nbsp;<p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><u><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US">Architecture</span></u></b></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US">The very first system I worked with was for a massively-multiplayer online role-playing game. This system was, as you might expect, strictly client-server. <br>The second networking system I worked with was for a racing title. Unlike the MMO, this system used a peer-to-peer architecture.<br>Finally, and most recently, we have the third system for an Action RPG. This system is a hybrid between peer-to-peer and client-server. <p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US">One of the most frequent questions I get asked is &ldquo;Which architecture should I use?&rdquo; it&rsquo;s a valid question and a very interesting one. It&rsquo;s a particularly nasty question for engine developers as there simply is no &ldquo;one size fits all&rdquo; solution for game networking. The true answer is &ldquo;it depends&rdquo;. <p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Peer-to-peer architecture allows all peers to communicate directly with one-another, sharing and managing their own resources. You can find out more at </span><a href="http://en.wikipedia.org/wiki/Peer-to-peer" mce_href="http://en.wikipedia.org/wiki/Peer-to-peer"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"><font color="#0000ff">http://en.wikipedia.org/wiki/Peer-to-peer</font></span></a><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">. <br>Client-server architecture on the other hand has one or more central authoritative peers (aka servers). You can find out more at </span><a href="http://en.wikipedia.org/wiki/Client-server" mce_href="http://en.wikipedia.org/wiki/Client-server"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"><font color="#0000ff">http://en.wikipedia.org/wiki/Client-server</font></span></a><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">. I won&rsquo;t go into a huge level of detail as those articles describe both architectures very well and it&rsquo;s somewhat outside the scope of my blog.<p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Peer-to-peer architecture generally allows peers to propagate information more quickly as they can communicate directly with other relevant peers. One of the big advantages of a peer to peer system is the ability share ownership and responsibility between peers. Ownership of world objects can literally be spread between peers, and when you need to do something to an object, you can request ownership from the peer that currently owns it. Peer-to-peer is also generally quite flexible; host migration is simple as there is no true host. <p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Peer-to-peer generally starts to fall down when security and control is important. A peer-to-peer system is inherently insecure. There is no authoritative server to make decisions, so in the case of disagreements peers need to arbitrate, which can become quite complicated. Peer-to-peer also tends to use more bandwidth. It is often the case that someone hosting a game has an internet connection that is suitable to do so, but with this architecture all peers share higher bandwidth. Methods to work around high-bandwidth generally include setting up relay systems, this starts to eat into the speed gains you get from the direct connection and is again, complicated.<p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Client-server architecture generally gives more control, this is extremely important in some kind of games. Client-server is heavily used in most first-person-shooters for this very reason. The server is in the perfect position to make decisions and treat all players fairly. A client-server architecture also gives you more security, having one authoritative point allows you to see exactly what is going on everywhere else and make informed decisions about cheating and other security concerns. Security is even more important in games such as MMOs where cheating is a very large concern and the majority of simulation such as NPCs is running on the server.<p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">It follows that client-server is weaker at the things which peer-to-peer excels at and vice-versa. In some cases it lacks speed, as messages have to pass through the server and then to relevant peer. Client-server also makes it more difficult to implement seamless host migration and good shared ownership.</span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">The above examples are not exhaustive and do not cover every implementation of both architectures so do not take those reasons as the only ones, do some research!</span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"><br></span><b style="mso-bidi-font-weight: normal"><u><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Integration<p></p></span></u></b></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Not only has the network architecture itself been different, but so has the way it is integrated with the rest of the game. Unfortunately, networking is a very obtrusive system as it really needs to know everything that is happening on relevant peers to keep things ticking over correctly.<p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Another question that I hear frequently is &ldquo;how do I write the code?&rdquo; or &ldquo;how do I lay out the systems?&rdquo; again, a valid and interesting question. Again, there is no </span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang="EN-US">&ldquo;one size fits all&rdquo; solution.</span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"><p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">I&rsquo;ve seen some extremely clever and some extremely stupid things done in relation to game networking over the past few years. Some solutions are over-engineered to the point of insanity and others are tacked on to the side of the game in a very scruffy fashion. <p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">The systems which are over-engineered tend to be written by one programmer throughout the lifetime of the project. That one programmer scurries around after everyone else and make&rsquo;s their code network friendly. None of the other programmers are involved with the networking system and the network programmer basically has entire control.<p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">The scruffy systems on the other hand, tend to appear when during the vast majority of production, there has been no network code. Very late on a large amount of the team focuses on getting online multiplayer working. This results in code which is essentially tacked on to the side of the game. Nothing in the game is designed to work over the network, so the code is littered with special case exceptions for certain systems.</span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Naturally you want to hit a balance between code which is too complexed and code which is messy, but this can be hard and needs the co-operation of every programmer on the team.<br></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><b style="mso-bidi-font-weight: normal"><u><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Solutions and best practices<p></p></span></u></b></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">There are lots of things you need to take into account when writing network code for games. The subject is quite deep and will only get more complicated as games try to do more and more online.<p></p></span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">The best thing you can do is thoroughly research the best solution for your title. It&rsquo;s also very important to get all programmers involved in writing code which is robust enough to work over the network; this helps you to avoid the integration problems I described above and leaves the network programmers to concentrate on the core network tech and architecture.</span></p><p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">I plan to follow up this post with some more in-depth details about both the architecture and integration aspects of network code, but going on my previous record... that might be a while.<p></p></span></p></p>
]]></content:encoded>
    </item>
    <item>
      <title>Concurrency and the Games Industry</title>
      <link>https://docs.microsoft.com/archive/blogs/joehegarty/concurrency-and-the-games-industry</link>
      <pubDate>Sun, 27 Sep 2009 10:50:00 GMT</pubDate>
      <dc:creator><![CDATA[Joe Hegarty1]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joehegarty/2009/09/27/concurrency-and-the-games-industry/</guid>
      <description><![CDATA[Ever since I played my first Massively-Multiplayer game I have been addicted. Not to the games, but...]]></description>
      <content:encoded><![CDATA[<p style="MARGIN: 0cm 0cm 10pt; mso-layout-grid-align: none" class="MsoNormal"><span style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri; mso-ansi-language: EN" lang="EN"><font size="3"><font face="Calibri">Ever since I played my first Massively-Multiplayer game I have been addicted. Not to the games, but to know how they can possibly work. Managing thousands, sometimes tens of thousands of simultaneous players is no small feat.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><p></p></font></font></span><p style="MARGIN: 0cm 0cm 10pt; mso-layout-grid-align: none" class="MsoNormal"><font size="3"><font face="Calibri"><span style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri; mso-ansi-language: EN" lang="EN">When I moved to the games industry from the (rather less interesting) business sector, I was therefore very excited to be working on a large-scale MMO as my very first project. With the success of games like World of Warcraft, and even services such as Xbox Live, much attention has been paid to massively scalable server solutions. The number of people specializing in development and technology for multiplayer games such as myself has expanded rapidly in the last few years. Games which have been traditionally single-player are now expected to implement multiplayer as standard.<br>There are more third-parties offering middleware for networking than ever before and services such as Microsoft&rsquo;s Xbox Live offer a framework that developers targeting that platform must implement, this simplifies both the development process and the end-user experience. </span>Networking and developing across a large-scale environment is complicated, many developers find the subject tedious at best. <span style="mso-spacerun: yes">&nbsp;</span></font></font></p><p style="MARGIN: 0cm 0cm 10pt; mso-layout-grid-align: none" class="MsoNormal"><font size="3" face="Calibri">Most programmers are used to writing applications which run in-order on a single thread. Even in the age of multi-threaded games, most developers only work with a single thread in their day to day tasks. Typically, different systems such as rendering, AI and networking will run on their own thread or will be split logically across a number of threads, in many cases this is hidden away from most of the developers by the engine and code is written as if it were a single-threaded environment. <br>Most modern programming languages such as C++ are designed in a way which makes their core functionality inherently single-threaded. Understanding code which is running in a multi-thread or multi-core environment is difficult. Debuggers have a hard time presenting the information in a form which can be easily understood by programmers, much multi-threaded code is powered by more abstract concepts such as messaging and queuing systems; it&rsquo;s simply not possible for the debugger to deduce exactly how the systems hang together in order to present it in a way which would be easily understood.</font></p><p style="MARGIN: 0cm 0cm 10pt; mso-layout-grid-align: none" class="MsoNormal"><font size="3" face="Calibri">In many ways, networking in a large-scale environment is similar to developing for a multi-threaded environment. Work is typically spread across multiple peers with each peer doing different bits of work concurrently with other peers. <br>There are numerous paradigms and implementations for these large-scale systems and going into each one and its advantages and disadvantages would be another post at the very least. In general these solutions fit into one of two categories:</font></p><p style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font size="3" face="Calibri">1.</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font size="3" face="Calibri">Each peer has a specific purpose, proxy or coordinator servers dish out work to the relevant peers as requests are received.</font></p><p style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 10pt 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpLast"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font size="3" face="Calibri">2.</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font size="3" face="Calibri">All peers share the same functionality; work is spread out between the peers based on available resources. </font></p><p style="MARGIN: 0cm 0cm 10pt; mso-layout-grid-align: none" class="MsoNormal"><font size="3" face="Calibri">It is not atypical to have a solution which fits into category two but also derives from category one. A website might have numerous web servers which can all deal with the same requests, but also a second layer of servers for database management.</font></p><p style="MARGIN: 0cm 0cm 10pt; mso-layout-grid-align: none" class="MsoNormal"><font size="3" face="Calibri">You might, at around this point, wonder what the point of this post actually is. <br>As consumers expect more and more from online games and services,&nbsp;the games industry&nbsp;going to need more programmers who are familiar with the abstract and concurrent nature of large-scale network solutions. With the rising popularity of CELL, GPGPU and Intel&rsquo;s Larrabee on the horizon&nbsp;the games industry is&nbsp;also going to need more and more programmers who have a firm grasp of multi-threaded development as consoles and PCs become more and more concurrent. I think we&rsquo;re at an exciting time of technological development and in many cases games are one of the first places new technology is leveraged.<br>Most of all,&nbsp;the industry is&nbsp;going to need people who are interested and passionate about this stuff.</font></p><p style="MARGIN: 0cm 0cm 10pt; mso-layout-grid-align: none" class="MsoNormal"><font size="3"><font face="Calibri">When people decide they want to be games programmers, very few of them think &ldquo;I want to be a multiplayer programmer&rdquo; or &ldquo;I want to work on core tech libraries&rdquo; such as those for multi-threading. Understandably people are more interested in the far more obvious areas of games such as rendering and that's a real shame. <br>It is my hope that&nbsp;the games industry will&nbsp;be able to get new developers interested in what is still one of the least explored areas of software development which is helping to drive some of the biggest changes the games industry has seen in recent years. <span style="mso-spacerun: yes">&nbsp;</span></font></font><span style="TEXT-TRANSFORM: uppercase"><p></p></span></p></p>
]]></content:encoded>
    </item>
    <item>
      <title>My very first post!</title>
      <link>https://docs.microsoft.com/archive/blogs/joehegarty/my-very-first-post</link>
      <pubDate>Mon, 21 Sep 2009 14:26:00 GMT</pubDate>
      <dc:creator><![CDATA[Joe Hegarty1]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/joehegarty/2009/09/21/my-very-first-post/</guid>
      <description><![CDATA[So, my very first post on my shiny new blog!I should probably say a little about me...]]></description>
      <content:encoded><![CDATA[<p>So, my very first post on my shiny new blog!<p>I should probably say a little about me otherwise&nbsp;nobody will&nbsp;know who I am or what I do and that might be sort of pointless...<br>My name is Joe Hegarty and I'm a Network Programmer at Lionhead Studios which is part of Microsoft Game Studios, I'm currently working on Fable III and my job is basically to write the code that deals the multiplayer aspect of the game alongside the other Gameplay Programmers who specialise in other areas. This blog is not specifically for game development&nbsp;or Fable, you can check out the&nbsp;news on the&nbsp;<a title="Lionhead website" href="http://www.lionhead.com/" mce_href="http://www.lionhead.com">Lionhead website</a>&nbsp;for Fable&nbsp;3. There are lots of sites about game development but I would advise looking into&nbsp;<a title="XNA Creators Club" href="http://creators.xna.com/" mce_href="http://creators.xna.com">XNA</a> if you're starting out.</p><p>As a network programmer a lot of the time I work on quite a low level (memory management, bit packing and the like) and I intend to focus on that in my blog. As I'm a C++ programmer the majority of what I post will naturally be in C++. However,&nbsp;I have been known to use C and ASM where appropiate and I'm always keen to learn something new! Recently&nbsp;I have been working on a TLSF heap allocator in my spare time and if I get it finished that might make up my first "proper"&nbsp;post.</p><p>I hope this blog will at least be somewhat informative or interesting.</p><p>Cheers,<br>Joe</p></p>
]]></content:encoded>
    </item>
  </channel>
</rss>