<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>http://forums.xna.com/forums/32.aspx</link><description>Don't know where to post your question? Post it here!</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/27177.aspx</link><pubDate>Sat, 06 Oct 2007 14:53:35 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:27177</guid><dc:creator>Harald Maassen</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/27177.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=27177</wfw:commentRss><description>&lt;P&gt;Bit of a late reply, but I was just messing about with this and the following works if you use the gameTime in your calculations:&lt;/P&gt;
&lt;DIV style="BACKGROUND-COLOR:white;"&gt;
&lt;DIV style="BACKGROUND-COLOR:white;"&gt;
&lt;DIV style="PADDING-RIGHT:2px;OVERFLOW-Y:hidden;PADDING-LEFT:8px;PADDING-BOTTOM:2px;MARGIN:0px;OVERFLOW:scroll;WIDTH:505px;PADDING-TOP:2px;BACKGROUND-COLOR:white;"&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;void&lt;/SPAN&gt; Update(GameTime gameTime)&lt;BR&gt;{&lt;BR&gt;    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// slowmo 33%&lt;/SPAN&gt;&lt;BR&gt;    gameTime &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; GameTime(gameTime.TotalRealTime, gameTime.ElapsedRealTime, &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; TimeSpan((&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;long&lt;/SPAN&gt;)(gameTime.TotalGameTime.Ticks &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;*&lt;/SPAN&gt; 0.33f)), &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; TimeSpan((&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;long&lt;/SPAN&gt;)(gameTime.ElapsedGameTime.Ticks &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;*&lt;/SPAN&gt; 0.33f)));&lt;BR&gt;    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;base&lt;/SPAN&gt;.Update(gameTime);&lt;BR&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/19185.aspx</link><pubDate>Sat, 04 Aug 2007 12:59:31 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:19185</guid><dc:creator>Swordshock</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/19185.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=19185</wfw:commentRss><description>&lt;P&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;The ZMan:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Your idea is exactly what I suggested... so no&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/P&gt;
&lt;P&gt;ooooops..... didn't see that you mentioned it.....&lt;/P&gt;</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/18826.aspx</link><pubDate>Wed, 01 Aug 2007 17:39:02 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18826</guid><dc:creator>Lord Ikon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18826.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18826</wfw:commentRss><description>&lt;P&gt;For my game I simply have a gameSpeed float variable that I modify. It is always between 0.0f and 1.0f. 1.0 is 100%. I pass the variable into anything in the game that is affected by speed effects.&lt;/P&gt;
&lt;P&gt;Some pseudocode would be:&lt;/P&gt;
&lt;P&gt;Movement.Y += 3.0 * game elapsed time * gameSpeed;&lt;/P&gt;</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/18793.aspx</link><pubDate>Wed, 01 Aug 2007 15:05:33 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18793</guid><dc:creator>Kyle Schouviller</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18793.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18793</wfw:commentRss><description>The problem with just using a speedFactor variable is that your cumulative times will be messed up if you change the speed factor.&amp;nbsp; We solved this in our DBP project by creating a time controller class that held its own timespans - both real time and modified time.&amp;nbsp; Then you just update that every frame with gametime, and use the time variables in the time controller to update your objects.&lt;br&gt;&lt;br&gt;I coded my own for the library I'm working on - but since the library isn't really worth releasing yet, here's the code file by itself.&amp;nbsp; Hopefully it's of some use to you.&lt;br&gt;&lt;br&gt;&lt;a href="http://www.kyleschouviller.com/files/TimeController.zip"&gt;http://www.kyleschouviller.com/files/TimeController.zip&lt;/a&gt;&lt;br&gt;</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/18774.aspx</link><pubDate>Wed, 01 Aug 2007 12:55:35 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18774</guid><dc:creator>The ZMan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18774.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18774</wfw:commentRss><description>Your idea is exactly what I suggested... so no</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/18769.aspx</link><pubDate>Wed, 01 Aug 2007 12:44:26 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18769</guid><dc:creator>Swordshock</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18769.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18769</wfw:commentRss><description>ahem ahem...and my idea is dirt? lol</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/18712.aspx</link><pubDate>Wed, 01 Aug 2007 04:21:08 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18712</guid><dc:creator>SuburbanMonkey</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18712.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18712</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Righteous Tool:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Another problem with skipping calls to Update is that you will make your slow-motion animations look choppy.&lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br&gt;&lt;br&gt;Yeah, I thought about this immediately after posting the comment =o)&lt;br&gt;&lt;br&gt;It would look ok if the objects were moving slowly or not moving by much but for anything else it really isn't a good solution. Do what ZMan suggested, definitely.&lt;br&gt;&lt;br&gt;</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/18686.aspx</link><pubDate>Tue, 31 Jul 2007 22:28:18 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18686</guid><dc:creator>Swordshock</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18686.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18686</wfw:commentRss><description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;protected&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;override&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; Update(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;GameTime&lt;/FONT&gt;&lt;FONT size=2&gt; gameTime)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;float&lt;/FONT&gt;&lt;FONT size=2&gt; dt = slowMotionScale * (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;float&lt;/FONT&gt;&lt;FONT size=2&gt;)gameTime.ElapsedGameTime.TotalSeconds;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//more stuff...&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Get your time step from dt instead of gameTime.&amp;nbsp; You lose a bit of functionality, but you get genuine slo-mo =P&lt;/P&gt;&lt;/FONT&gt;</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/18680.aspx</link><pubDate>Tue, 31 Jul 2007 21:04:04 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18680</guid><dc:creator>Stephen Styrchak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18680.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18680</wfw:commentRss><description>&lt;P&gt;I recommend you use a factor like ZMan suggested. Another problem with skipping calls to Update is that you will make your slow-motion animations look choppy.&lt;/P&gt;
&lt;P&gt;Imagine a fast-moving object that can travel across the screen in 10 frames. Now say you want to slow that down so it takes 30 frames. If you skip the Updates, then you will end up drawing it in only 10 different positions, but you will see it in each position for 3 times as long.&amp;nbsp;If instead you apply a factor (1/3 for this example) to your elapsed game time when you do your calculations in Update, then your object will move smoothly across the screen, but at 1/3 the speed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/18630.aspx</link><pubDate>Tue, 31 Jul 2007 10:47:42 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18630</guid><dc:creator>The ZMan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18630.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18630</wfw:commentRss><description>&lt;P&gt;There's nothing built in to do this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally I would create a global 'speedFactor' variable and divide all time calculations by that value before I used them. Means you have to remember to do it though.&lt;/P&gt;
&lt;P&gt;The problem&amp;nbsp;of missing some calls to Update on a fixed timestep is that you will only be able to evenly implement factors of that speed e.g. for 60fps you will only be able to do 1/2, 1/4, 1/3, 1/5, 1/6, 1/10, 1/12, 1/15, 1/20 speeds. If you go this route remember not to use the elapsed time or gametime that is passed in, but assume that you are still on your regular lock step time.&lt;/P&gt;</description></item><item><title>Re: Slow Motion?</title><link>http://forums.xna.com/forums/thread/18627.aspx</link><pubDate>Tue, 31 Jul 2007 09:54:32 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18627</guid><dc:creator>SuburbanMonkey</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18627.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18627</wfw:commentRss><description>The way I would probably do it would be to only call the Update() function of my game objects at certain intervals because XNA uses a lock stepping method for controling game updates anyway.&lt;br&gt;&lt;br&gt;You could implement an ISlowable interface which you could then apply to any object you wanted to be able to slow down, that way things would be much cleaner and any non-ISlowable objects could carry on updating at normal speed. Although, if I were going to do it this way I'd be tempted to create a second Update() function to still allow some things to be updated every frame.&lt;br&gt;&lt;br&gt;</description></item><item><title>Slow Motion?</title><link>http://forums.xna.com/forums/thread/18626.aspx</link><pubDate>Tue, 31 Jul 2007 09:43:12 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:18626</guid><dc:creator>iAmTheRainKing</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/18626.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=32&amp;PostID=18626</wfw:commentRss><description>I'm trying to implement a "slow motion" feature in my game, and I was just wondering if there was a XNA standard for controlling gametime.&amp;nbsp; It seems like the 2 ways to do this would be to (1) have a "motionSpeed" variable that is divided into any relevant time calculation, or (2) in someway indicate via some hook in XNA that time is to be slowed.&lt;br&gt;&lt;br&gt;Has anyone implemented this feature in their own game?&amp;nbsp; Any tips?&lt;br&gt;&lt;br&gt;Thanks.&lt;br&gt;</description></item></channel></rss>