<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mrcodesushi&#039;s Blog</title>
	<atom:link href="http://mrcodesushi.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mrcodesushi.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Tue, 14 Jun 2011 13:46:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mrcodesushi.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Mrcodesushi&#039;s Blog</title>
		<link>http://mrcodesushi.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mrcodesushi.wordpress.com/osd.xml" title="Mrcodesushi&#039;s Blog" />
	<atom:link rel='hub' href='http://mrcodesushi.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MOre topics coming soon!</title>
		<link>http://mrcodesushi.wordpress.com/2011/06/14/more-topics-coming-soon/</link>
		<comments>http://mrcodesushi.wordpress.com/2011/06/14/more-topics-coming-soon/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 13:46:10 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://mrcodesushi.wordpress.com/2011/06/14/more-topics-coming-soon/</guid>
		<description><![CDATA[I’ve been busy with too much work on everything else but my personal game engine project for the past few months. Now I’m back and expect more topics coming soon! &#160; Cheers! - MrCodeSushi &#160; I love siomai Filed under: Uncategorized<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=193&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’ve been busy with too much work on everything else but my personal game engine project for the past few months. Now I’m back and expect more topics coming soon!</p>
<p>&#160;</p>
<p>Cheers!</p>
<p>- MrCodeSushi</p>
<p>&#160;</p>
<p>I love siomai</p>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=193&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2011/06/14/more-topics-coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>
	</item>
		<item>
		<title>Implicit Resource management Design&#8211;Idea</title>
		<link>http://mrcodesushi.wordpress.com/2010/11/08/implicit-resource-management-designidea/</link>
		<comments>http://mrcodesushi.wordpress.com/2010/11/08/implicit-resource-management-designidea/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 04:28:00 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Resource Management]]></category>

		<guid isPermaLink="false">https://mrcodesushi.wordpress.com/2010/11/08/implicit-resource-management-designidea/</guid>
		<description><![CDATA[An idea came into my mind today. Why not just make an implicit(automatic) resource management system instead of having some kind of an external resource management system. Ever since the way I did it was having an external resource manager that I would then use to create the resource I want. Take a look at <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=179&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>An idea came into my mind today. Why not just make an implicit(automatic) resource management system instead of having some kind of an external resource management system.</p>
<p>Ever since the way I did it was having an external resource manager that I would then use to create the resource I want. Take a look at this sample code below.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:291fc544-192d-4807-958a-f2f71db8ac0d" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Snippet 1</div>
<div style="background:#ddd;overflow:auto;">
<ol style="background:#10253a;white-space:nowrap;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li><span style="background:#10253a;color:#ffffa0;">void</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">FunkyFunkFunk</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#ffffa0;">void</span><span style="background:#10253a;color:#c3c3c3;"> )</span></li>
<li style="background:#04192e;"><span style="background:#10253a;color:#c3c3c3;">{</span></li>
<li>    <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">Texture</span><span style="background:#10253a;color:#c3c3c3;"> *</span><span style="background:#10253a;color:#e1e1e1;">pTexture</span><span style="background:#10253a;color:#c3c3c3;"> = </span><span style="background:#10253a;color:#e1e1e1;">TextureManager</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">GetInstance</span><span style="background:#10253a;color:#c3c3c3;">()-&gt;</span><span style="background:#10253a;color:#e1e1e1;">CreateTexture</span><span style="background:#10253a;color:#c3c3c3;">( &#8230; );</span></li>
<li style="background:#04192e;">    <span style="background:#10253a;color:#c3c3c3;"></span></li>
<li>    <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffb040;">// Use texture</span></li>
<li style="background:#04192e;">    <span style="background:#10253a;color:#ffb040;"></span><span style="background:#10253a;color:#e1e1e1;">pTexture</span><span style="background:#10253a;color:#c3c3c3;">-&gt;</span><span style="background:#10253a;color:#e1e1e1;">DoSomething</span><span style="background:#10253a;color:#c3c3c3;">();</span></li>
<li>    <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">pTexture</span><span style="background:#10253a;color:#c3c3c3;">-&gt;</span><span style="background:#10253a;color:#e1e1e1;">DoMoreStuff</span><span style="background:#10253a;color:#c3c3c3;">();</span></li>
<li style="background:#04192e;">    <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">pTexture</span><span style="background:#10253a;color:#c3c3c3;">-&gt;</span><span style="background:#10253a;color:#e1e1e1;">Render</span><span style="background:#10253a;color:#c3c3c3;">();</span></li>
<li>&nbsp;</li>
<li style="background:#04192e;">    <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffb040;">// We&#039;re done with the texture. Remove texture from the manager</span></li>
<li>    <span style="background:#10253a;color:#ffb040;"></span><span style="background:#10253a;color:#e1e1e1;">TextureManager</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">GetInstance</span><span style="background:#10253a;color:#c3c3c3;">()-&gt;</span><span style="background:#10253a;color:#e1e1e1;">DeleteTexture</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">pTexture</span><span style="background:#10253a;color:#c3c3c3;"> );</span></li>
<li style="background:#04192e;"><span style="background:#10253a;color:#c3c3c3;">}</span></li>
</ol></div>
</p></div>
</p></div>
<p>As you can see, we create a texture through a texture resource manager called <em>TextureManager</em> and once we’re done with the texture we go through the <em>TextureManager </em>again to remove that created resource.&#160; It’s not really much of a big deal but what if we could just hide the resource management code stuff yet still having all the benefits and convenience of managing your resources? That’s where I thought and said, “Why not just place the manager inside the resource class instead and handle the resource management creation and deletion through the constructor and destructor of the resource respectively?”. hmmm….</p>
<p>&#160;</p>
<p>- MrCodeSushi</p>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/game-development/'>Game Development</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/general-programming/'>General Programming</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/'>Programming</a> Tagged: <a href='http://mrcodesushi.wordpress.com/tag/resource-management/'>Resource Management</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=179&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2010/11/08/implicit-resource-management-designidea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>
	</item>
		<item>
		<title>A Simple Data Creation Framework</title>
		<link>http://mrcodesushi.wordpress.com/2010/09/05/a-simple-data-creation-framework/</link>
		<comments>http://mrcodesushi.wordpress.com/2010/09/05/a-simple-data-creation-framework/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 03:04:00 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Game Architecture]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[data creation framewor]]></category>
		<category><![CDATA[game script]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">https://mrcodesushi.wordpress.com/2010/09/05/a-simple-data-creation-framework/</guid>
		<description><![CDATA[First of all, I wasn’t really sure if I wanted to write this post or not. The data creation framework I made is mostly hacked without proper/formal scripting architectural design. But if this article could help anyone out there in some ways in their programming tasks, even just a little bit, then this blog wouldn’t <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=106&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First of all, I wasn’t really sure if I wanted to write this post or not. The data creation framework I made is mostly hacked without proper/formal scripting architectural design. But if this article could help anyone out there in some ways in their programming tasks, even just a little bit, then this blog wouldn’t be a waste. With this in mind, this article will be very brief with very little explanation for its implementation.</p>
<p>This data creation framework I will present enables a data driven architectural design to deliver game data/assets to your game. Since this is a data creation framework, its main purpose is only to bring data; nothing more, nothing less. That means that although the script looks like a full blown scripting language, it is not. This is not like LUA or any other scripting languages that you can define procedural-scripting or gameplay code. This framework simply defines a set of data with an assigned values for the framework to easily read in the data.</p>
<p>If you take a look at the class definition[1], you’ll see lots of containers supporting each data type that the framework supports. Let’s say for example you have a sample script code that looks something like in C<strong>ode listing 1.</strong></p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:16f8472e-84ee-406d-86f1-7ee62735fdb1" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Listing 1</div>
<div style="background:#ddd;max-height:500px;overflow:auto;">
<ol style="background:#10253a;white-space:nowrap;margin:0 0 0 2em;padding:0 0 0 5px;">
<li>    </li>
<li>    <span style="background:#10253a;color:#c3c3c3;">Vector3 vec3 = ( 1.0, 3.0, 2.578 );                            // 3D Vectors</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    </span></li>
</ol></div>
</p></div>
</p></div>
<p>Code Listing 1: An example of declaring a Vector3 data with a defined value of (1.0, 3.0, 2.578)</p>
<p><em>vec3, </em>as Vector3 as its data type, will be stored in the Vector3Array container.</p>
<p>So this framework is very simple and straightforward. It doesn’t do anything else other than declare data and this will do fine for the system I’m currently working towards on. The main methods that does the main string parsing and reading are in the <em>GetLine, LoadFromFile, ReadSection, and ReadValue </em>methods. </p>
<p>Here’s the implementation for the framework[1][2]. And a demo script on what the framework can do(<strong>Code Listing 2</strong>).</p>
<p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:09ed5e58-8d22-4c83-bb48-d0976e335b5c" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Listing 2</div>
<div style="background:#ddd;max-height:500px;overflow:auto;">
<ol style="background:#10253a;white-space:nowrap;margin:0 0 0 2.5em;padding:0 0 0 5px;">
<li><span style="background:#10253a;color:#c3c3c3;">// This is a sample script used to test Pulse Engine&#039;s PulseScript system.</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">// Below shows some of the features already available.</span></li>
<li>&nbsp;</li>
<li><span style="background:#10253a;color:#c3c3c3;">// A comment. An empty space follows below.</span></li>
<li>&nbsp;</li>
<li><span style="background:#10253a;color:#c3c3c3;">/*                        MULTI-LINE COMMENT</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    This is a multi-line comment. Multi-line comments </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    can span multiple lines and PulseScript will strip</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    it all out until it hits the closing mult-line comment character.</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">*/</span></li>
<li>&nbsp;</li>
<li><span style="background:#10253a;color:#c3c3c3;">// Another comment</span></li>
<li>&nbsp;</li>
<li><span style="background:#10253a;color:#c3c3c3;">Section pass // Comment in the same line as the code.</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">{</span></li>
<li>&nbsp;</li>
<li><span style="background:#10253a;color:#c3c3c3;">    String string = &quot;PulseScript can take in strings!!!!&quot;;</span></li>
<li>&nbsp;</li>
<li><span style="background:#10253a;color:#c3c3c3;">    String multiLineSting = &quot;PulseScript can also take in multi-line strings!!!!&#092;\par                                 This is the second line of a multi-line string.&#092;\par                                 Third line of the multi-line string. Another string in the third line. &#092;\par                                 Fourth line of the multi-string. This is the end of a multi-line string.  &quot;;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    // Supports boolean values</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Bool bool1 = true;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    // Supports scalar types (i.e. int and float)</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Float f = 3.987654321;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Int n1 = 5;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Int n2 = 10.9257; // This will automatically convert the value to int(floor, so the value will be 10).</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">        </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    // Supports section comments</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Bool /*Yup, this is a section comment*/ bool2 = false;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    /*Another section comment*/ Bool bool2 = false;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Bool /* section comment */bool3 /*another section comment*/ = true/*yet another section comment*/; /*and another*/ // And another&#8230;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    // Supports vectors too!!!</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Vector2 vec2 = ( 1.0, 3.0f /*appending &#039;f&#039; is optional*/ ); // 2D Vectors</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Vector3 vec3 = ( 1.0, 3.0, 2.578 );                            // 3D Vectors</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Vector4 vec4 = ( 1.0, 3.0 , 2.578, 3.14159265 );            // 4D Vectors or Quaternions</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    /* If you haven&#039;t noticed I just pulled a pi there. lolz */</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    /* Supports recursive sections (sections inside a section) */</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Section Mesh</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    {</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">        Section Material</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">        {</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">            String mergeMode    = &quot;Blend&quot;;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">            String bumpMap        = &quot;bump.tga&quot;;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">            String textureName    = &quot;MeshTexture.tga&quot;;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">        };</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">        </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">        String meshName = &quot;tiny.x&quot;; // The infamouse DX character</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    };</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    // Array of ints.</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Int[5] indices1 = { 1, 2, 3, 4, 5 }; // We can explicitly define the size of an array</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Int[9] indices2 = { 1, 2, 3,    &#092;\par                         4, 5, 6,    &#092;\par                         7, 8, 9,    &#092;\tab &#092;&#092; comma at the end is optional </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    }; </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    // NOTE: Another important thing is that only arrays and strings can define values in multiple lines.</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Float[3] floatArray = { 3.256, 1.23, 456.789 };    // Float arrays</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Vector2[2] vert2dArray1 = { (3.0, 2.0), (2.56, 1.23) };</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    Vector2[3] vert2dArray2 = { (3, 2.0), (2.56, 1.23),    &#092;\par                                  (1.23, 4.56) };</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    /*</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">     You can&#039;t do things like this though: </span></li>
<li><span style="background:#10253a;color:#c3c3c3;">        Vector3[2] bla = { ( 1.2, 2.2, &#092; // &lt;&#8212; Incomplete</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">            2.1 ), (1,2,3 )};</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    */</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    // TODO: We still need to implement these&#8230;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    // Same variable name implicitly overrides the older one. Do something about this.</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">    // Int[] indices3 = { 6,7,8,9,10 }; // We can probably do something like this in the future&#8230;</span></li>
<li><span style="background:#10253a;color:#c3c3c3;">};</span></li>
</ol></div>
</p></div>
</p></div>
<p>Code Listing 2: Sample data creation script. Download it here[3]</p>
<p>&#160;</p>
<p>Bibliography:</p>
<p>1. PulseScript.h, <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/PulseScript.h">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/PulseScript.h</a></p>
<p>2. PulseScript.cpp, <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/PulseScript.cpp">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/PulseScript.cpp</a></p>
<p>3. Sample PulseScript script code, h<a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Demo/SampleScript.ps">ttp://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Demo/SampleScript.ps</a></p>
<p>- MrCodeSushi</p>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/game-architecture/'>Game Architecture</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/'>Game Development</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/general-programming/'>General Programming</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/'>Programming</a> Tagged: <a href='http://mrcodesushi.wordpress.com/tag/data-creation-framewor/'>data creation framewor</a>, <a href='http://mrcodesushi.wordpress.com/tag/game-script/'>game script</a>, <a href='http://mrcodesushi.wordpress.com/tag/script/'>Script</a>, <a href='http://mrcodesushi.wordpress.com/tag/scripting/'>Scripting</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=106&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2010/09/05/a-simple-data-creation-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>
	</item>
		<item>
		<title>Data Creation Framework Screenshot</title>
		<link>http://mrcodesushi.wordpress.com/2010/08/19/data-creation-framework-screenshot/</link>
		<comments>http://mrcodesushi.wordpress.com/2010/08/19/data-creation-framework-screenshot/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 12:49:52 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Effects Framework]]></category>
		<category><![CDATA[Pulse Script]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://mrcodesushi.wordpress.com/?p=98</guid>
		<description><![CDATA[A preview on a Data Creation Framework/Scripting System I&#8217;ve been working on the side. Not bad considering I only work on this on Sundays IMO. :p An article discussion will follow soon! Filed under: Game Development, General Programming, Programming Tagged: Effects Framework, Pulse Script, Script, Scripting<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=98&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A preview on a Data Creation Framework/Scripting System I&#8217;ve been working on the side. Not bad considering I only work on this on Sundays IMO. :p An article discussion will follow soon!</p>
<div id="attachment_99" class="wp-caption aligncenter" style="width: 650px"><a href="http://mrcodesushi.files.wordpress.com/2010/08/pulsesamplescript-ps.jpg"><img class="size-full wp-image-99" title="PulseSampleScript.ps" src="http://mrcodesushi.files.wordpress.com/2010/08/pulsesamplescript-ps.jpg?w=510" alt="Sample Pulse Script"   /></a><p class="wp-caption-text">Sample Pulse Script</p></div>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/game-development/'>Game Development</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/general-programming/'>General Programming</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/'>Programming</a> Tagged: <a href='http://mrcodesushi.wordpress.com/tag/effects-framework/'>Effects Framework</a>, <a href='http://mrcodesushi.wordpress.com/tag/pulse-script/'>Pulse Script</a>, <a href='http://mrcodesushi.wordpress.com/tag/script/'>Script</a>, <a href='http://mrcodesushi.wordpress.com/tag/scripting/'>Scripting</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=98&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2010/08/19/data-creation-framework-screenshot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>10.687834 122.960813</georss:point>
		<geo:lat>10.687834</geo:lat>
		<geo:long>122.960813</geo:long>
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>

		<media:content url="http://mrcodesushi.files.wordpress.com/2010/08/pulsesamplescript-ps.jpg" medium="image">
			<media:title type="html">PulseSampleScript.ps</media:title>
		</media:content>
	</item>
		<item>
		<title>Game System Registry With Integrated Simple Unit Testing Framework</title>
		<link>http://mrcodesushi.wordpress.com/2010/08/11/game-system-registry-with-integrated-simple-unit-testing-framework/</link>
		<comments>http://mrcodesushi.wordpress.com/2010/08/11/game-system-registry-with-integrated-simple-unit-testing-framework/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 15:06:00 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Game Architecture]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Game System Registry]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Unit Test]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">https://mrcodesushi.wordpress.com/2010/08/11/game-system-registry-with-integrated-simple-unit-testing-framework/</guid>
		<description><![CDATA[This system I will share today is roughly adopted from Guillaume Blanc’s Registrer(Registry) system[1]. This Registry system is designed to keep track all registered classes and objects in an easy, global, and manageable manner. This system can easily send events such as initialization, shutdown, unit testing, or anything else that you can imagine and each <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=88&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This system I will share today is roughly adopted from Guillaume Blanc’s Registrer(Registry) system[1]. This Registry system is designed to keep track all registered classes and objects in an easy, global, and manageable manner. This system can easily send events such as initialization, shutdown, unit testing, or anything else that you can imagine and each registered systems/objects can react to a specified event. If this sounds very familiar to you, chances are you’ve already heard this in your Design Patterns class. Yes, this is the dispatcher-listener design pattern. An object or a system (aka listener) registers to the Registry(aka dispatcher) and when the Registry signals a message, it sends a message to each and every registered listeners.
<p>There are two types the Registry accepts. One is a class (static classes) and the second is an instantiated object. An interface class will play a big role on these two types in order for them to be accepted by the Registry. <strong>Code listing 1 </strong>shows the interface class.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ddbe0ada-1a18-4c85-b3de-cae2f3f3ddeb" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Listing 1</div>
<div style="background-color:#10253a;max-height:400px;overflow:auto;white-space:nowrap;padding:2px 5px;"><span style="background:#10253a;color:#ffffa0;">class</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;"> : </span><span style="background:#10253a;color:#ffffa0;">private</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">NonCopyable</span><br /> <span style="background:#10253a;color:#e1e1e1;">{</span><br /> <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">public</span><span style="background:#10253a;color:#c3c3c3;">:</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffb040;">// Initialize object priority</span><br />     <span style="background:#10253a;color:#ffb040;"></span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">ERegistryPrimaryPriority</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Type</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">primaryPriority</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#e1e1e1;">ERegistrySecondaryPriority</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Type</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">secondaryPriority</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#e1e1e1;">BOOL</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">bRegisterObject</span><span style="background:#10253a;color:#c3c3c3;"> = </span><span style="background:#10253a;color:#e1e1e1;">TRUE</span><span style="background:#10253a;color:#c3c3c3;"> );</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">virtual</span><span style="background:#10253a;color:#c3c3c3;"> ~</span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;"> ( </span><span style="background:#10253a;color:#ffffa0;">void</span><span style="background:#10253a;color:#c3c3c3;"> );</span></p>
<p> <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">protected</span><span style="background:#10253a;color:#c3c3c3;">:</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">friend</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">Registry</span><span style="background:#10253a;color:#c3c3c3;">;</span></p>
<p>     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffb040;">// Registry object operation handling </span><br />     <span style="background:#10253a;color:#ffb040;"></span><span style="background:#10253a;color:#ffffa0;">virtual</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">BOOL</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">DoRegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">ERegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Type</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">op</span><span style="background:#10253a;color:#c3c3c3;"> ) = 0;</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffb040;">// Less than registry object comparison</span><br />     <span style="background:#10253a;color:#ffb040;"></span><span style="background:#10253a;color:#ffffa0;">static</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">BOOL</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">IsLessPriority</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#ffffa0;">const</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;"> *</span><span style="background:#10253a;color:#e1e1e1;">plhs</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#ffffa0;">const</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;"> *</span><span style="background:#10253a;color:#e1e1e1;">prhs</span><span style="background:#10253a;color:#c3c3c3;"> );</span></p>
<p> <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">private</span><span style="background:#10253a;color:#c3c3c3;">:</span></p>
<p>     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">ERegistryPrimaryPriority</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Type</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">m_primaryPriority</span><span style="background:#10253a;color:#c3c3c3;">;</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">ERegistrySecondaryPriority</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Type</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">m_secondaryPriority</span><span style="background:#10253a;color:#c3c3c3;">;</span><br /> <span style="background:#10253a;color:#c3c3c3;">};</span></div>
</p></div>
</p></div>
<p> 
<p>As you can see in <strong>Code Listing 1</strong>, the abstract base class needs the derived classes to define <em>DoRegistryOperation(). DoRegistryOperation() </em>method is the entry point for all the events sent by the <em>Registry</em>.</p>
<p>You may also have noticed that the constructor accepts two parameters named ERegistryPrimaryPriority and ERegistrySecondaryPriority. These enums defines the priority of the Registry Object from lowest to highest priority. These priorities are very important as they control the order of the registered objects to call. What you can do is probably set very important systems or classes having the highest priority without dependencies. Less important systems or systems that requires dependencies would obviously need to be set in a lower priority than the dependency it requires.</p>
<p>For registering an instantiated object, one would simply inherit the class with <em>IRegistryObject </em>then calling <em>IRegistryObject</em>’s constructor to automatically register it in the Registry.</p>
<p>For classes, it takes a little bit more of explaining to do. The problem with this is that, there are no actual objects to register in the Registry. So what we would do is create a class that encapsulates or connect the class in question in some way. Thus, we devised a macro to do exactly like that. Take a look at <strong>Code Listing 2</strong>.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0e1d1698-3a64-4b1c-8aef-0deff85fc0a6" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Listing 2</div>
<div style="background-color:#10253a;max-height:400px;overflow:auto;white-space:nowrap;padding:2px 5px;"><span style="background:#10253a;color:#809fb0;">#define</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">PSX_START_REGISTRY_OBJECT</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">_class_</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#e1e1e1;">primaryPriority</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#e1e1e1;">secondaryPriority</span><span style="background:#10253a;color:#c3c3c3;"> )    &#092;\par     </span><span style="background:#10253a;color:#ffffa0;">class</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">RegistryObject</span><span style="background:#10253a;color:#c3c3c3;">##</span><span style="background:#10253a;color:#e1e1e1;">_class_</span><span style="background:#10253a;color:#c3c3c3;"> : </span><span style="background:#10253a;color:#ffffa0;">public</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject    &#092;</span><span style="background:#10253a;color:#c3c3c3;">\par     {    &#092;\par     </span><span style="background:#10253a;color:#ffffa0;">public</span><span style="background:#10253a;color:#c3c3c3;">:    &#092;\par         </span><span style="background:#10253a;color:#e1e1e1;">RegistryObject</span><span style="background:#10253a;color:#c3c3c3;">##</span><span style="background:#10253a;color:#e1e1e1;">_class_</span><span style="background:#10253a;color:#c3c3c3;">##( </span><span style="background:#10253a;color:#ffffa0;">void</span><span style="background:#10253a;color:#c3c3c3;"> ) : </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">primaryPriority</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#e1e1e1;">secondaryPriority</span><span style="background:#10253a;color:#c3c3c3;"> ) { } &#092;\par         </span><span style="background:#10253a;color:#ffffa0;">virtual</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">BOOL</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">DoRegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">ERegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Type</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">op</span><span style="background:#10253a;color:#c3c3c3;"> );    &#092;\par     };    &#092;\par     </span><span style="background:#10253a;color:#ffffa0;">static</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">RegistryObject</span><span style="background:#10253a;color:#c3c3c3;">##</span><span style="background:#10253a;color:#e1e1e1;">_class_</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">gRegistryObject</span><span style="background:#10253a;color:#c3c3c3;">##</span><span style="background:#10253a;color:#e1e1e1;">_class_</span><span style="background:#10253a;color:#c3c3c3;">##;    &#092;\par     &#092;\par     </span><span style="background:#10253a;color:#e1e1e1;">BOOL</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">RegistryObject</span><span style="background:#10253a;color:#c3c3c3;">##</span><span style="background:#10253a;color:#e1e1e1;">_class_</span><span style="background:#10253a;color:#c3c3c3;">##::</span><span style="background:#10253a;color:#e1e1e1;">DoRegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">ERegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Type</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">op</span><span style="background:#10253a;color:#c3c3c3;"> )    &#092;\par     {    &#092;\par         </span><span style="background:#10253a;color:#ffffa0;">switch</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">op</span><span style="background:#10253a;color:#c3c3c3;"> ) &#092;\par         {</span></p>
<p> <span style="background:#10253a;color:#809fb0;">#define</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">PSX_END_REGISTRY_OBJECT</span><span style="background:#10253a;color:#c3c3c3;">( )    &#092;\par         </span><span style="background:#10253a;color:#ffffa0;">default</span><span style="background:#10253a;color:#c3c3c3;">:    &#092;\par         </span><span style="background:#10253a;color:#ffffa0;">break</span><span style="background:#10253a;color:#c3c3c3;">; &#092;\par         }    &#092;\par         </span><span style="background:#10253a;color:#ffffa0;">return</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">TRUE</span><span style="background:#10253a;color:#c3c3c3;">;    &#092;\par     }</span></p>
<p> <span style="background:#10253a;color:#809fb0;">#define</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">PSX_REGISTRY_ON_INITIALIZE</span><span style="background:#10253a;color:#c3c3c3;">()    </span><span style="background:#10253a;color:#ffffa0;">break</span><span style="background:#10253a;color:#c3c3c3;">; </span><span style="background:#10253a;color:#ffffa0;">case</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">ERegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">INITIALIZE</span><span style="background:#10253a;color:#c3c3c3;">:</span><br /> <span style="background:#10253a;color:#809fb0;">#define</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">PSX_REGISTRY_ON_SHUTDOWN</span><span style="background:#10253a;color:#c3c3c3;">()        </span><span style="background:#10253a;color:#ffffa0;">break</span><span style="background:#10253a;color:#c3c3c3;">; </span><span style="background:#10253a;color:#ffffa0;">case</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">ERegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">SHUTDOWN</span><span style="background:#10253a;color:#c3c3c3;">:</span><br /> <span style="background:#10253a;color:#809fb0;">#define</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">PSX_REGISTRY_ON_TEST</span><span style="background:#10253a;color:#c3c3c3;">()            </span><span style="background:#10253a;color:#ffffa0;">break</span><span style="background:#10253a;color:#c3c3c3;">; </span><span style="background:#10253a;color:#ffffa0;">case</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">ERegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">TEST</span><span style="background:#10253a;color:#c3c3c3;">:</span></div>
</p></div>
</p></div>
<p>Quite scary, no? Well, don’t be. These are just predefined preprocessors that basically replaces everything in code that finds the same name as the defined name. What these macro does is that it declares a new class, derived from <em>IRegistryObject , </em>and defines the <em>DoRegistryOperation() method. The DoRegistryOperation() </em>is actually empty and you’ll be the one to write code into it let be initialization, shutdown, or test code using the <em>PSX_REGISTRY_ON…()</em> macro declarations. <strong>Code Listing 3</strong> shows a sample on how the macros are used.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:09b2888c-439d-4b5f-a3d8-784d4eb56900" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Listing 3</div>
<div style="background-color:#10253a;max-height:400px;overflow:auto;white-space:nowrap;padding:2px 5px;"><span style="background:#10253a;color:#e1e1e1;">PSX_START_REGISTRY_OBJECT</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">String</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#e1e1e1;">ERegistryPrimaryPriority</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Normal</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#e1e1e1;">ERegistrySecondaryPriority</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Normal</span><span style="background:#10253a;color:#c3c3c3;"> )</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">PSX_REGISTRY_ON_TEST</span><span style="background:#10253a;color:#c3c3c3;">()</span><br />     <span style="background:#10253a;color:#c3c3c3;">{</span><br />         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">String</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">str1</span><span style="background:#10253a;color:#c3c3c3;"> = </span><span style="background:#10253a;color:#bff9d2;">&quot;Hello World.&quot;</span><span style="background:#10253a;color:#c3c3c3;">;</span><br />         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">PSX_Assert</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">str1</span><span style="background:#10253a;color:#c3c3c3;">.</span><span style="background:#10253a;color:#e1e1e1;">GetLength</span><span style="background:#10253a;color:#c3c3c3;">() == 12, </span><span style="background:#10253a;color:#bff9d2;">&quot;Length should be 12.&quot;</span><span style="background:#10253a;color:#c3c3c3;"> );</span></p>
<p>         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">SIZE_T</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">index</span><span style="background:#10253a;color:#c3c3c3;"> = </span><span style="background:#10253a;color:#e1e1e1;">str1</span><span style="background:#10253a;color:#c3c3c3;">.</span><span style="background:#10253a;color:#e1e1e1;">FindFirstOf</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#bff9d2;">&quot;l&quot;</span><span style="background:#10253a;color:#c3c3c3;"> );</span><br />         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">PSX_Assert</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">index</span><span style="background:#10253a;color:#c3c3c3;"> == 2, </span><span style="background:#10253a;color:#bff9d2;">&quot;Index should be 2.&quot;</span><span style="background:#10253a;color:#c3c3c3;"> );</span></p>
<p>         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">index</span><span style="background:#10253a;color:#c3c3c3;"> = </span><span style="background:#10253a;color:#e1e1e1;">str1</span><span style="background:#10253a;color:#c3c3c3;">.</span><span style="background:#10253a;color:#e1e1e1;">FindFirstNotOf</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#bff9d2;">&quot;H&quot;</span><span style="background:#10253a;color:#c3c3c3;"> );</span><br />         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">PSX_Assert</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">index</span><span style="background:#10253a;color:#c3c3c3;"> == 1, </span><span style="background:#10253a;color:#bff9d2;">&quot;index should be 1.&quot;</span><span style="background:#10253a;color:#c3c3c3;"> );</span></p>
<p>         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">String</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">str2</span><span style="background:#10253a;color:#c3c3c3;"> = </span><span style="background:#10253a;color:#e1e1e1;">str1</span><span style="background:#10253a;color:#c3c3c3;">.</span><span style="background:#10253a;color:#e1e1e1;">SubString</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">index</span><span style="background:#10253a;color:#c3c3c3;"> );</span><br />         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">PSX_Assert</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">PSX_StrCmp</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">str2</span><span style="background:#10253a;color:#c3c3c3;">.</span><span style="background:#10253a;color:#e1e1e1;">GetCString</span><span style="background:#10253a;color:#c3c3c3;">(), </span><span style="background:#10253a;color:#e1e1e1;">PSX_String</span><span style="background:#10253a;color:#c3c3c3;">(</span><span style="background:#10253a;color:#bff9d2;">&quot;ello World.&quot;</span><span style="background:#10253a;color:#c3c3c3;">) ) == 0, </span><span style="background:#10253a;color:#bff9d2;">&quot;Substring method failed.&quot;</span><span style="background:#10253a;color:#c3c3c3;"> );</span></p>
<p>         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">return</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">TRUE</span><span style="background:#10253a;color:#c3c3c3;">;</span><br />     <span style="background:#10253a;color:#c3c3c3;">}</span><br /> <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">PSX_END_REGISTRY_OBJECT</span><span style="background:#10253a;color:#c3c3c3;">();</span></div>
</p></div>
</p></div>
<p><strong>Code Listing 3</strong> shows registering a String class to the Registry and defining a Unit Test code for code testing.[2] Please study <strong>Code Listing 2 </strong>and <strong>Code Listing 3 </strong>to fully grasp and understand what it is trying to do. </p>
<p>And lastly, I present to you the <em>Registry</em> class shown in <strong>Code Listing 4</strong>.
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:bdb942f7-cfb6-43b1-a14d-deaea88b9849" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;">Code Listing 4</div>
<div style="background-color:#10253a;max-height:400px;overflow:auto;white-space:nowrap;padding:2px 5px;"><span style="background:#10253a;color:#ffffa0;">class</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">Registry</span><br /> <span style="background:#10253a;color:#e1e1e1;">{</span><br /> <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">public</span><span style="background:#10253a;color:#c3c3c3;">:</span></p>
<p>     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">static</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">BOOL</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">ExecuteOperation</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">ERegistryOperation</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">Type</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">op</span><span style="background:#10253a;color:#c3c3c3;"> );</span></p>
<p> <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">private</span><span style="background:#10253a;color:#c3c3c3;">:</span></p>
<p>     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">static</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#ffffa0;">void</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">RegisterObject</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;"> *</span><span style="background:#10253a;color:#e1e1e1;">pObj</span><span style="background:#10253a;color:#c3c3c3;"> );</span></p>
<p>     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">static</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#ffffa0;">void</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">UnregisterObject</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;"> *</span><span style="background:#10253a;color:#e1e1e1;">pObj</span><span style="background:#10253a;color:#c3c3c3;"> );</span></p>
<p> <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">private</span><span style="background:#10253a;color:#c3c3c3;">:</span></p>
<p>     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">friend</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;">;</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">friend</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">RegisterClassRAII</span><span style="background:#10253a;color:#c3c3c3;">;</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">friend</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#ffffa0;">class</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">TestRAII</span><span style="background:#10253a;color:#c3c3c3;">;</span></p>
<p>     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffb040;">// Custom compare trait for sorting registry objects based on their priority</span><br />     <span style="background:#10253a;color:#ffb040;"></span><span style="background:#10253a;color:#ffffa0;">template</span><span style="background:#10253a;color:#c3c3c3;"> &lt; </span><span style="background:#10253a;color:#ffffa0;">typename</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">T</span><span style="background:#10253a;color:#c3c3c3;"> &gt;</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">class</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">RegistryObjectLessThan</span><br />     <span style="background:#10253a;color:#e1e1e1;">{</span><br />     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">public</span><span style="background:#10253a;color:#c3c3c3;">:</span><br />         <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#e1e1e1;">BOOL</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#ffffa0;">operator</span><span style="background:#10253a;color:#c3c3c3;"> () ( </span><span style="background:#10253a;color:#ffffa0;">const</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">T</span><span style="background:#10253a;color:#c3c3c3;"> &amp;</span><span style="background:#10253a;color:#e1e1e1;">lhs</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#ffffa0;">const</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">T</span><span style="background:#10253a;color:#c3c3c3;"> &amp;</span><span style="background:#10253a;color:#e1e1e1;">rhs</span><span style="background:#10253a;color:#c3c3c3;"> ) </span><span style="background:#10253a;color:#ffffa0;">const</span><br />         <span style="background:#10253a;color:#ffffa0;">{</span><br />             <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">return</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;">::</span><span style="background:#10253a;color:#e1e1e1;">IsLessPriority</span><span style="background:#10253a;color:#c3c3c3;">( </span><span style="background:#10253a;color:#e1e1e1;">lhs</span><span style="background:#10253a;color:#c3c3c3;">, </span><span style="background:#10253a;color:#e1e1e1;">rhs</span><span style="background:#10253a;color:#c3c3c3;"> );</span><br />         <span style="background:#10253a;color:#c3c3c3;">}</span><br />     <span style="background:#10253a;color:#c3c3c3;">};</span></p>
<p>     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">typedef</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">SortedLList</span><span style="background:#10253a;color:#c3c3c3;">&lt; </span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;"> *, </span><span style="background:#10253a;color:#e1e1e1;">RegistryObjectLessThan</span><span style="background:#10253a;color:#c3c3c3;">&lt;</span><span style="background:#10253a;color:#e1e1e1;">IRegistryObject</span><span style="background:#10253a;color:#c3c3c3;"> *&gt; &gt; </span><span style="background:#10253a;color:#e1e1e1;">ObjectList</span><span style="background:#10253a;color:#c3c3c3;">;</span></p>
<p>     <span style="background:#10253a;color:#c3c3c3;"></span><span style="background:#10253a;color:#ffffa0;">static</span><span style="background:#10253a;color:#c3c3c3;"> </span><span style="background:#10253a;color:#e1e1e1;">ObjectList</span><span style="background:#10253a;color:#c3c3c3;"> *</span><span style="background:#10253a;color:#e1e1e1;">m_pObjectList</span><span style="background:#10253a;color:#c3c3c3;">;</span></p>
<p> <span style="background:#10253a;color:#c3c3c3;">};</span></div>
</p></div>
</p></div>
</p>
<p>There’s nothing much really to discuss here. Registry objects simply register themselves by calling Registry::RegisterObject and they will be registered in the Registry. UnregisterObject removes them from the <em>Registry</em>.     </p>
<p><strong>Last Thoughts and Further Improvements</strong></p>
<p>You may have noticed that the <em>Registry </em>class uses a SortedList (SortedLList). It is basically a sorted linked-list. That being said, it won’t be a good idea to register lots and lots of instantiated objects. This system is designed to handle application/game systems at best. Such systems would be a memory manager, Sound System, Input System, Grpahics System, etc… If you want to make it handle a great amount of instantiated objects then you may have to change a more capable container such as a vector, hash-table or a map for example.</p>
<p><strong>Implementation</strong></p>
<p>Full implementation of the Registry system/class can be found here[3].</p>
<p><strong>Bibliography</strong></p>
<ol>
<li>Guillaume Blanc, Article source code, Registrer, Cross platform rendering thread, ShaderX7, 2009 </li>
<li>Pulse::String class, <a title="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/String.h" href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/String.h">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/String.h</a>, <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/String.cpp">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/String.cpp</a> </li>
<li>Pulse::Registry class, <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/Registry.h">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/Registry.h</a>, <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/Registry.cpp">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/Registry.cpp</a> </li>
</ol>
<p align="center"><strong>Don’t forget a good dose of Mr. Louis Armstrong song!</strong>     </p>
<div align="center">
<div style="width:366px;display:block;float:none;margin-left:auto;margin-right:auto;padding:0;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:d84f30f8-4906-4793-87bb-34f83944937e" class="wlWriterEditableSmartContent">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='510' height='317' src='http://www.youtube.com/embed/xotoDy5806Y?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
<div style="width:366px;clear:both;font-size:.8em;">What a Wonderful WOrld–Louis Armstrong</div>
</div></div>
<p align="left">&#160;</p>
<p> &#8211; MrCodeSushi   </p>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/game-architecture/'>Game Architecture</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/'>Game Development</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/general-programming/'>General Programming</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/'>Programming</a> Tagged: <a href='http://mrcodesushi.wordpress.com/tag/game-system-registry/'>Game System Registry</a>, <a href='http://mrcodesushi.wordpress.com/tag/registry/'>Registry</a>, <a href='http://mrcodesushi.wordpress.com/tag/unit-test/'>Unit Test</a>, <a href='http://mrcodesushi.wordpress.com/tag/unit-testing/'>Unit Testing</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=88&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2010/08/11/game-system-registry-with-integrated-simple-unit-testing-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>
	</item>
		<item>
		<title>Your Own custom abstract IOStream interface</title>
		<link>http://mrcodesushi.wordpress.com/2010/08/09/your-own-custom-abstract-iostream-interface/</link>
		<comments>http://mrcodesushi.wordpress.com/2010/08/09/your-own-custom-abstract-iostream-interface/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 07:29:00 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[FIle]]></category>
		<category><![CDATA[FileIO]]></category>
		<category><![CDATA[IO]]></category>
		<category><![CDATA[IOStream]]></category>
		<category><![CDATA[Stream]]></category>

		<guid isPermaLink="false">https://mrcodesushi.wordpress.com/2010/08/09/your-own-custom-abstract-iostream-interface/</guid>
		<description><![CDATA[This is more of an obvious avoidable problem than a necessary work/solution. But I needed this on how I was working on my own little “engine”. A couple of months ago, I was working on a Virtual File System. I later discovered that std::fstream has a 4GB limit. So I resorted to using the Stream <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=78&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is more of an obvious avoidable problem than a necessary work/solution. But I needed this on how I was working on my own little “engine”. A couple of months ago, I was working on a Virtual File System. I later discovered that std::fstream has a 4GB limit. So I resorted to using the Stream I/O instead which can handle greater than the 4GB limit. The problem with this is that it isn’t structured in an Object-Oriented way. Yes we want everything to be Object-Oriented. That being said, I ended up wrapping the Stream I/O into a neat simple to use class[1][2].</p>
<p>Now I’m working on a new system which requires a generic way to input and output streams. What I mean is that I want my system to not care where the system is reading in or writing out data. Let it be reading in from an input peripheral, reading from a file, writing to a console or writing to a file. So I designed a very simple abstract I/O stream class. It is broken down into two classes, <em>IStream</em> and <em>OStream</em>, which is derived from a base <em>Stream</em> class[3].</p>
<p>These abstract classes are definitely far from complete. But it seems to serve well for my purpose. So I can at least say that this is a good start.</p>
<p>If you take a look at the implementations provided, you’ll notice that only the <em>FileIO </em>class is currently derived from it right now. I still have to add a bunch of derived classes to encapsulate <em>cin</em>, <em>cout</em>, and a bunch of others that I can think of which is currently in my TODO list that I have to do sometime in the future(no pun intended).</p>
<p>Links:</p>
<p>1. FileIO.h &#8211; <a title="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/FileIO.h" href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/FileIO.h">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/FileIO.h</a></p>
<p>2. FileIO.cpp &#8211; <a title="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/FileIO.cpp" href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/FileIO.cpp">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/FileIO.cpp</a></p>
<p>3. Steam.h – Stream, OStream, IStream &#8211; <a title="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/Stream.h" href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/Stream.h">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/Stream.h</a></p>
<p>Dashing Song to Listen to:</p>
<div>
<div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b627abd7-c5f5-4c13-bbee-f1588fe755c1" class="wlWriterEditableSmartContent" style="width:425px;display:block;float:none;margin-left:auto;margin-right:auto;padding:0;">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='510' height='317' src='http://www.youtube.com/embed/QCpDD7_rJc4?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></div>
<div style="width:425px;clear:both;font-size:.8em;">Andrews Sisters–I’ve Got A Guy In Kalamazoo</div>
</div>
</div>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/game-development/'>Game Development</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/general-programming/'>General Programming</a>, <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/'>Programming</a> Tagged: <a href='http://mrcodesushi.wordpress.com/tag/c/'>C++</a>, <a href='http://mrcodesushi.wordpress.com/tag/file/'>FIle</a>, <a href='http://mrcodesushi.wordpress.com/tag/fileio/'>FileIO</a>, <a href='http://mrcodesushi.wordpress.com/tag/general-programming/'>General Programming</a>, <a href='http://mrcodesushi.wordpress.com/tag/io/'>IO</a>, <a href='http://mrcodesushi.wordpress.com/tag/iostream/'>IOStream</a>, <a href='http://mrcodesushi.wordpress.com/tag/programming/'>Programming</a>, <a href='http://mrcodesushi.wordpress.com/tag/stream/'>Stream</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=78&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2010/08/09/your-own-custom-abstract-iostream-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>
	</item>
		<item>
		<title>New blog</title>
		<link>http://mrcodesushi.wordpress.com/2010/08/06/new-blog/</link>
		<comments>http://mrcodesushi.wordpress.com/2010/08/06/new-blog/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 22:24:34 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[New blog]]></category>
		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://mrcodesushi.wordpress.com/?p=4</guid>
		<description><![CDATA[This will be my new blog from now on since that Windows Live blog is crappy and I couldn&#8217;t get much SEO out of it. So stay tuned for more game development articles coming soon! Filed under: Uncategorized Tagged: life, New blog, rants<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=4&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://mrcodesushi.files.wordpress.com/2010/08/5.jpg"></a>This will be my new blog from now on since that Windows Live blog is crappy and I couldn&#8217;t get much SEO out of it. So stay tuned for more game development articles coming soon!</p>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://mrcodesushi.wordpress.com/tag/life/'>life</a>, <a href='http://mrcodesushi.wordpress.com/tag/new-blog/'>New blog</a>, <a href='http://mrcodesushi.wordpress.com/tag/rants/'>rants</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=4&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2010/08/06/new-blog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://mrcodesushi.wordpress.com/2010/08/06/hello-world/</link>
		<comments>http://mrcodesushi.wordpress.com/2010/08/06/hello-world/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 21:42:04 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mrcodesushi.wordpress.com/?p=1</guid>
		<description><![CDATA[Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging! Filed under: Uncategorized<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=1&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcome to <a href="http://wordpress.com/">WordPress.com</a>. This is your first post. Edit or delete it and start blogging!</p>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=1&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2010/08/06/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>
	</item>
		<item>
		<title>A Flexible Material System in Design by Maxime Beaudoin</title>
		<link>http://mrcodesushi.wordpress.com/2010/05/08/a-flexible-material-system-in-design-by-maxime-beaudoin/</link>
		<comments>http://mrcodesushi.wordpress.com/2010/05/08/a-flexible-material-system-in-design-by-maxime-beaudoin/#comments</comments>
		<pubDate>Fri, 07 May 2010 16:16:00 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Game Programming]]></category>

		<guid isPermaLink="false">http://mrcodesushi.wordpress.com/2010/05/08/a-flexible-material-system-in-design-by-maxime-beaudoin</guid>
		<description><![CDATA[  I was looking for some good Material System designs in teh interwebz and I stumbled upon this one article by Maxime Beaudoin. Quote from ShaderX6 book: “Maxime BeaudoinMaxime Beaudoin is a 3D graphics programmer at Ubisoft Quebec studio, Canada. He started to learn real-time 3D graphics by himself in 2001 and received his B.S. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=108&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!4483403BEB19180F!344" class="bvMsg">
<p> </p>
<p>I was looking for some good Material System designs in teh interwebz and I stumbled upon this one article by Maxime Beaudoin. Quote from <a href="http://www.amazon.com/ShaderX6-Rendering-Techniques-Wolfgang-Engel/dp/1584505443" target="_blank">ShaderX6 book</a>:</p>
<div align="center">
<table border="1" cellspacing="0" cellpadding="2" width="400" align="center">
<tbody>
<tr>
<td valign="top" width="400">
<p align="left"><b>“Maxime Beaudoin</b><br />Maxime Beaudoin is a 3D graphics programmer at Ubisoft Quebec studio, Canada. He started to learn real-time 3D graphics by himself in 2001 and received his B.S. degree in computer science in 2003. Since 2005, he has been working for Ubisoft during the day and developing his own next-gen game engine with some friends during his free time.”</p>
</td>
</tr>
</tbody>
</table>
</div>
<p align="left"> </p>
<p align="left">Unfortunately, I don’t have a copy of ShaderX6 book nor I can download one from the internet. But I found a ppt presentation that he made for GDC 2008.</p>
<p align="left"><a title="http://www.coretechniques.info/2008/Material.zip" href="http://www.coretechniques.info/2008/Material.zip">http://www.coretechniques.info/2008/Material.zip</a></p>
<p>P.S. Something I found really2x cool.</p>
<h5>Back of the Mike (1938)</h5>
<p>Back of the Mike is a short film done in 1937 for the Chevrolet Motor Company depicting the behind the scenes look at the making of a Western radio show. This documentary shows the various ways sound effects are created during the broadcast. Rain was created by pouring sand over a spinning potters wheel which sent it down a metal funnel onto a microphone which was covered by a paper bag. Fire was created by wadding up plastic wrap close to the mike.
<p>16.1 MB&#8217;s. Video will play in the flash player below.</p>
<div style="display:inline;float:none;margin:0;padding:0;">
<p><a href="http://www.oldradioworld.com/media/Back_of_the_Mic_1938.swf">http://www.oldradioworld.com/media/Back_of_the_Mic_1938.swf</a></p>
</div>
<p><a href="http://www.oldradioworld.com/Back_of_the_Mike.php">http://www.oldradioworld.com/Back_of_the_Mike.php</a>
<p> </p>
<p>Cheers!<br />- CodeSushi</p>
</p></div>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/game-programming/'>Game Programming</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=108&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2010/05/08/a-flexible-material-system-in-design-by-maxime-beaudoin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>
	</item>
		<item>
		<title>ResourcePool design.. AND ResourcePoolItem AND StoragePool AND Storage…</title>
		<link>http://mrcodesushi.wordpress.com/2010/04/27/resourcepool-design-and-resourcepoolitem-and-storagepool-and-storage%e2%80%a6/</link>
		<comments>http://mrcodesushi.wordpress.com/2010/04/27/resourcepool-design-and-resourcepoolitem-and-storagepool-and-storage%e2%80%a6/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 00:55:00 +0000</pubDate>
		<dc:creator>MrCodeSushi</dc:creator>
				<category><![CDATA[Game Programming]]></category>

		<guid isPermaLink="false">http://mrcodesushi.wordpress.com/2010/04/27/resourcepool-design-and-resourcepoolitem-and-storagepool-and-storage%e2%80%a6</guid>
		<description><![CDATA[Man it’s been a while since the last time I’ve worked on my personal project. Been busy with work lately. Anyway, back to my resource manager. I’ve been really productive in my project for the past 2 days and I think I have got a lot of things done. But I’m still far from finishing <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=109&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!4483403BEB19180F!343" class="bvMsg">
<p>Man it’s been a while since the last time I’ve worked on my personal project. Been busy with work lately. Anyway, back to my resource manager. </p>
<p>I’ve been really productive in my project for the past 2 days and I think I have got a lot of things done. But I’m still far from finishing my resource manager. I’ve finished implementing all the base component of my resource manager and what is left is to actually work on THE Resource Manager itself. Although before I present the design, I would like to give credit to this one author who really helped me in designing my manager. I need to give credit where credit is due! His name is <strong>Greg Snook</strong>. I don’t have direct affiliation with him but I stumbled upon his <a href="http://www.amazon.com/Real-Time-Terrain-Engines-DirectX-Development/dp/1584502045/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1272330107&amp;sr=8-1" target="_blank">book</a> in my book collection recently, and his engine presented in his book contains A LOT of invaluable treasures! One of them is the design of the resource manager and while I was in the process of designing mine, I found out that my general design somewhat aligns with his. So I decided to use his as a general guideline instead.</p>
<p>Below I present an insanely tangled UML Class Diagram on how the sub-components are designed. The base storage class that holds the resource is StorageData. This acts like a static vector class. Another class is derived from it called StoragePool where it is composed of a list of StorageData. Thus StoragePool acts as a dynamic container that dynamically extends the list if StoragePool gets pool and vice-versa. Since StoragePool is a generic Storage Pool class, I’ve developed another class the simply extends and formalized the methods for resource handling and using the StoragePool(composite) class.</p>
<p>Ultimately, the StoragePool class will be used the ResourceManager which I haven’t finished working yet. For now I present the UML diagram and the links for the source code.</p>
<p align="center">Enjoy! <a href="http://mrcodesushi.files.wordpress.com/2010/04/resourcepoolclassdiagramrel5b115d.jpg" rel="WLPP"><img style="border-bottom:0;border-left:0;display:block;float:none;margin-left:auto;border-top:0;margin-right:auto;border-right:0;" title="ResourcePoolClassDiagramRel" border="0" alt="ResourcePoolClassDiagramRel" src="http://mrcodesushi.files.wordpress.com/2010/04/resourcepoolclassdiagramrel5b115d.jpg?w=923&#038;h=1695" width="923" height="1695" /></a></p>
<p>StoragePool.h: <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/StoragePool.h">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/StoragePool.h</a><br />ResourcePool.h: <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/ResourcePool.h">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/ResourcePool.h</a><br />ResourcePool.cpp: <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/ResourcePool.cpp">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/ResourcePool.cpp</a><br />ResourcePoolItem.h: <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/ResourcePoolItem.h">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Include/ResourcePoolItem.h</a><br />ResourcePoolItem.cpp: <a href="http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/ResourcePoolItem.cpp">http://codaset.com/codesushi/pulse-tec/source/master/blob/Source/Engine/Source/ResourcePoolItem.cpp</a></p>
</p></div>
<br />Filed under: <a href='http://mrcodesushi.wordpress.com/category/game-development/programming/game-programming/'>Game Programming</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrcodesushi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrcodesushi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrcodesushi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrcodesushi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrcodesushi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrcodesushi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrcodesushi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrcodesushi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrcodesushi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrcodesushi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrcodesushi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrcodesushi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrcodesushi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrcodesushi.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrcodesushi.wordpress.com&amp;blog=15076660&amp;post=109&amp;subd=mrcodesushi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrcodesushi.wordpress.com/2010/04/27/resourcepool-design-and-resourcepoolitem-and-storagepool-and-storage%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0c62cfb11d7ead2b59edc75b24e46e52?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mrcodesushi</media:title>
		</media:content>

		<media:content url="http://mrcodesushi.files.wordpress.com/2010/04/resourcepoolclassdiagramrel5b115d.jpg?w=163" medium="image">
			<media:title type="html">ResourcePoolClassDiagramRel</media:title>
		</media:content>
	</item>
	</channel>
</rss>
