<?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: Handling Game State Management in C++</title>
	<atom:link href="http://stephenmcintyre.net/blog/c-plus-plus-state-management/feed/" rel="self" type="application/rss+xml" />
	<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/</link>
	<description>Young Scottish Web Designer</description>
	<lastBuildDate>Thu, 24 Nov 2011 19:03:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris</title>
		<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/comment-page-1/#comment-14764</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 19 Nov 2011 11:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=405#comment-14764</guid>
		<description>Sadly these giant Switch Statements cause a heavy FPS drop in 3D content Games :(</description>
		<content:encoded><![CDATA[<p>Sadly these giant Switch Statements cause a heavy FPS drop in 3D content Games <img src='http://stephenmcintyre.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RufusMall</title>
		<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/comment-page-1/#comment-13337</link>
		<dc:creator>RufusMall</dc:creator>
		<pubDate>Thu, 27 Oct 2011 21:27:18 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=405#comment-13337</guid>
		<description>How long have you been coding for? Is this your first game? I recommend you start with something basic and follow a STEP BY STEP tutorial to create a game first and then keep modifying and playing about with it to understand how the code works. I recommend using c sharp and the xna framework to get started...</description>
		<content:encoded><![CDATA[<p>How long have you been coding for? Is this your first game? I recommend you start with something basic and follow a STEP BY STEP tutorial to create a game first and then keep modifying and playing about with it to understand how the code works. I recommend using c sharp and the xna framework to get started&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Stuart</title>
		<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/comment-page-1/#comment-13247</link>
		<dc:creator>Thomas Stuart</dc:creator>
		<pubDate>Wed, 26 Oct 2011 16:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=405#comment-13247</guid>
		<description>Whoops found my mistake, I was typing my code in Dreamweaver. Silly me, no wonder my update didnt run. Dreamweavers compiler doesnt understand Visual Basic code who knew!

Anyways I got another problem, it seems my sprite class wont draw?

int Sprite

if(private override public Draw (int:) =! null)
{{
   Fullbatch.sprite.draw.int;
   Update.draw;
}}
endif;

??</description>
		<content:encoded><![CDATA[<p>Whoops found my mistake, I was typing my code in Dreamweaver. Silly me, no wonder my update didnt run. Dreamweavers compiler doesnt understand Visual Basic code who knew!</p>
<p>Anyways I got another problem, it seems my sprite class wont draw?</p>
<p>int Sprite</p>
<p>if(private override public Draw (int:) =! null)<br />
{{<br />
   Fullbatch.sprite.draw.int;<br />
   Update.draw;<br />
}}<br />
endif;</p>
<p>??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Stuart</title>
		<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/comment-page-1/#comment-13207</link>
		<dc:creator>Thomas Stuart</dc:creator>
		<pubDate>Wed, 26 Oct 2011 01:00:20 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=405#comment-13207</guid>
		<description>This is really good advice, I can finally get to grips with changing the state of my game. Although im stuck with my code? Not sure if you can help.


enum eGameState {GSM_MENU, GSM_LEVEL, GSM_END};
eGameState gameState = GSM_MENU;
-----------------------------
switch (gameState)
{
   if( gameState != broken)
   {  case GSM_MENU :};
  {
    // Menu state
  }
  break;
 if( gameState != broken)
   {  case GSM_LEVEL :};
  {

    // Level state
  }
  break;
 if( gameState != broken)
   {  case GSM_BREAK :};
  {
    // End state
  }
  break;
}
-------------------------
if(Shoot == 1)
{
  gameState = break;
}


I have used your integers but i cant get my head around fixing the game state once it &#039;breaks&#039;? Is this what patching a game means.. 

Sorry im new to Visual Basic.</description>
		<content:encoded><![CDATA[<p>This is really good advice, I can finally get to grips with changing the state of my game. Although im stuck with my code? Not sure if you can help.</p>
<p>enum eGameState {GSM_MENU, GSM_LEVEL, GSM_END};<br />
eGameState gameState = GSM_MENU;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
switch (gameState)<br />
{<br />
   if( gameState != broken)<br />
   {  case GSM_MENU :};<br />
  {<br />
    // Menu state<br />
  }<br />
  break;<br />
 if( gameState != broken)<br />
   {  case GSM_LEVEL :};<br />
  {</p>
<p>    // Level state<br />
  }<br />
  break;<br />
 if( gameState != broken)<br />
   {  case GSM_BREAK :};<br />
  {<br />
    // End state<br />
  }<br />
  break;<br />
}<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
if(Shoot == 1)<br />
{<br />
  gameState = break;<br />
}</p>
<p>I have used your integers but i cant get my head around fixing the game state once it &#8216;breaks&#8217;? Is this what patching a game means.. </p>
<p>Sorry im new to Visual Basic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen McIntyre</title>
		<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/comment-page-1/#comment-13196</link>
		<dc:creator>Stephen McIntyre</dc:creator>
		<pubDate>Tue, 25 Oct 2011 22:21:24 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=405#comment-13196</guid>
		<description>You&#039;re absolutely right, but I&#039;m all in favour of simple concepts. This post will serve as a middleman between not knowing anything about game state management at all, and your very useful link. Thanks.</description>
		<content:encoded><![CDATA[<p>You&#8217;re absolutely right, but I&#8217;m all in favour of simple concepts. This post will serve as a middleman between not knowing anything about game state management at all, and your very useful link. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taywee</title>
		<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/comment-page-1/#comment-13170</link>
		<dc:creator>Taywee</dc:creator>
		<pubDate>Tue, 25 Oct 2011 16:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=405#comment-13170</guid>
		<description>This is awful advice.  A series of giant switch statement is very messy, especially in more complex games.  If states are necessary for you, then you should be using states based on references and polymorphism.
A good, albeit not very thorough example is here (although it uses ugly C-like naming conventions):
http://gamedevgeek.com/tutorials/managing-game-states-in-c/</description>
		<content:encoded><![CDATA[<p>This is awful advice.  A series of giant switch statement is very messy, especially in more complex games.  If states are necessary for you, then you should be using states based on references and polymorphism.<br />
A good, albeit not very thorough example is here (although it uses ugly C-like naming conventions):<br />
<a href="http://gamedevgeek.com/tutorials/managing-game-states-in-c/" rel="nofollow">http://gamedevgeek.com/tutorials/managing-game-states-in-c/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen McIntyre</title>
		<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/comment-page-1/#comment-787</link>
		<dc:creator>Stephen McIntyre</dc:creator>
		<pubDate>Sun, 01 Aug 2010 13:51:47 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=405#comment-787</guid>
		<description>Yes you can apply the same rules to any other game or software language out there. In fact, I&#039;ve used this same technique in a Flash game myself.</description>
		<content:encoded><![CDATA[<p>Yes you can apply the same rules to any other game or software language out there. In fact, I&#8217;ve used this same technique in a Flash game myself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: online jogos</title>
		<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/comment-page-1/#comment-786</link>
		<dc:creator>online jogos</dc:creator>
		<pubDate>Sun, 01 Aug 2010 12:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=405#comment-786</guid>
		<description>That,s a great idea. Though I’m not much of a gamer but I will definitely try this tool in some
other directions connected with flash format. Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>That,s a great idea. Though I’m not much of a gamer but I will definitely try this tool in some<br />
other directions connected with flash format. Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PSP CFW 5.50 GEN-D2 IS Out!With Download Link!</title>
		<link>http://stephenmcintyre.net/blog/c-plus-plus-state-management/comment-page-1/#comment-113</link>
		<dc:creator>PSP CFW 5.50 GEN-D2 IS Out!With Download Link!</dc:creator>
		<pubDate>Mon, 05 Apr 2010 14:13:59 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=405#comment-113</guid>
		<description>[...] Handling Game State Management in C++ &#171; Stephen McIntyre [...]</description>
		<content:encoded><![CDATA[<p>[...] Handling Game State Management in C++ &laquo; Stephen McIntyre [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

