<?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: XNA Game Engine Tutorial Series #6 &#8211; Input</title>
	<atom:link href="http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/</link>
	<description>Independent game development blog by Sean James</description>
	<lastBuildDate>Thu, 02 Feb 2012 11:54:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: GamePad Man</title>
		<link>http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/comment-page-1/#comment-13299</link>
		<dc:creator>GamePad Man</dc:creator>
		<pubDate>Sat, 27 Nov 2010 18:08:10 +0000</pubDate>
		<guid isPermaLink="false">http://innovativegames.net/blog/?p=188#comment-13299</guid>
		<description>Turns out that if I am doing the 

            if (keyboard.IsKeyDown(Keys.Up) &#124;&#124; gamepad.IsButtonDown(Buttons.DPadUp))
                InputCommand = &quot;moveUp&quot;;

stuff in the Game.Update() Method, everything works fine. It just doesn&#039;t work in my GameScreen.HandleInput() (which is called from the GameScreen.Upate() ). That&#039;s weird, because there aren&#039;t any such problems with the Keyboard...</description>
		<content:encoded><![CDATA[<p>Turns out that if I am doing the </p>
<p>            if (keyboard.IsKeyDown(Keys.Up) || gamepad.IsButtonDown(Buttons.DPadUp))<br />
                InputCommand = &#8220;moveUp&#8221;;</p>
<p>stuff in the Game.Update() Method, everything works fine. It just doesn&#8217;t work in my GameScreen.HandleInput() (which is called from the GameScreen.Upate() ). That&#8217;s weird, because there aren&#8217;t any such problems with the Keyboard&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GamePad Man</title>
		<link>http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/comment-page-1/#comment-13296</link>
		<dc:creator>GamePad Man</dc:creator>
		<pubDate>Sat, 27 Nov 2010 17:38:35 +0000</pubDate>
		<guid isPermaLink="false">http://innovativegames.net/blog/?p=188#comment-13296</guid>
		<description>Addition: Copy &amp; Paste maluse makes it seem I do the initialization after the registration. This is not the case. the gamepad = new .... comes at the very first.</description>
		<content:encoded><![CDATA[<p>Addition: Copy &amp; Paste maluse makes it seem I do the initialization after the registration. This is not the case. the gamepad = new &#8230;. comes at the very first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GamePad Man</title>
		<link>http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/comment-page-1/#comment-13295</link>
		<dc:creator>GamePad Man</dc:creator>
		<pubDate>Sat, 27 Nov 2010 17:35:03 +0000</pubDate>
		<guid isPermaLink="false">http://innovativegames.net/blog/?p=188#comment-13295</guid>
		<description>I can&#039;t seem to get the gamepad to work on my XBox. I have a HandleInput method like this:

        public void HandleInput()
        {
            KeyboardDevice kbd = (KeyboardDevice) 
                Engine.Services.GetService(typeof(KeyboardDevice));
            GamepadDevice gpd = (GamepadDevice)
                Engine.Services.GetService(typeof(GamepadDevice));

            if (kbd.IsKeyDown(Keys.Up) &#124;&#124; gpd.IsButtonDown(Buttons.DPadUp))
                inputString = &quot;moveUp&quot;;

Using the keyboard on the PC works just fine. The gamepad for the XBox is dead...

Here is how I register the input devices in my Game Class:

            engine = new Engine(graphics);
            engine.Services.AddService(typeof(KeyboardDevice), keyboard);
            engine.Services.AddService(typeof(GamepadDevice), gamepad);
            keyboard = new KeyboardDevice();
            gamepad = new GamepadDevice(PlayerIndex.One);
            MyGameScreen.AddComponent(keyboard);
            MyGameScreen.AddComponent(gamepad);

What am I missing?</description>
		<content:encoded><![CDATA[<p>I can&#8217;t seem to get the gamepad to work on my XBox. I have a HandleInput method like this:</p>
<p>        public void HandleInput()<br />
        {<br />
            KeyboardDevice kbd = (KeyboardDevice)<br />
                Engine.Services.GetService(typeof(KeyboardDevice));<br />
            GamepadDevice gpd = (GamepadDevice)<br />
                Engine.Services.GetService(typeof(GamepadDevice));</p>
<p>            if (kbd.IsKeyDown(Keys.Up) || gpd.IsButtonDown(Buttons.DPadUp))<br />
                inputString = &#8220;moveUp&#8221;;</p>
<p>Using the keyboard on the PC works just fine. The gamepad for the XBox is dead&#8230;</p>
<p>Here is how I register the input devices in my Game Class:</p>
<p>            engine = new Engine(graphics);<br />
            engine.Services.AddService(typeof(KeyboardDevice), keyboard);<br />
            engine.Services.AddService(typeof(GamepadDevice), gamepad);<br />
            keyboard = new KeyboardDevice();<br />
            gamepad = new GamepadDevice(PlayerIndex.One);<br />
            MyGameScreen.AddComponent(keyboard);<br />
            MyGameScreen.AddComponent(gamepad);</p>
<p>What am I missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ISAF</title>
		<link>http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/comment-page-1/#comment-4512</link>
		<dc:creator>ISAF</dc:creator>
		<pubDate>Thu, 25 Jun 2009 06:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://innovativegames.net/blog/?p=188#comment-4512</guid>
		<description>I am running up to this chapter on the 360. Works like a charm. Except that when I &quot;fire&quot; it adds the last of the 9 boxes and knocks them over. 

Also when I &quot;fire&quot; alot of boxes I get a performance drop really fast. 
Is this caused by the physics?

boxes spawn inside eachother so I guess it causes quite some collisions?</description>
		<content:encoded><![CDATA[<p>I am running up to this chapter on the 360. Works like a charm. Except that when I &#8220;fire&#8221; it adds the last of the 9 boxes and knocks them over. </p>
<p>Also when I &#8220;fire&#8221; alot of boxes I get a performance drop really fast.<br />
Is this caused by the physics?</p>
<p>boxes spawn inside eachother so I guess it causes quite some collisions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.innovativegames.net/blog/blog/2008/11/16/engine-tutorial-6/comment-page-1/#comment-4500</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Tue, 23 Jun 2009 22:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://innovativegames.net/blog/?p=188#comment-4500</guid>
		<description>It&#039;s fast enough that you don&#039;t have to worry about how fast it is ;)

It&#039;s pretty much just calling the retrieve function in a dictionary contained in Engine.Services.</description>
		<content:encoded><![CDATA[<p>It&#8217;s fast enough that you don&#8217;t have to worry about how fast it is <img src='http://www.innovativegames.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>It&#8217;s pretty much just calling the retrieve function in a dictionary contained in Engine.Services.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

