<?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: MVC, my friend</title>
	<atom:link href="http://www.brainfold.org/blog/2007/12/15/mvc-my-friend/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brainfold.org/blog/2007/12/15/mvc-my-friend/</link>
	<description>On Python, game development and everything</description>
	<lastBuildDate>Fri, 21 May 2010 13:34:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Jussi Lepistö</title>
		<link>http://www.brainfold.org/blog/2007/12/15/mvc-my-friend/comment-page-1/#comment-142</link>
		<dc:creator>Jussi Lepistö</dc:creator>
		<pubDate>Tue, 18 Dec 2007 11:51:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfold.org/blog/2007/12/15/mvc-my-friend/#comment-142</guid>
		<description>Thanks for the long comment! At least this somewhat reinforces my faith in this design actually working in practice. The major difference between our designs seems to be that in yours, communication is handled by the entity, and in mine, by components. I&#039;ll post more details and experiences on my design once I&#039;ve implemented and actually used it. :)</description>
		<content:encoded><![CDATA[<p>Thanks for the long comment! At least this somewhat reinforces my faith in this design actually working in practice. The major difference between our designs seems to be that in yours, communication is handled by the entity, and in mine, by components. I&#8217;ll post more details and experiences on my design once I&#8217;ve implemented and actually used it. <img src='http://www.brainfold.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver Charles</title>
		<link>http://www.brainfold.org/blog/2007/12/15/mvc-my-friend/comment-page-1/#comment-103</link>
		<dc:creator>Oliver Charles</dc:creator>
		<pubDate>Sat, 15 Dec 2007 23:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainfold.org/blog/2007/12/15/mvc-my-friend/#comment-103</guid>
		<description>An interesting approach, I&#039;ve took a somewhat similar route when I started my little Asteroids engine. Models were purely abstract data, left to be interpreted by systems - which would do this interpretation through use of the visitor pattern. Worked reasonably well, but I just don&#039;t like the Visitor pattern - it always feels like you have one class doing a TON of work, and I don&#039;t like that...

However, after refactoring my component system heavily, I seem to have ended up with a somewhat MVC approach again :) Here&#039;s what it looks like (hopefully it&#039;s followable):

My current system, if it helps to hear what I&#039;m doing is this (class names are /LikeThis/). The game runs with an /Engine/ and a /World/. Objects in the game are classified as /Entity/ derivatives which are built up of various /BaseComponent/ derivatives (like your features). The /BaseComponent/s are created and managed through a class that implements /ISubsystem/. These subsystems loop over all of there components, updating them accordingly (for example, the moveable component updates the Position attribute, based on Velocity).

Here, the subsystem acts like a controller, with the components as the model.  Now the next step is getting stuff on the screen. For this I use superpig&#039;s Kernel model, which is the engine. I bind the RenderingTask to the RenderingSubsystem, and insert the Task into the engine. By binding the rendering task to the RenderingSubsystem, when GeometryComponents are created, the subsystem is able to refer to the rendering subsystems resource manager, and request vertex buffers (I&#039;ve abstracted the graphics api into RenderingTask derivatives).

Communication is also handled by events (which I believe are synonymous to signals, just event is the C# term), but maybe in a slightly different way to yours. When I create my spaceship entity, the entity hooks into any component events, and routes these as it sees necessary. So the ShipEntity might hook into it&#039;s Destructible component&#039;s Destroyed event and, and then cause the creation of a particle emitter component.

I know this is a bit of a long post (hey, I don&#039;t have my own blog :P) but I just wanted to get my system out now, because now that I&#039;ve actually been using it, it really is working nicely - and I think we are definitely on the right lines about pushing this whole component system idea - it is the way forward!

Hope this is in someway helpful :)</description>
		<content:encoded><![CDATA[<p>An interesting approach, I&#8217;ve took a somewhat similar route when I started my little Asteroids engine. Models were purely abstract data, left to be interpreted by systems &#8211; which would do this interpretation through use of the visitor pattern. Worked reasonably well, but I just don&#8217;t like the Visitor pattern &#8211; it always feels like you have one class doing a TON of work, and I don&#8217;t like that&#8230;</p>
<p>However, after refactoring my component system heavily, I seem to have ended up with a somewhat MVC approach again <img src='http://www.brainfold.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here&#8217;s what it looks like (hopefully it&#8217;s followable):</p>
<p>My current system, if it helps to hear what I&#8217;m doing is this (class names are /LikeThis/). The game runs with an /Engine/ and a /World/. Objects in the game are classified as /Entity/ derivatives which are built up of various /BaseComponent/ derivatives (like your features). The /BaseComponent/s are created and managed through a class that implements /ISubsystem/. These subsystems loop over all of there components, updating them accordingly (for example, the moveable component updates the Position attribute, based on Velocity).</p>
<p>Here, the subsystem acts like a controller, with the components as the model.  Now the next step is getting stuff on the screen. For this I use superpig&#8217;s Kernel model, which is the engine. I bind the RenderingTask to the RenderingSubsystem, and insert the Task into the engine. By binding the rendering task to the RenderingSubsystem, when GeometryComponents are created, the subsystem is able to refer to the rendering subsystems resource manager, and request vertex buffers (I&#8217;ve abstracted the graphics api into RenderingTask derivatives).</p>
<p>Communication is also handled by events (which I believe are synonymous to signals, just event is the C# term), but maybe in a slightly different way to yours. When I create my spaceship entity, the entity hooks into any component events, and routes these as it sees necessary. So the ShipEntity might hook into it&#8217;s Destructible component&#8217;s Destroyed event and, and then cause the creation of a particle emitter component.</p>
<p>I know this is a bit of a long post (hey, I don&#8217;t have my own blog <img src='http://www.brainfold.org/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ) but I just wanted to get my system out now, because now that I&#8217;ve actually been using it, it really is working nicely &#8211; and I think we are definitely on the right lines about pushing this whole component system idea &#8211; it is the way forward!</p>
<p>Hope this is in someway helpful <img src='http://www.brainfold.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
