<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Factory</title>
	<atom:link href="http://blog.vortixgames.com/factory/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.vortixgames.com/factory</link>
	<description></description>
	<lastBuildDate>Tue, 10 Aug 2010 02:49:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: The Monday Roast: Fresh Flash Related Links - 9th March 2009 &#124; Drastika</title>
		<link>http://blog.vortixgames.com/factory/comment-page-1#comment-43</link>
		<dc:creator>The Monday Roast: Fresh Flash Related Links - 9th March 2009 &#124; Drastika</dc:creator>
		<pubDate>Tue, 10 Mar 2009 00:13:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vortixgames.com/?p=238#comment-43</guid>
		<description>[...] The Factory Design Pattern [...]</description>
		<content:encoded><![CDATA[<p>[...] The Factory Design Pattern [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vlad</title>
		<link>http://blog.vortixgames.com/factory/comment-page-1#comment-41</link>
		<dc:creator>Vlad</dc:creator>
		<pubDate>Mon, 09 Mar 2009 10:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vortixgames.com/?p=238#comment-41</guid>
		<description>That&#039;s a very nice implementation and the way I would like to do it, but I would have to build a table for each game (I think) so I think it would depend on the actual game and objects I would need to implement. The game we are producing has all token data on a XML, maybe I could go from there.

To be honest, I gave it a second thought about writting this post because I didn&#039;t have a factory interface, but since the theory of the pattern itself is so useful I simply skip to implementing either a simple function or a full class to get it done.

Factory as a simple method was used in Balloon Bliss and Atomik Kaos for instance, since all we needed was to say what the type of token and the game logic handled the rest.

Factory as a class was used in Tech Wars since we had to deal with waves of very different enemies.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a very nice implementation and the way I would like to do it, but I would have to build a table for each game (I think) so I think it would depend on the actual game and objects I would need to implement. The game we are producing has all token data on a XML, maybe I could go from there.</p>
<p>To be honest, I gave it a second thought about writting this post because I didn&#8217;t have a factory interface, but since the theory of the pattern itself is so useful I simply skip to implementing either a simple function or a full class to get it done.</p>
<p>Factory as a simple method was used in Balloon Bliss and Atomik Kaos for instance, since all we needed was to say what the type of token and the game logic handled the rest.</p>
<p>Factory as a class was used in Tech Wars since we had to deal with waves of very different enemies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pedro Santos</title>
		<link>http://blog.vortixgames.com/factory/comment-page-1#comment-40</link>
		<dc:creator>Pedro Santos</dc:creator>
		<pubDate>Mon, 09 Mar 2009 09:25:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vortixgames.com/?p=238#comment-40</guid>
		<description>The factory pattern is really a must. We use it so much that we made a reusable component just for that pattern. Because now you use the factory, but you&#039;ll have to code that structure every time you want it.

We did something like:
» Every factory class implements IFactory (with a create method)
» We use reflection (ability to fetch data about components) to auto build factories

I don&#039;t know AS3, but as it is a high level programming language, it should support these kind of operations. Our algo is:

We have a container with an hastable that maps keys to factories. On init, we go trough all classes on the package and check if they inherit from our base factory. If they do, we register each one on the container. And that&#039;s it. Now we&#039;re able to do:

FactoryContainer container = FactoryContainer.BuildFrom( BaseWeaponType );
IWeaponType type = container.Create(data);
...

And don&#039;t have to create a factory time and maintain it every time.</description>
		<content:encoded><![CDATA[<p>The factory pattern is really a must. We use it so much that we made a reusable component just for that pattern. Because now you use the factory, but you&#8217;ll have to code that structure every time you want it.</p>
<p>We did something like:<br />
» Every factory class implements IFactory (with a create method)<br />
» We use reflection (ability to fetch data about components) to auto build factories</p>
<p>I don&#8217;t know AS3, but as it is a high level programming language, it should support these kind of operations. Our algo is:</p>
<p>We have a container with an hastable that maps keys to factories. On init, we go trough all classes on the package and check if they inherit from our base factory. If they do, we register each one on the container. And that&#8217;s it. Now we&#8217;re able to do:</p>
<p>FactoryContainer container = FactoryContainer.BuildFrom( BaseWeaponType );<br />
IWeaponType type = container.Create(data);<br />
&#8230;</p>
<p>And don&#8217;t have to create a factory time and maintain it every time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JD557</title>
		<link>http://blog.vortixgames.com/factory/comment-page-1#comment-39</link>
		<dc:creator>JD557</dc:creator>
		<pubDate>Mon, 09 Mar 2009 07:29:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.vortixgames.com/?p=238#comment-39</guid>
		<description>Nice post.
I&#039;ll try to do that in future projects.</description>
		<content:encoded><![CDATA[<p>Nice post.<br />
I&#8217;ll try to do that in future projects.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
