<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">

<channel>
	<title>Andy J Design</title>
	
	<link>http://www.andyjdesign.com</link>
	<description>Game Development, Design, Programming, and Marketing</description>
	<lastBuildDate>Tue, 26 Jan 2010 22:33:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/andyjdesign" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="andyjdesign" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-nc-nd/2.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><item>
		<title>Common Pitfalls in Your Game Loop</title>
		<link>http://www.andyjdesign.com/game-programming/common-pitfalls-in-your-game-loop/</link>
		<comments>http://www.andyjdesign.com/game-programming/common-pitfalls-in-your-game-loop/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 19:00:10 +0000</pubDate>
		<dc:creator>infamouse</dc:creator>
				<category><![CDATA[Game Programming]]></category>

		<guid isPermaLink="false">http://www.andyjdesign.com/?p=115</guid>
		<description><![CDATA[Putting actor logic in your game loop
It&#8217;s important to remember that we put things into objects for a reason.  One of the greatest reasons is to keep the logic in our code cleanly separated.  If you want the enemies to act one way, you change the code in the enemy object.  At a later point <a href="http://www.andyjdesign.com/game-programming/common-pitfalls-in-your-game-loop/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<h2>Putting actor logic in your game loop</h2>
<p>It&#8217;s important to remember that we put things into objects for a reason.  One of the greatest reasons is to keep the logic in our code cleanly separated.  If you want the enemies to act one way, you change the code in the enemy object.  At a later point if you change your mind you simply pop some new logic into the object.<span id="more-115"></span></p>
<p>When you muddy the water by putting logic in the game loop it becomes harder and harder to work on your project.  It also makes it difficult for other team members to logically find your code.  Take a look at the example below:</p>
<p><pre><code>
update(time) {
foreach ( actor in game ) {
actor.update(time);
if(actor.type == &quot;enemy&quot;) actor.x += 5;
if(actor.type == &quot;player&quot;) Player(actor).score ++;
}
}
</code></pre></p>
<p>You&#8217;ll notice that for each &#8220;enemy&#8221; it will do an arbitrary movement of 5 pixels on the x axis.  What if you want to move it left 5 pixels instead?  Do you go to the actor object?  It gets harder and harder to find this logic.  The best game loops look like this:</p>
<p><pre><code>
update(time) {
foreach ( actor in game ) {
actor.update(time);
}
}
</code></pre></p>
<p>Later you&#8217;d see:</p>
<p><pre><code>
Enemy extends Actor {
update(time) {
x += 5;
}
}</code></pre></p>
<p><code> </code></p>
<p><pre><code>Player extends Actor {
update(time) {
score ++;
}
}
</code></pre></p>
<p>Nice and tidy!</p>
<h2>Not timing things based on elapsed time</h2>
<p>You&#8217;ll notice something above, as well.  The update function is called on the game loop each frame and it&#8217;s passed the time elapsed.  When you do anything animation or time-based you have to take that timespan into account.  A player who gets one point every frame wont be very happy when his friends&#8217; computer is playing at 100 frames per second and his at only 20.</p>



Share:


	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fcommon-pitfalls-in-your-game-loop%2F&amp;t=Common%20Pitfalls%20in%20Your%20Game%20Loop" title="Facebook"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Common%20Pitfalls%20in%20Your%20Game%20Loop&amp;body=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fcommon-pitfalls-in-your-game-loop%2F" title="email"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Common%20Pitfalls%20in%20Your%20Game%20Loop%20-%20http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fcommon-pitfalls-in-your-game-loop%2F" title="Twitter"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fcommon-pitfalls-in-your-game-loop%2F&amp;t=Common%20Pitfalls%20in%20Your%20Game%20Loop" title="MySpace"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fcommon-pitfalls-in-your-game-loop%2F&amp;title=Common%20Pitfalls%20in%20Your%20Game%20Loop&amp;annotation=Putting%20actor%20logic%20in%20your%20game%20loop%0D%0AIt%27s%20important%20to%20remember%20that%20we%20put%20things%20into%20objects%20for%20a%20reason.%20%C2%A0One%20of%20the%20greatest%20reasons%20is%20to%20keep%20the%20logic%20in%20our%20code%20cleanly%20separated.%20%C2%A0If%20you%20want%20the%20enemies%20to%20act%20one%20way%2C%20you%20change%20the" title="Google Bookmarks"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fcommon-pitfalls-in-your-game-loop%2F&amp;title=Common%20Pitfalls%20in%20Your%20Game%20Loop" title="Live"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fcommon-pitfalls-in-your-game-loop%2F&amp;title=Common%20Pitfalls%20in%20Your%20Game%20Loop&amp;bodytext=Putting%20actor%20logic%20in%20your%20game%20loop%0D%0AIt%27s%20important%20to%20remember%20that%20we%20put%20things%20into%20objects%20for%20a%20reason.%20%C2%A0One%20of%20the%20greatest%20reasons%20is%20to%20keep%20the%20logic%20in%20our%20code%20cleanly%20separated.%20%C2%A0If%20you%20want%20the%20enemies%20to%20act%20one%20way%2C%20you%20change%20the" title="Digg"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fcommon-pitfalls-in-your-game-loop%2F" title="Technorati"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fcommon-pitfalls-in-your-game-loop%2F&amp;title=Common%20Pitfalls%20in%20Your%20Game%20Loop&amp;source=Andy+J+Design+Game+Development%2C+Design%2C+Programming%2C+and+Marketing&amp;summary=Putting%20actor%20logic%20in%20your%20game%20loop%0D%0AIt%27s%20important%20to%20remember%20that%20we%20put%20things%20into%20objects%20for%20a%20reason.%20%C2%A0One%20of%20the%20greatest%20reasons%20is%20to%20keep%20the%20logic%20in%20our%20code%20cleanly%20separated.%20%C2%A0If%20you%20want%20the%20enemies%20to%20act%20one%20way%2C%20you%20change%20the" title="LinkedIn"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.andyjdesign.com/game-programming/common-pitfalls-in-your-game-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiplayer Game Design: Server-Side Models and Distributed Models</title>
		<link>http://www.andyjdesign.com/game-programming/multiplayer-game-design-server-side-models-and-distributed-models/</link>
		<comments>http://www.andyjdesign.com/game-programming/multiplayer-game-design-server-side-models-and-distributed-models/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 03:00:16 +0000</pubDate>
		<dc:creator>infamouse</dc:creator>
				<category><![CDATA[Game Programming]]></category>

		<guid isPermaLink="false">http://www.andyjdesign.com/?p=109</guid>
		<description><![CDATA[I recently posted about using the MVC pattern in games and provided a very quick and dirty pseudocode model of our hero in MVC.  It showed a nice separation of concerns and had the display removed from the logic of the game.  Shortly after I was prompted by one of my readers about using the Model <a href="http://www.andyjdesign.com/game-programming/multiplayer-game-design-server-side-models-and-distributed-models/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I recently posted about using the <a title="Read more about the Model-View-Controller's use in games" href="http://www.andyjdesign.com/web-development/game-programming-with-patterns-model-view-controller/">MVC pattern in games</a> and provided a very quick and dirty pseudocode model of our hero in MVC.  It showed a nice separation of concerns and had the display removed from the logic of the game.  Shortly after I was prompted by one of my readers about using the Model View Controller pattern distributed over a multiplayer environment.  There are a lot of opinions out there and I&#8217;ll cover a few here.  I&#8217;m curious if you all have feedback on these methods and their use in browser-based games specifically.<span id="more-109"></span>The simplest arrangement is a turn-based game that takes input from one user at a time and then displays the result to both players.  Thankfully if we put our pattern-based code to use we can alleviate a lot of the client-server traffic in a simple client -server setup.  (For this post I&#8217;m going to gloss over the lobby and game initiation part of the process)</p>
<p>We&#8217;ll start with two simple clients.  These clients exhibit the characteristics of a simple View and Controller pattern.  They have an array of game pieces on them and some simple inputs (lets say buttons).  What these are responsible for is displaying the current game state and notifying the server when input has been given.</p>
<p>The game state is Model and is handled on the server separately from both clients.  Each time one of the players takes action it&#8217;s sent to the server and the server updates the model appropriately.  Once the model is updated it posts this update to the clients and they are responsible for updating the view.</p>
<p>We&#8217;ll use a simple game here: player 1 selects their favorite color from a set of three and player 2 selects which one they believe the first player has selected.  Our model stores two values:</p>
<ul>
<li>Player 1&#8217;s Color Selection</li>
<li>Player 2&#8217;s Color Selection</li>
</ul>
<p>Our view displays one of 2 states:</p>
<ul>
<li>Select a color</li>
<li>Display result</li>
</ul>
<p>And our controller is responsible for one action:</p>
<ul>
<li>Handle click on displayed color</li>
</ul>
<p>So the basic gameplay goes like this:</p>
<ol>
<li>The game model is initialized
<ol>
<li>Player 1&#8217;s Color = null</li>
<li>Player 2&#8217;s Color = null</li>
</ol>
</li>
<li>The model is sent to both clients (both colors null)</li>
<li>The client&#8217;s views respond by showing the color selection buttons (&#8220;red&#8221;, &#8220;green&#8221;, &#8220;blue&#8221;)</li>
<li>Player 1 clicks &#8220;red&#8221;</li>
<li>The controller sends this input directly to the server (holding the model)</li>
<li>The server updates the model (Player 1&#8217;s Color = &#8220;red&#8221;)</li>
<li>The new model is posted to the clients (Player 1&#8217;s Color = &#8220;red&#8221;, Player 2&#8217;s Color = null)</li>
<li>The views now reflect new information
<ol>
<li>Player 1 shows &#8220;You selected red, waiting for player response&#8221;</li>
<li>Player 2 continues to see color selection buttons</li>
</ol>
</li>
<li>Player 2 selects a color and the controller sends to the server</li>
<li>The new model is posted to the clients</li>
<li>Both clients display the game result screen: &#8220;Player 2 guessed the right color!&#8221;</li>
</ol>
<p>So now you can see how we can divide up the responsibility with the model completely on the server side and the controller and view on the client side.  From here we can evolve to some more advanced models.</p>
<p>Gery breached the topic of having multiple models (that is concurrent models) on each of the clients.  This is an important case to consider when moving to realtime gameplay.  In realtime gameplay it&#8217;s critical for players to be able to act and react based on their opponents&#8217; actions.  One reason for moving the model &#8211; or part of the model &#8211; to the client is so that the model can quickly respond to input and overcome some of the shortcomings of lag and narrow bandwidth.</p>
<p>In this case you have to have a nicely tuned model.  One thing that game developers quickly encounter is the need to move your code from say 5 pixels per ENTER_FRAME event to 5 pixels for 20 millseconds.  This way your game doesn&#8217;t run faster or slower on different computers.  When you&#8217;ve got your code in this kind of set up you mostly just record input for the controller and pass it on each time the input changes.  A really fun example of this is the game <a title="Read the Rabbit Wants Cake review on Jay is Games" href="http://jayisgames.com/archives/2009/07/rabbit_wants_cake.php">Rabbit Wants Cake</a> developed by one of my favorite Flash game developers <a title="jmtb02 talks about building Rabbit Wants Cake" href="http://jmtb02.com/2009/06/30/rabbit-wants-cake-launches/">jmtb02</a>.</p>
<p>The game is a great example of the effects of input recorded and played back directly to the game controller. To take this to the multiplayer MVC realm we can start with a pessimistic concurrency example.  Two controllers are running (each client) and two models exist.  When input is received from one of the controllers it contacts the other controller and they agree on a timestamp for that input.  That timestamp is then put into the input queue for both controllers.  These controller act on the input at the exact same perceived time and they render the exact same output to the model.  The view remains ideally completely clueless as to the complex multiplayer interaction &#8211; the controllers are talking to each other and constant filling the hopper with identical input.</p>
<p>Here&#8217;s how the pessimistic model works:</p>
<ol>
<li>A jump button is pressed on client 1 at 56 millseconds game time</li>
<li>The controller sends the event to the other controller and they agree that they can both render it as if it happened at 65 milliseconds</li>
<li>This value is returned and both client models are updated at 70 milliseconds</li>
<li>The view reflects this by making the 1st player&#8217;s avatar jump!</li>
</ol>
<p>Unfortunately a pessimistic example of this will lead to a fair amount of lag if the timestamp of the input can&#8217;t be negotiated in a reasonable amount of time.  In this case we need an optimistic controller that&#8217;s capable to modifying the model based on historic inputs and some way to reconcile differnces.  This optimistic model means that when client 1 jumps at 56 milliseconds it immediately starts the jump on client 1&#8217;s model and then sends the jump to the second client telling it that client 1 jumped at 56 milliseconds.  But now you need a much more advanced controller that can figure out exactly what happened between the jump and the current game time and update the model in a fair (and perfectly predictable) way for both models.</p>
<p>The real goal of distributed models like there are to <em>keep them perfectly in sync </em>otherwise your game state differs and it&#8217;s no longer playable.  With pessimistic concurrency you can see that they will always be perfect but a fair amount of lag is introduced.  This may work for you game!  But for the majority of real-time games you&#8217;ll need to implement optimistic concurrency and that is a very complicated beast indeed.  Not only must you be able to replay historic events into your existing model flawlessly but you&#8217;ll also need to find a way to re-sync your models should they get out of whack.  That&#8217;s a big challenge and we may cover it in the future.</p>
<p>Please don&#8217;t be shy and let me know what you think!</p>



Share:


	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fmultiplayer-game-design-server-side-models-and-distributed-models%2F&amp;t=Multiplayer%20Game%20Design%3A%20Server-Side%20Models%20and%20Distributed%20Models" title="Facebook"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Multiplayer%20Game%20Design%3A%20Server-Side%20Models%20and%20Distributed%20Models&amp;body=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fmultiplayer-game-design-server-side-models-and-distributed-models%2F" title="email"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Multiplayer%20Game%20Design%3A%20Server-Side%20Models%20and%20Distributed%20Models%20-%20http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fmultiplayer-game-design-server-side-models-and-distributed-models%2F" title="Twitter"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fmultiplayer-game-design-server-side-models-and-distributed-models%2F&amp;t=Multiplayer%20Game%20Design%3A%20Server-Side%20Models%20and%20Distributed%20Models" title="MySpace"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fmultiplayer-game-design-server-side-models-and-distributed-models%2F&amp;title=Multiplayer%20Game%20Design%3A%20Server-Side%20Models%20and%20Distributed%20Models&amp;annotation=I%20recently%20posted%20about%20using%20the%C2%A0MVC%20pattern%20in%20games%20and%20provided%20a%20very%20quick%20and%20dirty%20pseudocode%20model%20of%20our%20hero%20in%20MVC.%20%C2%A0It%20showed%20a%20nice%20separation%20of%20concerns%20and%20had%20the%20display%20removed%20from%20the%20logic%20of%20the%20game.%20%C2%A0Shortly%20after%20I%20was%20p" title="Google Bookmarks"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fmultiplayer-game-design-server-side-models-and-distributed-models%2F&amp;title=Multiplayer%20Game%20Design%3A%20Server-Side%20Models%20and%20Distributed%20Models" title="Live"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fmultiplayer-game-design-server-side-models-and-distributed-models%2F&amp;title=Multiplayer%20Game%20Design%3A%20Server-Side%20Models%20and%20Distributed%20Models&amp;bodytext=I%20recently%20posted%20about%20using%20the%C2%A0MVC%20pattern%20in%20games%20and%20provided%20a%20very%20quick%20and%20dirty%20pseudocode%20model%20of%20our%20hero%20in%20MVC.%20%C2%A0It%20showed%20a%20nice%20separation%20of%20concerns%20and%20had%20the%20display%20removed%20from%20the%20logic%20of%20the%20game.%20%C2%A0Shortly%20after%20I%20was%20p" title="Digg"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fmultiplayer-game-design-server-side-models-and-distributed-models%2F" title="Technorati"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fmultiplayer-game-design-server-side-models-and-distributed-models%2F&amp;title=Multiplayer%20Game%20Design%3A%20Server-Side%20Models%20and%20Distributed%20Models&amp;source=Andy+J+Design+Game+Development%2C+Design%2C+Programming%2C+and+Marketing&amp;summary=I%20recently%20posted%20about%20using%20the%C2%A0MVC%20pattern%20in%20games%20and%20provided%20a%20very%20quick%20and%20dirty%20pseudocode%20model%20of%20our%20hero%20in%20MVC.%20%C2%A0It%20showed%20a%20nice%20separation%20of%20concerns%20and%20had%20the%20display%20removed%20from%20the%20logic%20of%20the%20game.%20%C2%A0Shortly%20after%20I%20was%20p" title="LinkedIn"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.andyjdesign.com/game-programming/multiplayer-game-design-server-side-models-and-distributed-models/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free Game Hotness: Spelunky</title>
		<link>http://www.andyjdesign.com/games/free-game-hotness-spelunky/</link>
		<comments>http://www.andyjdesign.com/games/free-game-hotness-spelunky/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 02:00:23 +0000</pubDate>
		<dc:creator>infamouse</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game review]]></category>
		<category><![CDATA[indie]]></category>
		<category><![CDATA[indie games]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[spelunky]]></category>
		<category><![CDATA[tigsource]]></category>

		<guid isPermaLink="false">http://www.andyjdesign.com/?p=103</guid>
		<description><![CDATA[So I&#8217;ve been throwing away tons of time trying to get this tiny pixelated Indiana Jones character through endless random dungeons.  Can I be honest and say I haven&#8217;t made it past the 4th floor?  Okay.
I&#8217;m having vivid recollections of my early NetHack days.  &#8220;Don&#8217;t touch the cockatrice.  You&#8217;ll die.&#8221;  Check.  &#8220;Don&#8217;t trip on the <a href="http://www.andyjdesign.com/games/free-game-hotness-spelunky/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been throwing away tons of time trying to get this tiny pixelated Indiana Jones character through endless random dungeons.  Can I be honest and say I haven&#8217;t made it past the 4th floor?  Okay.</p>
<p>I&#8217;m having vivid recollections of my early NetHack days.  &#8220;Don&#8217;t touch the cockatrice.  You&#8217;ll die.&#8221;  Check.  &#8220;Don&#8217;t trip on the cockatrice while blind and die.&#8221;  Check.  &#8220;Don&#8217;t zap a monster with an unidentified wand, polymorph it into a cockatrice, run into a dead end, and die.&#8221;<span id="more-103"></span></p>
<p>But there&#8217;s something here that sets Spelunky apart as it&#8217;s own beast entirely.  It takes dexterity.  I can&#8217;t tell you how many times I&#8217;ve clumsily dropped on bomb and ran from it only to fall into the clutches of some ill tempered trap.  But it makes the rewards of mastering the simple controls that much better.</p>
<p>The graphics are great, there&#8217;s catchy music, and it&#8217;s so simple to start playing you just can&#8217;t say, &#8220;no&#8221;.  Enjoy this YouTube preview and download it below!</p>
<p><object width="425" height="355" type="application/x-shockwave-flash" data="http://www.youtube.com/v/s5IRc9uPANo"><param name="movie" value="http://www.youtube.com/v/s5IRc9uPANo" />This video was embedded using the YouTuber plugin by <a href="http://www.roytanck.com">Roy Tanck</a>. Adobe Flash Player is required to view the video.</object></p>
<p><a title="Download Spelunky from the development thread on tigsource forums" href="http://forums.tigsource.com/index.php?topic=4017.0">Download Spelunky</a></p>
<p>Big thanks to Tiny Subversions for <a title="Tiny Subversions post on Spelunky" href="http://tinysubversions.blogspot.com/2009/01/spelunky.html">tipping me off</a> to this one.  How about we kick this off by sharing your favorite Spelunky deaths?</p>



Share:


	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.andyjdesign.com%2Fgames%2Ffree-game-hotness-spelunky%2F&amp;t=Free%20Game%20Hotness%3A%20Spelunky" title="Facebook"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Free%20Game%20Hotness%3A%20Spelunky&amp;body=http%3A%2F%2Fwww.andyjdesign.com%2Fgames%2Ffree-game-hotness-spelunky%2F" title="email"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Free%20Game%20Hotness%3A%20Spelunky%20-%20http%3A%2F%2Fwww.andyjdesign.com%2Fgames%2Ffree-game-hotness-spelunky%2F" title="Twitter"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.andyjdesign.com%2Fgames%2Ffree-game-hotness-spelunky%2F&amp;t=Free%20Game%20Hotness%3A%20Spelunky" title="MySpace"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.andyjdesign.com%2Fgames%2Ffree-game-hotness-spelunky%2F&amp;title=Free%20Game%20Hotness%3A%20Spelunky&amp;annotation=So%20I%27ve%20been%20throwing%20away%20tons%20of%20time%20trying%20to%20get%20this%20tiny%20pixelated%20Indiana%20Jones%20character%20through%20endless%20random%20dungeons.%C2%A0%20Can%20I%20be%20honest%20and%20say%20I%20haven%27t%20made%20it%20past%20the%204th%20floor%3F%C2%A0%20Okay.%0D%0A%0D%0AI%27m%20having%20vivid%20recollections%20of%20my%20early%20N" title="Google Bookmarks"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgames%2Ffree-game-hotness-spelunky%2F&amp;title=Free%20Game%20Hotness%3A%20Spelunky" title="Live"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgames%2Ffree-game-hotness-spelunky%2F&amp;title=Free%20Game%20Hotness%3A%20Spelunky&amp;bodytext=So%20I%27ve%20been%20throwing%20away%20tons%20of%20time%20trying%20to%20get%20this%20tiny%20pixelated%20Indiana%20Jones%20character%20through%20endless%20random%20dungeons.%C2%A0%20Can%20I%20be%20honest%20and%20say%20I%20haven%27t%20made%20it%20past%20the%204th%20floor%3F%C2%A0%20Okay.%0D%0A%0D%0AI%27m%20having%20vivid%20recollections%20of%20my%20early%20N" title="Digg"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.andyjdesign.com%2Fgames%2Ffree-game-hotness-spelunky%2F" title="Technorati"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgames%2Ffree-game-hotness-spelunky%2F&amp;title=Free%20Game%20Hotness%3A%20Spelunky&amp;source=Andy+J+Design+Game+Development%2C+Design%2C+Programming%2C+and+Marketing&amp;summary=So%20I%27ve%20been%20throwing%20away%20tons%20of%20time%20trying%20to%20get%20this%20tiny%20pixelated%20Indiana%20Jones%20character%20through%20endless%20random%20dungeons.%C2%A0%20Can%20I%20be%20honest%20and%20say%20I%20haven%27t%20made%20it%20past%20the%204th%20floor%3F%C2%A0%20Okay.%0D%0A%0D%0AI%27m%20having%20vivid%20recollections%20of%20my%20early%20N" title="LinkedIn"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.andyjdesign.com/games/free-game-hotness-spelunky/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Game Programming with Patterns: Model View Controller</title>
		<link>http://www.andyjdesign.com/web-development/game-programming-with-patterns-model-view-controller/</link>
		<comments>http://www.andyjdesign.com/web-development/game-programming-with-patterns-model-view-controller/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 18:45:19 +0000</pubDate>
		<dc:creator>infamouse</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[model view controller]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[object oriented]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[patterns]]></category>

		<guid isPermaLink="false">http://www.andyjdesign.com/?p=92</guid>
		<description><![CDATA[For those of you new to Flash programming &#8211; or any kind of programming &#8211; you might not have thought about object oriented programming beyond just trying to get the stupid stuff to compile.  When people think about OOP it drudges up ideas of classes, inheritance, methods, abstract members, and a bunch of other <a href="http://www.andyjdesign.com/web-development/game-programming-with-patterns-model-view-controller/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>For those of you new to Flash programming &#8211; or any kind of programming &#8211; you might not have thought about object oriented programming beyond just trying to get the stupid stuff to compile.  When people think about OOP it drudges up ideas of classes, inheritance, methods, abstract members, and a bunch of other stuff that sounds great but how do we apply this to our great game idea?  When you&#8217;re learning object oriented programming the most important thing you can take away is <em>how to use object patterns to quickly prototype your ideas</em>.<span id="more-92"></span>When people do medical research they don&#8217;t start from scratch.  They use libraries &#8211; buildings full &#8211; of previous research to build upon knowledge that&#8217;s been growing for generations.  When you&#8217;re writing code there&#8217;s no reason to start from scratch.  People have built a huge array of useful patterns that we can put to work right away in our Flash games.</p>
<p>If you&#8217;re interested in diving right in you&#8217;ll love this <a title="Design pattern list on Wikipedia" href="http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29#Classification_and_list">huge list of design patterns</a>.  Today we&#8217;re going to talk about using the <a title="MVC Pattern on Wikipedia" href="http://en.wikipedia.org/wiki/Model-View-Controller">Model-View-Controller pattern</a> for game programming.  This pattern has been popular in business software for a long time and has recently come into vogue because of the rapid rise of dynamic web apps.  Check out Microsoft&#8217;s <a title="Things about MVC on Rob Conery's blog" href="http://blog.wekeroad.com/tag/mvc/">Rob Conery</a> (he loves MVC) who has been evangelizing the ASP.NET MVC platform for a long time now.</p>
<p>Bo-ring.  I know.  But how do we make it work in our games?  Well the gist of MVC is this: you make a &#8220;model&#8221; of the things in your app, then figure out how to show them in the &#8220;view&#8221;.  Everything your user does is sent to a &#8220;controller&#8221;.  The controller then changes things in the model.  Okay: we&#8217;re still in outer space.</p>
<p>Imagine you have a hero.  He&#8217;s in the middle of the screen, and he&#8217;s bored.  Well what do we know about the hero?  We know he has an x and y location on screen.  What else do we know?  He&#8217;s got 100 hit points.</p>
<p>So lets turn this into a model.  We&#8217;ll mock it up in pseudocode.  (This is great practice by the way.)<br />
<pre><pre style="padding-left: 30px;">class Hero {
&nbsp;&nbsp;// properties
&nbsp;&nbsp;x:Number; // x location on screen
&nbsp;&nbsp;y:Number; // y location on screen
&nbsp;&nbsp;hitPoints:Number; // number of hit points left
}</pre></pre><br />
So we&#8217;ve got a funny little class.  Now what do we do?  Now we make a view.  What does our view entail?  Well it&#8217;s everything we want to display.  We don&#8217;t know very much yet so we don&#8217;t have a lot to display.  In our game loop we usually take input, adjust variables, and then draw things.  For our view we can just display the hero and a bar for his hit points.<br />
<pre><pre style="padding-left: 30px;">class LonelyHeroView {
&nbsp;&nbsp;// a view always shows data directly from a &quot;model&quot;
&nbsp;&nbsp;var model;

&nbsp;&nbsp;function LonelyHeroView(hero:Hero) {
&nbsp;&nbsp;&nbsp;&nbsp;model = hero;
&nbsp;&nbsp;}

&nbsp;&nbsp;function display() {
&nbsp;&nbsp;&nbsp;&nbsp;// draw a hero at (x,y)
&nbsp;&nbsp;&nbsp;&nbsp;Screen.drawHero(hero.x, hero.y, hero);
&nbsp;&nbsp;&nbsp;&nbsp;// draw a hitpoints 10 pixels above hero
&nbsp;&nbsp;&nbsp;&nbsp;Screen.drawHitpoints(hero.x, hero.y - 10, hero.hitPoints);
&nbsp;&nbsp;}
}</pre></pre><br />
So what do we do with these two classes?  Well we take our normal game loop and each time we create a &#8220;LonelyHeroView&#8221; and run display().<br />
<pre><pre style="padding-left: 30px;">// set up our model before entering loop
var hero = new Hero();
hero.x = 10;
hero.y = 10;
hero.hitPoints = 100;

while(true) {
&nbsp;&nbsp;var view = new LonelyHeroView(hero);
&nbsp;&nbsp;view.display(); 
}</pre></pre><br />
Now our hero will be displayed every frame at 10, 10 and have a full bar of 100 hit points.  Well we do want input don&#8217;t we?  Of course!  All we have to do is take input and use the input to modify the model.  We&#8217;ll start by making a really simple controller class.<br />
<pre><pre style="padding-left: 30px;">class GameController {
&nbsp;&nbsp;var model;

&nbsp;&nbsp;function GameController(hero) {
&nbsp;&nbsp;&nbsp;&nbsp;model = hero;
&nbsp;&nbsp;}

&nbsp;&nbsp;function left() {
&nbsp;&nbsp;&nbsp;&nbsp;model.x -= 5;
&nbsp;&nbsp;}

&nbsp;&nbsp;function right() {
&nbsp;&nbsp;&nbsp;&nbsp;model.x += 5;
&nbsp;&nbsp;}
}</pre></pre><br />
This is a really simple controller.  We each turn in the game loop we have some new code.<br />
<pre><pre style="padding-left: 30px;">// set up our model before entering loop
var hero = new Hero();
hero.x = 10;
hero.y = 10;
hero.hitPoints = 100;

while(true) {
&lt;span style=&quot;color: #00ff00;&quot;&gt;&lt;span style=&quot;color: #ff6600;&quot;&gt;&nbsp;&nbsp;var controller = new GameController(hero);
&nbsp;&nbsp;if(leftKeyPressed() == true) controller.left();
&nbsp;&nbsp;if(rightKeyPressed() == true) controller.right();&lt;/span&gt;
&lt;/span&gt;
&nbsp;&nbsp;var view = new LonelyHeroView(hero);
&nbsp;&nbsp;view.display(); 
}</pre></pre><br />
Now we&#8217;ve got a simple model, view, and controller.  One of the staples of good object oriented design is being able to separate code that&#8217;s responsible for different things.  The more complex your game gets the more your code is going to be stepping on its own toes.</p>
<p>It&#8217;s always helpful to mock things up in your own language first, then pseudocode, then write the real stuff.  There are even entire tools and <a title="UML - design your code before you write it!" href="http://en.wikipedia.org/wiki/Unified_Modeling_Language">languages </a>dedicated to generating pseudocode!  Imagine how easy it is to maintain your code now.  What if you play the game and decide that the hero moves to slow?  You go into the controller and make him move more left and right for each key press.  Easy.  Now what if you decide keyboard input is bad and you want to use the mouse for input instead?  Just change keyPressedLeft() to leftButtonClicked() and voila your hero responds to a mouse.</p>
<p>I&#8217;ll dig into more concrete examples of MVC in future posts!  For now I&#8217;d really appreciate everyone&#8217;s feedback on the first of my tutorials.</p>



Share:


	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Fgame-programming-with-patterns-model-view-controller%2F&amp;t=Game%20Programming%20with%20Patterns%3A%20Model%20View%20Controller" title="Facebook"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Game%20Programming%20with%20Patterns%3A%20Model%20View%20Controller&amp;body=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Fgame-programming-with-patterns-model-view-controller%2F" title="email"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Game%20Programming%20with%20Patterns%3A%20Model%20View%20Controller%20-%20http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Fgame-programming-with-patterns-model-view-controller%2F" title="Twitter"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Fgame-programming-with-patterns-model-view-controller%2F&amp;t=Game%20Programming%20with%20Patterns%3A%20Model%20View%20Controller" title="MySpace"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Fgame-programming-with-patterns-model-view-controller%2F&amp;title=Game%20Programming%20with%20Patterns%3A%20Model%20View%20Controller&amp;annotation=For%20those%20of%20you%20new%20to%20Flash%20programming%20-%20or%20any%20kind%20of%20programming%20-%20you%20might%20not%20have%20thought%20about%20object%20oriented%20programming%20beyond%20just%20trying%20to%20get%20the%20stupid%20stuff%20to%20compile.%20%20When%20people%20think%20about%20OOP%20it%20drudges%20up%20ideas%20of%20classes%2C%20" title="Google Bookmarks"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Fgame-programming-with-patterns-model-view-controller%2F&amp;title=Game%20Programming%20with%20Patterns%3A%20Model%20View%20Controller" title="Live"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Fgame-programming-with-patterns-model-view-controller%2F&amp;title=Game%20Programming%20with%20Patterns%3A%20Model%20View%20Controller&amp;bodytext=For%20those%20of%20you%20new%20to%20Flash%20programming%20-%20or%20any%20kind%20of%20programming%20-%20you%20might%20not%20have%20thought%20about%20object%20oriented%20programming%20beyond%20just%20trying%20to%20get%20the%20stupid%20stuff%20to%20compile.%20%20When%20people%20think%20about%20OOP%20it%20drudges%20up%20ideas%20of%20classes%2C%20" title="Digg"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Fgame-programming-with-patterns-model-view-controller%2F" title="Technorati"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Fgame-programming-with-patterns-model-view-controller%2F&amp;title=Game%20Programming%20with%20Patterns%3A%20Model%20View%20Controller&amp;source=Andy+J+Design+Game+Development%2C+Design%2C+Programming%2C+and+Marketing&amp;summary=For%20those%20of%20you%20new%20to%20Flash%20programming%20-%20or%20any%20kind%20of%20programming%20-%20you%20might%20not%20have%20thought%20about%20object%20oriented%20programming%20beyond%20just%20trying%20to%20get%20the%20stupid%20stuff%20to%20compile.%20%20When%20people%20think%20about%20OOP%20it%20drudges%20up%20ideas%20of%20classes%2C%20" title="LinkedIn"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.andyjdesign.com/web-development/game-programming-with-patterns-model-view-controller/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Tuning Facebook Apps: Apache and MySQL Performance</title>
		<link>http://www.andyjdesign.com/web-development/tuning-facebook-apps-apache-and-mysql-performance/</link>
		<comments>http://www.andyjdesign.com/web-development/tuning-facebook-apps-apache-and-mysql-performance/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 07:00:36 +0000</pubDate>
		<dc:creator>infamouse</dc:creator>
				<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[response]]></category>
		<category><![CDATA[throughput]]></category>
		<category><![CDATA[timeout]]></category>
		<category><![CDATA[tuning]]></category>
		<category><![CDATA[worker mpm]]></category>

		<guid isPermaLink="false">http://www.andyjdesign.com/?p=48</guid>
		<description><![CDATA[Facebook apps are getting hugely popular.  Once you&#8217;ve got a great idea to implement on a social network it can be tough getting it off the ground.  The Facebook team says that one of the best indicators of an apps success is its speed and responsiveness.  We&#8217;ve already seen the Facebook site grow a little <a href="http://www.andyjdesign.com/web-development/tuning-facebook-apps-apache-and-mysql-performance/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Facebook apps are getting hugely popular.  Once you&#8217;ve got a great idea to implement on a social network it can be tough getting it off the ground.  The Facebook team says that one of the best indicators of an apps success is its speed and responsiveness.  We&#8217;ve already seen the Facebook site grow a little too big for its britches &#8211; it&#8217;s performance can be downright discouraging on some older machines and browsers.  But what can you do to increase app responsiveness and performance.  Here are some tricks to get you app, your Apache server, and your MySQL database ready for the big time.<span id="more-48"></span></p>
<p>The first thing I&#8217;m going to mention is that if your app is designed and implemented poorly then you&#8217;ll find tuning Apache and MySQL to be highly dissatisfying.  Best practices for web apps, especially hosted on other platforms, include rendering a page with minimal content and filling in resource-intensive information with AJAX, minimizing and caching SQL query results, caching REST queries where appropriate, etc.</p>
<p>You can&#8217;t just stick to outdated scripting pattern of &#8220;run a boatload of queries and render the page&#8221;.  When you hit the 8 second mark Facebook will render an error to your user!  The penatly for this is astronomical.  Just look at the countless Facebook apps whose pages, walls, and discussion boards are just rant after rant about &#8220;how come this dont lode?&#8221; and &#8220;me two!!!&#8221; threads.  But even well engineered apps simply buckle under the staggering demand social apps can put on servers.  The spikes in popularity can kill an app almost as fast as it meteorically rose into the public spotlight.  Apps like <a title="PackRat is a collecting metagame with great minigames and social hooks." href="http://www.facebook.com/apps/application.php?id=2431403991">PackRat</a> are a great example.</p>
<p>To do any kind of performance testing you&#8217;ll need a reliable suite of tools to test exactly how responsive your app is.  I find the best kind of performance testing is compound testing of throughput for an entire page render.  Usually these page renders make a handful of REST calls, a few SQL queries, and run your template engine.</p>
<p>A great app to do this is Apache Bench (ab).  You just point ab to a URL on your server, tell it how many requests to run and how many to fire off concurrently.  A simple one is to run a batch of 10,000 queries with 100 concurrent requests:<br />
<pre style="padding-left: 30px;">ab -n 10000 -c 100 http://localhost/facebook_app.php</pre><br />
The output from Apache Bench tells you a lot.  Longest request, requests per second, etc.  Here&#8217;s quickie from Google:<br />
<pre><pre style="padding-left: 30px;">Server Hostname:        www.google.com
Server Port:            80

Document Path:          /
Document Length:        4952 bytes

Concurrency Level:      100
Time taken for tests:   4.366902 seconds
Complete requests:      1000
Failed requests:        841
 (Connect: 0, Length: 841, Exceptions: 0)
Write errors:           0
Total transferred:      5323026 bytes
HTML transferred:       5003374 bytes
Requests per second:    229.00 [#/sec] (mean)
Time per request:       436.690 [ms] (mean)
Time per request:       4.367 [ms] (mean, across all concurrent requests)
Transfer rate:          1190.32 [Kbytes/sec] received

Connection Times (ms)
 min  mean[+/-sd] median   max
Connect:       65   84  66.8     72     562
Processing:    72  310 385.6    149    3562
Waiting:       71  149 244.7     81    3504
Total:        138  394 388.6    222    3640

Percentage of the requests served within a certain time (ms)
 50%    222
 66%    492
 75%    556
 80%    578
 90%    830
 95%   1097
 98%   1661
 99%   2136
 100%   3640 (longest request)</pre></pre><br />
Apache comes pre-configured with a lot of modules turned on that are frequently not used.  Even if you are using them you might ask yourself, &#8220;do I really need that feature?&#8221;  The Red Hat default Apache 2 package has all these modules in it that I turned off:</p>
<ul>
<li>authn_auth_digest_module (shared)</li>
<li>authn_file_module (shared)</li>
<li>authn_alias_module (shared)</li>
<li>authn_anon_module (shared)</li>
<li>authn_dbm_module (shared)</li>
<li>authn_default_module (shared)</li>
<li>authz_host_module (shared)</li>
<li>authz_user_module (shared)</li>
<li>authz_owner_module (shared)</li>
<li>authz_groupfile_module (shared)</li>
<li>authz_dbm_module (shared)</li>
<li>authz_default_module (shared)</li>
<li>ldap_module (shared)</li>
<li>authnz_ldap_module (shared)</li>
<li>include_module (shared)</li>
<li>env_module (shared)</li>
<li>ext_filter_module (shared)</li>
<li>deflate_module (shared)</li>
<li>headers_module (shared)</li>
<li>setenvif_module (shared)</li>
<li>mime_module (shared)</li>
<li>dav_module (shared)</li>
<li>status_module (shared)</li>
<li>autoindex_module (shared)</li>
<li>info_module (shared)</li>
<li>dav_fs_module (shared)</li>
<li>vhost_alias_module (shared)</li>
<li>negotiation_module (shared)</li>
<li>dir_module (shared)</li>
<li>actions_module (shared)</li>
<li>speling_module (shared)</li>
<li>userdir_module (shared)</li>
<li>proxy_module (shared)</li>
<li>proxy_balancer_module (shared)</li>
<li>proxy_ftp_module (shared)</li>
<li>proxy_http_module (shared)</li>
<li>proxy_connect_module (shared)</li>
<li>suexec_module (shared)</li>
<li>cgi_module (shared)</li>
<li>perl_module (shared)</li>
<li>roxy_ajp_module (shared)</li>
<li>python_module (shared)</li>
<li>ssl_module (shared)</li>
</ul>
<p>Next you&#8217;ll want to make sure that extra features are turned off.  Lots of things like HostnameLookups have big performance hits and have been turned off since Apache 1.3.  There are still more subtle things to turn off like FollowSymLinks which makes extra system calls for each request.  For a full rundown see the <a title="Apache tuning from the team" href="http://httpd.apache.org/docs/1.3/misc/perf-tuning.html">Apache Performance Notes</a>.</p>
<p>When you start to get a lot of simultaneous requests you&#8217;ll notice Apache starting to grab bigger and bigger chunks of resources.  By default many distros ship with the prefork MPM as the default handler.  Switch to the worker MPM will save you a lot of resources.  Unfortunately PHP is not a thread-safe environment and you&#8217;ll need to switch PHP over to FastCGI.  On Red Hat you can switch you Apache over to the worker MPM by changing /etc/sysconfig/httpd and adding this line:<br />
<pre><pre style="padding-left: 30px;"># Set Apache to the Worker MPM on Red Hat
HTTPD=/usr/sbin/httpd.worker</pre></pre><br />
Switching PHP over to the FastCGI environment isn&#8217;t hard either.  You install the PHP CGI package (and probably a few dependencies, too) for your distro and change the PHP handler in Apache to:<br />
<pre><pre style="padding-left: 30px;">Options ExecCGI Indexes
AddHandler fcgid-script .php
FCGIWrapper /usr/lib/cgi-bin/php5 .php</pre></pre><br />
Now you&#8217;ve got a nice, snappy PHP server capable of churning out tons of concurrent requests to your Facebook app users.  For most apps you&#8217;ll also be maintaining app-specific data.  Maybe it&#8217;s their high score or their favorite vampire.  You do not want to store private user information in your app, ever.  If you want to store user information for caching reasons put it in memory &#8211; at least flat-file in a ram drive.  So you&#8217;ll likely be holding tables of user ids and some simple data associated with the user.</p>
<p>While your SQL fundamentals class told you to make your data as atomic as possible, sometimes this just isn&#8217;t the answer.  Keep your tables structures simple joins can kill performance if you don&#8217;t keep an eye on them.</p>
<p>First things first, you&#8217;ll need to keep an eye on MySQL and make sure that you&#8217;re not running an &#8220;slow queries&#8221;.  You can set a threshold for this and log every slow query to a file.  You can even log queries that are run against un-indexed columns.  Add these lines (while testing only, disk access is a performance hit):<br />
<pre><pre style="padding-left: 30px;">set-variable=long_query_time=1
log-slow-queries=/var/log/mysql/log-slow-queries.log
log-queries-not-using-indexes</pre></pre><br />
Keep an eye on it.  You&#8217;ll catch glaring queries right away.  There are subtle problems I&#8217;ve run into also.  If you mismatch the variable type you pass to a query it can scan the entire table skipping your index entirely!  Beyond that you&#8217;ll want to make sure the heaviest queries are cached &#8211; or in the case of leaderboards, only update them when something changes!  It might be as simple as storing a value for 10th place in your leaderboards.  When someone cracks the leaderboard, re-write the entire thing into cache.  Use this push method as often as possible.  When you do the cache-miss then fill method you can run into some nasty race conditions.</p>
<p>Stay tuned and happy hacking!</p>



Share:


	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Ftuning-facebook-apps-apache-and-mysql-performance%2F&amp;t=Tuning%20Facebook%20Apps%3A%20Apache%20and%20MySQL%20Performance" title="Facebook"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Tuning%20Facebook%20Apps%3A%20Apache%20and%20MySQL%20Performance&amp;body=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Ftuning-facebook-apps-apache-and-mysql-performance%2F" title="email"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Tuning%20Facebook%20Apps%3A%20Apache%20and%20MySQL%20Performance%20-%20http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Ftuning-facebook-apps-apache-and-mysql-performance%2F" title="Twitter"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Ftuning-facebook-apps-apache-and-mysql-performance%2F&amp;t=Tuning%20Facebook%20Apps%3A%20Apache%20and%20MySQL%20Performance" title="MySpace"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Ftuning-facebook-apps-apache-and-mysql-performance%2F&amp;title=Tuning%20Facebook%20Apps%3A%20Apache%20and%20MySQL%20Performance&amp;annotation=Facebook%20apps%20are%20getting%20hugely%20popular.%C2%A0%20Once%20you%27ve%20got%20a%20great%20idea%20to%20implement%20on%20a%20social%20network%20it%20can%20be%20tough%20getting%20it%20off%20the%20ground.%C2%A0%20The%20Facebook%20team%20says%20that%20one%20of%20the%20best%20indicators%20of%20an%20apps%20success%20is%20its%20speed%20and%20responsi" title="Google Bookmarks"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Ftuning-facebook-apps-apache-and-mysql-performance%2F&amp;title=Tuning%20Facebook%20Apps%3A%20Apache%20and%20MySQL%20Performance" title="Live"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Ftuning-facebook-apps-apache-and-mysql-performance%2F&amp;title=Tuning%20Facebook%20Apps%3A%20Apache%20and%20MySQL%20Performance&amp;bodytext=Facebook%20apps%20are%20getting%20hugely%20popular.%C2%A0%20Once%20you%27ve%20got%20a%20great%20idea%20to%20implement%20on%20a%20social%20network%20it%20can%20be%20tough%20getting%20it%20off%20the%20ground.%C2%A0%20The%20Facebook%20team%20says%20that%20one%20of%20the%20best%20indicators%20of%20an%20apps%20success%20is%20its%20speed%20and%20responsi" title="Digg"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Ftuning-facebook-apps-apache-and-mysql-performance%2F" title="Technorati"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fweb-development%2Ftuning-facebook-apps-apache-and-mysql-performance%2F&amp;title=Tuning%20Facebook%20Apps%3A%20Apache%20and%20MySQL%20Performance&amp;source=Andy+J+Design+Game+Development%2C+Design%2C+Programming%2C+and+Marketing&amp;summary=Facebook%20apps%20are%20getting%20hugely%20popular.%C2%A0%20Once%20you%27ve%20got%20a%20great%20idea%20to%20implement%20on%20a%20social%20network%20it%20can%20be%20tough%20getting%20it%20off%20the%20ground.%C2%A0%20The%20Facebook%20team%20says%20that%20one%20of%20the%20best%20indicators%20of%20an%20apps%20success%20is%20its%20speed%20and%20responsi" title="LinkedIn"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.andyjdesign.com/web-development/tuning-facebook-apps-apache-and-mysql-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kick Your Game Development Up A Notch With Subversion, Trac, and Harvest</title>
		<link>http://www.andyjdesign.com/game-programming/kick-your-game-development-up-a-notch-with-subversion-trac-and-harvest/</link>
		<comments>http://www.andyjdesign.com/game-programming/kick-your-game-development-up-a-notch-with-subversion-trac-and-harvest/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 17:45:46 +0000</pubDate>
		<dc:creator>infamouse</dc:creator>
				<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[milestones]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.andyjdesign.com/?p=63</guid>
		<description><![CDATA[When you&#8217;re writing a game it&#8217;s easy to lose track of your time, ideas, and the fun of it all.  You&#8217;ve gotta figure out your goals, sketch out your ideas, build prototypes, iterate, and take feedback on a project.  I know you&#8217;ve all got those legal pads with the next great game scribbled down on <a href="http://www.andyjdesign.com/game-programming/kick-your-game-development-up-a-notch-with-subversion-trac-and-harvest/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_67" class="wp-caption alignleft" style="width: 160px"><a rel="attachment wp-att-67" href="http://www.andyjdesign.com/game-programming/kick-your-game-development-up-a-notch-with-subversion-trac-and-harvest/attachment/trac-is-a-project-managemen/"><img class="size-thumbnail wp-image-67" title="Trac is a project management tool" src="http://www.andyjdesign.com/wp-content/uploads/2009/08/trac-is-a-project-managemen-150x150.jpg" alt="Trac works great with Subversion and can help you finish your game project" width="150" height="150" /></a><p class="wp-caption-text">Trac works great with Subversion and can help you finish your game project</p></div>
<p>When you&#8217;re writing a game it&#8217;s easy to lose track of your time, ideas, and the fun of it all.  You&#8217;ve gotta figure out your goals, sketch out your ideas, build prototypes, iterate, and take feedback on a project.  I know you&#8217;ve all got those legal pads with the next great game scribbled down on them.  Time to think like a project manager and get that stuff done.</p>
<p><span id="more-63"></span>If you don&#8217;t have source control: you need it.  Spend a day and figure out how to check out and check in and it&#8217;ll save you from yourself.  Ever accidentally crunch an FLA and lost everything?  Do you have 5 tilde&#8217;s in front of filenames?  &#8221;Final-final_final&#8221; look familiar?  I&#8217;m talking about my favorite setup here &#8211; <a title="Subversion source control" href="http://subversion.tigris.org/">Subversion</a>.  Of course on Windows all you need is <a title="TortoiseSVN - Windows Subversion client from the future" href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> and a copy of the (free) <a title="Learn how to use source control." href="http://svnbook.red-bean.com/">Svn Book</a> to get you started.</p>
<p>When you&#8217;ve got Subversion rolling you might be feeling saucy and want to keep track of your changes, set milestones, make to-do lists, and keep a project wiki (so you don&#8217;t lose any of those midnight bright ideas).  My favorite package for this is <a title="Keep track of your project." href="http://trac.edgewall.org/">Trac</a>.  Trac is a great package and is a little tricky to set up but thankfully there are people like <a title="Hosted trac and subversion" href="http://hosted-projects.com/">Hosted Projects</a> who can roll you out the whole setup in minutes.  You could also look at some options like a VM appliance you can roll out on your machine like <a title="VM Trac + Subversion appliance" href="http://www.garghouti.co.uk/vmTrac/">vmTrac</a>.</p>
<p>Now you can save your code, keep track of versions, fill out your task-list (and not forget that cool feature you thought of), and set milestones for yourself.  It might seem like a hassle to set up a project so rigidly but you&#8217;d be surpised what you can get done when you get out of your own way.  It&#8217;s great to sit down and know exactly what needs to get done on your project.  Or, in the future of your game career, when you&#8217;re working with a client you&#8217;ll have all the tools you need to estimate out projects and keep them up to date on your progress.</p>
<div id="attachment_66" class="wp-caption alignright" style="width: 310px"><a rel="attachment wp-att-66" href="http://www.andyjdesign.com/game-programming/kick-your-game-development-up-a-notch-with-subversion-trac-and-harvest/attachment/world-of-goo-had-many-versions/"><img class="size-medium wp-image-66" title="World of goo had many versions before they got it right" src="http://www.andyjdesign.com/wp-content/uploads/2009/08/world-of-goo-had-many-versions-300x235.png" alt="It takes a lot to finalize a game, just like World of Goo" width="300" height="235" /></a><p class="wp-caption-text">It takes a lot to finalize a game, just like World of Goo</p></div>
<p>Take World of Goo for instance.  It <a title="World of Goo had 7 different prototypes!" href="http://2dboy.com/2009/03/06/the-world-of-goo-wasnt-built-in-a-day-part-1-of-7/">wasn&#8217;t built in a day</a>.  They had to make versions of it, play with it, take feedback from their friends and testers, and act on that feedback.  You think they kept it all on sticky notes?</p>
<p>Thanks to <a title="MochiAds collaboration forum" href="http://www.mochimedia.com/community/forum/topics/flash-games-collaborations">great</a> <a title="Newgrounds Programming Forum" href="http://www.newgrounds.com/bbs/forum/7">new</a> <a title="DeviantArt" href="http://www.deviantart.com/">resources</a> a lot of indie game developers are finding projects and teams to collaborate with.  You want to really blow them away?  Why not keep track of your hours.  Not only will it help you figure out how well you perform but it will knock their socks off, too.  A great place to track your hours is at <a title="Harvest time tracking and invoicing" href="http://www.getharvest.com?r=1fa3eb">Harvest</a>.  If you get in the habit of tracking your own hours you&#8217;ll have a much better idea of the time you&#8217;re actually spending and it will make you a much better team contributor.</p>
<p>When you&#8217;ve got all these skills in place you&#8217;ve got a real foundation to become part of the larger developer community no matter what kind of code you write.  And for game programmers I&#8217;d love to see everyone step up and take their code to the next level.</p>



Share:


	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fkick-your-game-development-up-a-notch-with-subversion-trac-and-harvest%2F&amp;t=Kick%20Your%20Game%20Development%20Up%20A%20Notch%20With%20Subversion%2C%20Trac%2C%20and%20Harvest" title="Facebook"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Kick%20Your%20Game%20Development%20Up%20A%20Notch%20With%20Subversion%2C%20Trac%2C%20and%20Harvest&amp;body=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fkick-your-game-development-up-a-notch-with-subversion-trac-and-harvest%2F" title="email"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Kick%20Your%20Game%20Development%20Up%20A%20Notch%20With%20Subversion%2C%20Trac%2C%20and%20Harvest%20-%20http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fkick-your-game-development-up-a-notch-with-subversion-trac-and-harvest%2F" title="Twitter"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fkick-your-game-development-up-a-notch-with-subversion-trac-and-harvest%2F&amp;t=Kick%20Your%20Game%20Development%20Up%20A%20Notch%20With%20Subversion%2C%20Trac%2C%20and%20Harvest" title="MySpace"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fkick-your-game-development-up-a-notch-with-subversion-trac-and-harvest%2F&amp;title=Kick%20Your%20Game%20Development%20Up%20A%20Notch%20With%20Subversion%2C%20Trac%2C%20and%20Harvest&amp;annotation=%0D%0A%0D%0AWhen%20you%27re%20writing%20a%20game%20it%27s%20easy%20to%20lose%20track%20of%20your%20time%2C%20ideas%2C%20and%20the%20fun%20of%20it%20all.%20%C2%A0You%27ve%20gotta%20figure%20out%20your%20goals%2C%20sketch%20out%20your%20ideas%2C%20build%20prototypes%2C%20iterate%2C%20and%20take%20feedback%20on%20a%20project.%20%C2%A0I%20know%20you%27ve%20all%20got%20those%20l" title="Google Bookmarks"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fkick-your-game-development-up-a-notch-with-subversion-trac-and-harvest%2F&amp;title=Kick%20Your%20Game%20Development%20Up%20A%20Notch%20With%20Subversion%2C%20Trac%2C%20and%20Harvest" title="Live"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fkick-your-game-development-up-a-notch-with-subversion-trac-and-harvest%2F&amp;title=Kick%20Your%20Game%20Development%20Up%20A%20Notch%20With%20Subversion%2C%20Trac%2C%20and%20Harvest&amp;bodytext=%0D%0A%0D%0AWhen%20you%27re%20writing%20a%20game%20it%27s%20easy%20to%20lose%20track%20of%20your%20time%2C%20ideas%2C%20and%20the%20fun%20of%20it%20all.%20%C2%A0You%27ve%20gotta%20figure%20out%20your%20goals%2C%20sketch%20out%20your%20ideas%2C%20build%20prototypes%2C%20iterate%2C%20and%20take%20feedback%20on%20a%20project.%20%C2%A0I%20know%20you%27ve%20all%20got%20those%20l" title="Digg"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fkick-your-game-development-up-a-notch-with-subversion-trac-and-harvest%2F" title="Technorati"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.andyjdesign.com%2Fgame-programming%2Fkick-your-game-development-up-a-notch-with-subversion-trac-and-harvest%2F&amp;title=Kick%20Your%20Game%20Development%20Up%20A%20Notch%20With%20Subversion%2C%20Trac%2C%20and%20Harvest&amp;source=Andy+J+Design+Game+Development%2C+Design%2C+Programming%2C+and+Marketing&amp;summary=%0D%0A%0D%0AWhen%20you%27re%20writing%20a%20game%20it%27s%20easy%20to%20lose%20track%20of%20your%20time%2C%20ideas%2C%20and%20the%20fun%20of%20it%20all.%20%C2%A0You%27ve%20gotta%20figure%20out%20your%20goals%2C%20sketch%20out%20your%20ideas%2C%20build%20prototypes%2C%20iterate%2C%20and%20take%20feedback%20on%20a%20project.%20%C2%A0I%20know%20you%27ve%20all%20got%20those%20l" title="LinkedIn"><img src="http://www.andyjdesign.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.andyjdesign.com/game-programming/kick-your-game-development-up-a-notch-with-subversion-trac-and-harvest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
