Time Duration in Each frame - C# XNA

This is a discussion on Time Duration in Each frame - C# XNA within the Game Programming forums, part of the General Programming Boards category; This is a quote from a book i am reading "Each particle will live for 90 frames approximately 3 seconds".. ...

  1. #1
    The Dragon Reborn
    Join Date
    Nov 2009
    Location
    Dublin, Ireland
    Posts
    629

    Time Duration in Each frame - C# XNA

    This is a quote from a book i am reading
    "Each particle will live for 90 frames approximately 3 seconds".. ..This is what I hate about programming games...how do they get that figure?
    I know a the update function gets called every 16.6667 milliseconds and durationCount for each particle is 90..how does he arrive at 3 seconds though?
    Please help.
    Thanks.
    Last edited by Eman; 02-21-2011 at 12:01 PM.
    You ended that sentence with a preposition...Bastard!

  2. #2
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    Posts
    435
    First of all, there's no guarantee as to how often update gets called.

    If the book is targetting mobile, WP7 usually runs at a maximum of 30 fps.
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

  3. #3
    The Dragon Reborn
    Join Date
    Nov 2009
    Location
    Dublin, Ireland
    Posts
    629
    I am running it on a PC..
    but for the sake of argument lets assume it will always call update at 60fps..

    60 frames per second means it will take a snapshot of the current picture and redraw it to the screen 60 times in a second yeah?

    "Each particle will live for 90
    frames (approximately 3 seconds)," what does that mean?
    a particle will live for 90 update /draw function calls? but how is that 3seconds? haha
    You ended that sentence with a preposition...Bastard!

  4. #4
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    Posts
    435
    YOU are running on Windows. The author of the book was probably running Phone 7, which as I said earlier, runs at a max of 30fps.

    90 frames / 30 fps = 3 seconds.
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    "Each particle will live for 90 frames approximately 3 seconds"..
    This is poor phrasing. A better wording is that each particle lives for 3 seconds regardless of how many frames are rendered in that 3 seconds. As has been said 3 seconds does not guarantee 90 frames at 30 FPS since the Update() and Render() both can alter the frame delta. Also at 30 FPS the frame delta is not 16.66667ms.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help fast
    By blackice in forum C Programming
    Replies: 2
    Last Post: 01-31-2011, 12:19 PM
  2. What is the best way to record a process execution time?
    By hanash in forum Linux Programming
    Replies: 7
    Last Post: 03-15-2006, 06:17 AM
  3. calculating user time and time elapsed
    By Neildadon in forum C++ Programming
    Replies: 0
    Last Post: 02-10-2003, 05:00 PM
  4. relating date....
    By Prakash in forum C Programming
    Replies: 3
    Last Post: 09-19-2001, 09:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21