<?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: Model View Controller (MVC) Game Engine</title>
	<atom:link href="http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/</link>
	<description>Pragmatic Thoughts On Game Development</description>
	<lastBuildDate>Fri, 27 Jan 2012 00:53:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: andrew</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-24379</link>
		<dc:creator>andrew</dc:creator>
		<pubDate>Thu, 15 Dec 2011 07:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-24379</guid>
		<description>Hi. Can you post some example on how to implement MVC in game. What should be in model, view, controller?. Now I&#039;m trying to implement it, but it goes not good.</description>
		<content:encoded><![CDATA[<p>Hi. Can you post some example on how to implement MVC in game. What should be in model, view, controller?. Now I&#8217;m trying to implement it, but it goes not good.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dev</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-21341</link>
		<dc:creator>dev</dc:creator>
		<pubDate>Mon, 25 Jul 2011 14:45:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-21341</guid>
		<description>I would like to look at your mvc solution. I use mvc 3 for asp.net but never have for xna. Regards</description>
		<content:encoded><![CDATA[<p>I would like to look at your mvc solution. I use mvc 3 for asp.net but never have for xna. Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: owen</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-13739</link>
		<dc:creator>owen</dc:creator>
		<pubDate>Tue, 15 Mar 2011 00:20:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-13739</guid>
		<description>MVC patterns will only work on the GUI level.  It will never work in a real world system because real world systems interact with each other as they meet NOT based on their type.  The only way it would work is if every object had its own MVC partition.</description>
		<content:encoded><![CDATA[<p>MVC patterns will only work on the GUI level.  It will never work in a real world system because real world systems interact with each other as they meet NOT based on their type.  The only way it would work is if every object had its own MVC partition.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timmy</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-2940</link>
		<dc:creator>Timmy</dc:creator>
		<pubDate>Sun, 29 Aug 2010 02:08:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-2940</guid>
		<description>Woops, didn&#039;t click notify of updates the first time.</description>
		<content:encoded><![CDATA[<p>Woops, didn&#8217;t click notify of updates the first time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timmy</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-2939</link>
		<dc:creator>Timmy</dc:creator>
		<pubDate>Sun, 29 Aug 2010 02:06:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-2939</guid>
		<description>Doolwind - I&#039;m not sure you answered the first question from guptan.  You named design patterns (singleton, factory, proxy) that are not necessarily exclusive of any architectural pattern, including MVC.  I&#039;m also wondering the most common architectural patterns.  Pat Scott did name one (domain-driven).</description>
		<content:encoded><![CDATA[<p>Doolwind &#8211; I&#8217;m not sure you answered the first question from guptan.  You named design patterns (singleton, factory, proxy) that are not necessarily exclusive of any architectural pattern, including MVC.  I&#8217;m also wondering the most common architectural patterns.  Pat Scott did name one (domain-driven).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fanatical Pragmatism in Software Development &#8211; Doolwind&#039;s Game Coding Blog</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-1177</link>
		<dc:creator>Fanatical Pragmatism in Software Development &#8211; Doolwind&#039;s Game Coding Blog</dc:creator>
		<pubDate>Mon, 21 Jun 2010 23:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-1177</guid>
		<description>[...] your concerns.  A big part of why MVC works so well for a game engine is that it keeps the obvious concerns (e.g. gameplay vs. rendering) [...]</description>
		<content:encoded><![CDATA[<p>[...] your concerns.  A big part of why MVC works so well for a game engine is that it keeps the obvious concerns (e.g. gameplay vs. rendering) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alluvian</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-721</link>
		<dc:creator>Alluvian</dc:creator>
		<pubDate>Thu, 22 Apr 2010 20:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-721</guid>
		<description>Late to the party!

I found this to be a very interesting read:
http://www.gamasutra.com/features/20050414/rouwe_01.shtml

It is Shell Shock, &#039;nam 67 (an medal of honor type fps) made with MVC.

They touch on animation as a sticky point for them as well, because for some games the animation is NOT just a view concern, but it can change the model as well due to shifting bounding boxes or detailed collision requirements.

I think in most MVC use cases there are going to be some fuzzy areas where you have to compromise the principles due to the harsh reality, heh.

I have not done ANY MVC work yet myself, but I am drawing out different UML designs right now to see what structure will work best for me.

I can already see that the division will be the only thing that will keep me sane as it is a multiplayer game with a polling engine where the game pieces could be local users, simple ai, or remote players.  Being able to manage the difference by just making multiple controllers where needed is going to be very nice.

My first go at this I had a lot of repeated code for local and remote player objects. Now the difference is just what the controller does with the input which can either be polling responses or clicks being forwarded from the view.  I have never been happier to throw old code away, heh.</description>
		<content:encoded><![CDATA[<p>Late to the party!</p>
<p>I found this to be a very interesting read:<br />
<a href="http://www.gamasutra.com/features/20050414/rouwe_01.shtml" rel="nofollow">http://www.gamasutra.com/features/20050414/rouwe_01.shtml</a></p>
<p>It is Shell Shock, &#8216;nam 67 (an medal of honor type fps) made with MVC.</p>
<p>They touch on animation as a sticky point for them as well, because for some games the animation is NOT just a view concern, but it can change the model as well due to shifting bounding boxes or detailed collision requirements.</p>
<p>I think in most MVC use cases there are going to be some fuzzy areas where you have to compromise the principles due to the harsh reality, heh.</p>
<p>I have not done ANY MVC work yet myself, but I am drawing out different UML designs right now to see what structure will work best for me.</p>
<p>I can already see that the division will be the only thing that will keep me sane as it is a multiplayer game with a polling engine where the game pieces could be local users, simple ai, or remote players.  Being able to manage the difference by just making multiple controllers where needed is going to be very nice.</p>
<p>My first go at this I had a lot of repeated code for local and remote player objects. Now the difference is just what the controller does with the input which can either be polling responses or clicks being forwarded from the view.  I have never been happier to throw old code away, heh.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ezequiel</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-720</link>
		<dc:creator>Ezequiel</dc:creator>
		<pubDate>Sat, 13 Feb 2010 14:37:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-720</guid>
		<description>Hi, good to know I&#039;m not alone in this. I&#039;m programming an MVC game engine using Python for prototyping. I wrote some posts with specific pseudocode in my blog, but I&#039;m afaid it&#039;s in spanish.

One problem I face is that there is some natural encapsulation of objects that need to be scattered through M, V an C. For example, it is natural to have a spaseship as an object, however, the spaceship has a model (it is part of the physics engine), a view (a mesh or sprite that could be view dependant) and a controller (in my engine some  AIs are part of the controller since they can replace users easily).

How do you handle this problem in your game engine? Do you know of an open source example I can have a look at?</description>
		<content:encoded><![CDATA[<p>Hi, good to know I&#8217;m not alone in this. I&#8217;m programming an MVC game engine using Python for prototyping. I wrote some posts with specific pseudocode in my blog, but I&#8217;m afaid it&#8217;s in spanish.</p>
<p>One problem I face is that there is some natural encapsulation of objects that need to be scattered through M, V an C. For example, it is natural to have a spaseship as an object, however, the spaceship has a model (it is part of the physics engine), a view (a mesh or sprite that could be view dependant) and a controller (in my engine some  AIs are part of the controller since they can replace users easily).</p>
<p>How do you handle this problem in your game engine? Do you know of an open source example I can have a look at?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat Scott</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-719</link>
		<dc:creator>Pat Scott</dc:creator>
		<pubDate>Wed, 20 Jan 2010 16:21:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-719</guid>
		<description>Coming from an enterprise applications background, especially web, I have a lot of experience in MVC. I am just beginning game programming, and because of my background, the first thing I considered is the architecture.

I&#039;ve looked at the game/component approach, and I agree that it doesn&#039;t seem like quite enough.

Though, I also don&#039;t think MVC by itself is enough either..
I think adding more abstraction to the architecture could be more beneficial. I think a domain-driven design approach to game programming, with a more complicated/abstracted architecture would lend itself very well to game programming.

My proposed architecture is something similiar to the following (based on MVC and domain driven design)

Application Layer
- Contains application.interfaces, and application.services
all services use interfaces, generally hold logic for animation, and things that the models/entities have to do

Domain Layer
- Domain.Model contains physical entities
- Domain.Repositories contains repository interfaces for accessing Models from the db

Infrastructure layer
- infrastructure.orm if you want an ORM, put it here (ex. EF)
- infrastructure.repositories - concrete implementation of interfaces from domain.repositories

IOC layer
- Inversion of control if want to use it (would be interesting to see how it works with game dev.) this architecture lends itself to using IOC containers and dependancy injection

Test Layer
- unit tests

Controllers Layer
- access the models, pass data to ui layer (views)

UI Layer
- UI stuff


Again, I am just starting game dev, and I haven&#039;t tried any of this in the context of game dev yet, however I plan on trying it. Anyone have experience with anything similar and can offer some feedback?</description>
		<content:encoded><![CDATA[<p>Coming from an enterprise applications background, especially web, I have a lot of experience in MVC. I am just beginning game programming, and because of my background, the first thing I considered is the architecture.</p>
<p>I&#8217;ve looked at the game/component approach, and I agree that it doesn&#8217;t seem like quite enough.</p>
<p>Though, I also don&#8217;t think MVC by itself is enough either..<br />
I think adding more abstraction to the architecture could be more beneficial. I think a domain-driven design approach to game programming, with a more complicated/abstracted architecture would lend itself very well to game programming.</p>
<p>My proposed architecture is something similiar to the following (based on MVC and domain driven design)</p>
<p>Application Layer<br />
- Contains application.interfaces, and application.services<br />
all services use interfaces, generally hold logic for animation, and things that the models/entities have to do</p>
<p>Domain Layer<br />
- Domain.Model contains physical entities<br />
- Domain.Repositories contains repository interfaces for accessing Models from the db</p>
<p>Infrastructure layer<br />
- infrastructure.orm if you want an ORM, put it here (ex. EF)<br />
- infrastructure.repositories &#8211; concrete implementation of interfaces from domain.repositories</p>
<p>IOC layer<br />
- Inversion of control if want to use it (would be interesting to see how it works with game dev.) this architecture lends itself to using IOC containers and dependancy injection</p>
<p>Test Layer<br />
- unit tests</p>
<p>Controllers Layer<br />
- access the models, pass data to ui layer (views)</p>
<p>UI Layer<br />
- UI stuff</p>
<p>Again, I am just starting game dev, and I haven&#8217;t tried any of this in the context of game dev yet, however I plan on trying it. Anyone have experience with anything similar and can offer some feedback?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doolwind</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/comment-page-1/#comment-718</link>
		<dc:creator>Doolwind</dc:creator>
		<pubDate>Thu, 03 Dec 2009 22:30:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186#comment-718</guid>
		<description>Cygon-

I&#039;ll give you a brief overview of how my MVC engine works:

&lt;b&gt;Controller&lt;/b&gt;
This handles the input and flow of the game logic.  This is akin to the states your game can be in.  My primary two controllers are main menu controller and an in-game controller.

They are responsible for converting input into something the game world (model) can understand.  Eg &quot;Create unit x at base y&quot;.

&lt;b&gt;Model&lt;/b&gt;
This handles all game logic.  It has nothing to do with input, rendering or networking.  It is a pure view into the game world.  Designers need only worry about what&#039;s in the model.

&lt;b&gt;View&lt;/b&gt;
The view handles rendering of the model.  Unlike what you said, the view DOES know about the model.  The has read-only access to the model.  This model can be anything.  For my main menu it&#039;s a list of UI controls the controller has built.  For the in game view, it&#039;s the game world.

To keep things clean and consistent I use Interfaces in most places.  Rather than &quot;reusing views in different controllers&quot; what is more important is &quot;having multiple views on a single controller&quot;.  For example there might be a 2D and a 3D view of the game world.</description>
		<content:encoded><![CDATA[<p>Cygon-</p>
<p>I&#8217;ll give you a brief overview of how my MVC engine works:</p>
<p><b>Controller</b><br />
This handles the input and flow of the game logic.  This is akin to the states your game can be in.  My primary two controllers are main menu controller and an in-game controller.</p>
<p>They are responsible for converting input into something the game world (model) can understand.  Eg &#8220;Create unit x at base y&#8221;.</p>
<p><b>Model</b><br />
This handles all game logic.  It has nothing to do with input, rendering or networking.  It is a pure view into the game world.  Designers need only worry about what&#8217;s in the model.</p>
<p><b>View</b><br />
The view handles rendering of the model.  Unlike what you said, the view DOES know about the model.  The has read-only access to the model.  This model can be anything.  For my main menu it&#8217;s a list of UI controls the controller has built.  For the in game view, it&#8217;s the game world.</p>
<p>To keep things clean and consistent I use Interfaces in most places.  Rather than &#8220;reusing views in different controllers&#8221; what is more important is &#8220;having multiple views on a single controller&#8221;.  For example there might be a 2D and a 3D view of the game world.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

